diff --git a/A3A/addons/core/functions/Revive/fn_unconscious.sqf b/A3A/addons/core/functions/Revive/fn_unconscious.sqf index bf71dd9008..f1c584b441 100644 --- a/A3A/addons/core/functions/Revive/fn_unconscious.sqf +++ b/A3A/addons/core/functions/Revive/fn_unconscious.sqf @@ -4,6 +4,7 @@ private _bleedOut = time + 450; private _isPlayer = false; private _playersX = false; private _inPlayerGroup = false; +private _handlerCountdown = 0; _unit setBleedingremaining 300; private _fnc_applyPostEffect = { @@ -16,6 +17,45 @@ private _fnc_applyPostEffect = { "filmGrain" ppEffectEnable true; }; +private _fnc_selfReviveCountdownStart = { + private _diff = (_unit getVariable ["A3A_selfReviveTimeout", -1]) - time; + private _initialCountDown = [_diff] call BIS_fnc_countDown; + + if (_diff > 0) then { + _handlerCountdown = addMissionEventHandler [ + "EachFrame", + { + [ + localize "STR_antistasi_actions_unconscious_self_withstand_countdown", + format[ + [(([0] call BIS_fnc_countdown) / 60) + .01, "HH:MM"] call BIS_fnc_timetostring + ], + true + ] call A3A_fnc_customHint + } + ]; + } + else { + _handlerCountdown = addMissionEventHandler [ + "EachFrame", + { + [ + localize "STR_antistasi_actions_unconscious_self_withstand_countdown", + format[ + "%1", + localize "STR_antistasi_actions_unconscious_self_withstand_ready" + ], + true + ] call A3A_fnc_customHint + } + ]; + }; +}; + +private _fnc_selfReviveCountdownStop = { + removeMissionEventHandler ["EachFrame", _handlerCountdown]; +}; + if (isPlayer _unit) then { _isPlayer = true; @@ -63,6 +103,7 @@ else { if (_isPlayer) then { [] call _fnc_applyPostEffect; + [] call _fnc_selfReviveCountdownStart; }; _unit setFatigue 1; @@ -161,6 +202,7 @@ if (_isPlayer) then { if (_isPlayer) then { (findDisplay 46) displayRemoveEventHandler ["KeyDown", respawnMenu]; [_unit,"remove"] remoteExec ["A3A_fnc_flagaction",0,_unit]; + [] call _fnc_selfReviveCountdownStop; } else { _unit stop false; @@ -175,7 +217,8 @@ if (_isPlayer and (_unit getVariable ["respawn",false])) exitWith {}; if (time > _bleedOut) exitWith { if (_isPlayer) then { - _unit call A3A_fnc_respawn + _unit call A3A_fnc_respawn; + [] call _fnc_selfReviveCountdownStop; } else { _unit setDamage 1; @@ -186,6 +229,7 @@ if (alive _unit) then { _unit setUnconscious false; _unit switchMove "unconsciousoutprone"; _unit setBleedingRemaining 0; + [] call _fnc_selfReviveCountdownStop; if (isPlayer _unit) then { [] call SCRT_fnc_misc_updateRichPresence; diff --git a/A3A/addons/scrt/Stringtable.xml b/A3A/addons/scrt/Stringtable.xml index f70ff87e35..46e021c68b 100644 --- a/A3A/addons/scrt/Stringtable.xml +++ b/A3A/addons/scrt/Stringtable.xml @@ -9469,6 +9469,14 @@ <br/>Appuyez sur H pour résister. <br/>H키를 눌러 스스로 일어나십시오. + + Self-Revive Cooldown + 자가소생 쿨다운 + + + Available + 준비됨 + Access Vehicle Market Посмотреть чёрный рынок техники