-
Notifications
You must be signed in to change notification settings - Fork 739
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Hearing cleanup * Update fnc_updateHearingProtection.sqf * Fixes + tweaks * Update initSettings.inc.sqf * Update fnc_removeEarplugs.sqf
- Loading branch information
Showing
19 changed files
with
146 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
class Extended_PreStart_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
PREP(addEarPlugs); | ||
PREP(earRinging); | ||
PREP(explosionNear); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,35 @@ | ||
#include "..\script_component.hpp" | ||
/* | ||
* Author: Hope Johnson and commy2 | ||
* Author: Hope Johnson, commy2 | ||
* Puts in earplugs. | ||
* | ||
* Arguments: | ||
* 0: Unit (player) <OBJECT> | ||
* 0: Unit <OBJECT> | ||
* 1: Display hint <BOOL> (default: false) | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* [ace_player, false] call ace_hearing_fnc_putInEarplugs | ||
* [player, false] call ace_hearing_fnc_putInEarplugs | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_player", ["_displayHint", false, [false]]]; | ||
if (!GVAR(enableCombatDeafness)) exitWith {}; | ||
|
||
if (!GVAR(EnableCombatDeafness)) exitWith {}; | ||
params ["_unit", ["_displayHint", false]]; | ||
|
||
// Plugs in inventory, putting them in | ||
_player removeItem "ACE_EarPlugs"; | ||
_unit removeItem "ACE_EarPlugs"; | ||
|
||
_player setVariable ["ACE_hasEarPlugsIn", true, true]; | ||
_unit setVariable ["ACE_hasEarPlugsIn", true, true]; | ||
|
||
if (_displayHint) then { | ||
[localize LSTRING(EarPlugs_Are_On)] call EFUNC(common,displayTextStructured); | ||
[LLSTRING(EarPlugs_Are_On)] call EFUNC(common,displayTextStructured); | ||
}; | ||
|
||
//Force an immediate fast volume update: | ||
[[true]] call FUNC(updateVolume); | ||
// Force an immediate volume update | ||
true call FUNC(updateVolume); | ||
|
||
// No Earplugs in inventory, telling user | ||
//[localize LSTRING(NoPlugs)] call EFUNC(common,displayTextStructured); | ||
|
||
[] call FUNC(updateHearingProtection); | ||
call FUNC(updateHearingProtection); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,40 @@ | ||
#include "..\script_component.hpp" | ||
/* | ||
* Author: Hope Johnson and commy2 | ||
* Author: Hope Johnson, commy2 | ||
* Takes out earplugs. | ||
* | ||
* Arguments: | ||
* 0: Unit (player) <OBJECT> | ||
* 1: Display hint <BOOL> (default false) | ||
* 0: Unit <OBJECT> | ||
* 1: Display hint <BOOL> (default: false) | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* [ace_player, false] call ace_hearing_fnc_removeEarplugs | ||
* [player, false] call ace_hearing_fnc_removeEarplugs | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_player", ["_displayHint", false, [false]]]; | ||
if (!GVAR(enableCombatDeafness)) exitWith {}; | ||
|
||
if (!GVAR(EnableCombatDeafness)) exitWith {}; | ||
params ["_unit", ["_displayHint", false]]; | ||
|
||
if !([_player, "ACE_EarPlugs"] call CBA_fnc_canAddItem) exitWith { // inventory full | ||
// Inventory full | ||
if !([_unit, "ACE_EarPlugs"] call CBA_fnc_canAddItem) exitWith { | ||
[LELSTRING(common,Inventory_Full)] call EFUNC(common,displayTextStructured); | ||
}; | ||
|
||
// Plugs already in and removing them. | ||
_player addItem "ACE_EarPlugs"; | ||
_unit addItem "ACE_EarPlugs"; | ||
|
||
_player setVariable ["ACE_hasEarPlugsIn", false, true]; | ||
_unit setVariable ["ACE_hasEarPlugsIn", false, true]; | ||
|
||
if (_displayHint) then { | ||
[localize LSTRING(EarPlugs_Are_Off)] call EFUNC(common,displayTextStructured); | ||
[LLSTRING(EarPlugs_Are_Off)] call EFUNC(common,displayTextStructured); | ||
}; | ||
|
||
//Force an immediate fast volume update: | ||
[[true]] call FUNC(updateVolume); | ||
// Force an immediate volume update | ||
true call FUNC(updateVolume); | ||
|
||
[] call FUNC(updateHearingProtection); | ||
call FUNC(updateHearingProtection); |
Oops, something went wrong.