mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Common - Add separate blockSpeaking status for acre direct (#8904)
* Add separate blockSPeaking status for acre direct * Move TFAR code to new blockSpeaking handler Co-authored-by: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
parent
b20aa76444
commit
27c5464654
@ -27,6 +27,7 @@
|
||||
["blockThrow", false, ["ACE_Attach", "ACE_concertina_wire", "ACE_dragging", "ACE_Explosives", "ACE_Ladder", "ACE_rearm", "ACE_refuel", "ACE_Sandbag", "ACE_Trenches", "ACE_tripod"]] call FUNC(statusEffect_addType);
|
||||
["setHidden", true, ["ace_unconscious"]] call FUNC(statusEffect_addType);
|
||||
["blockRadio", false, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered), "ace_unconscious"]] call FUNC(statusEffect_addType);
|
||||
["blockSpeaking", false, ["ace_unconscious"]] call FUNC(statusEffect_addType);
|
||||
|
||||
[QGVAR(forceWalk), {
|
||||
params ["_object", "_set"];
|
||||
@ -86,6 +87,17 @@
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(blockSpeaking), {
|
||||
params ["_object", "_set"];
|
||||
TRACE_2("blockSpeaking EH",_object,_set);
|
||||
if (["acre_main"] call FUNC(isModLoaded)) then {
|
||||
_object setVariable ["acre_sys_core_isDisabled", _set > 0, true];
|
||||
};
|
||||
if (["task_force_radio"] call FUNC(isModLoaded)) then {
|
||||
_object setVariable ["tf_voiceVolume", [1, 0] select (_set > 0), true];
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(blockDamage), { //Name reversed from `allowDamage` because we want NOR logic
|
||||
params ["_object", "_set"];
|
||||
if ((_object isKindOf "CAManBase") && {(["ace_medical"] call FUNC(isModLoaded))}) then {
|
||||
|
@ -31,7 +31,6 @@ if (_setVolume) then {
|
||||
2 fadeSound NORMAL_LEVEL;
|
||||
|
||||
// TFAR
|
||||
_unit setVariable ["tf_voiceVolume", NORMAL_LEVEL, true];
|
||||
_unit setVariable ["tf_globalVolume", NORMAL_LEVEL];
|
||||
|
||||
// ACRE2
|
||||
@ -42,7 +41,6 @@ if (_setVolume) then {
|
||||
2 fadeSound MUTED_LEVEL;
|
||||
|
||||
// TFAR
|
||||
_unit setVariable ["tf_voiceVolume", NO_SOUND, true];
|
||||
_unit setVariable ["tf_globalVolume", MUTED_LEVEL];
|
||||
|
||||
// ACRE2
|
||||
|
@ -34,6 +34,9 @@ _unit setVariable [VAR_UNCON, _active, true];
|
||||
// Block radio on unconsciousness for compatibility with captive module
|
||||
[_unit, "blockRadio", "ace_unconscious", _active] call EFUNC(common,statusEffect_set);
|
||||
|
||||
// Block speaking on unconsciousness
|
||||
[_unit, "blockSpeaking", "ace_unconscious", _active] call EFUNC(common,statusEffect_set);
|
||||
|
||||
if (_active) then {
|
||||
// Don't bother setting this if not used
|
||||
if (EGVAR(medical,spontaneousWakeUpChance) > 0) then {
|
||||
|
Loading…
Reference in New Issue
Block a user