Reset triage card on full heal (#6243)

This commit is contained in:
SilentSpike 2018-04-11 20:34:32 +01:00 committed by GitHub
parent 306c449986
commit 895f08a215
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -19,7 +19,7 @@
params ["_target", ["_show", true]]; params ["_target", ["_show", true]];
GVAR(TriageCardTarget) = if (_show) then {_target} else {ObjNull}; GVAR(TriageCardTarget) = [objNull, _target] select _show;
if (_show) then { if (_show) then {
//("ACE_MedicalTriageCard" call BIS_fnc_rscLayer) cutRsc [QGVAR(triageCard),"PLAIN"]; //("ACE_MedicalTriageCard" call BIS_fnc_rscLayer) cutRsc [QGVAR(triageCard),"PLAIN"];
@ -32,7 +32,6 @@ if (_show) then {
[_idPFH] call CBA_fnc_removePerFrameHandler; [_idPFH] call CBA_fnc_removePerFrameHandler;
}; };
disableSerialization;
private _display = uiNamespace getVariable QGVAR(triageCard); private _display = uiNamespace getVariable QGVAR(triageCard);
if (isNil "_display") exitWith { if (isNil "_display") exitWith {
[_idPFH] call CBA_fnc_removePerFrameHandler; [_idPFH] call CBA_fnc_removePerFrameHandler;
@ -58,7 +57,7 @@ if (_show) then {
_triageCardTexts pushBack format["%1x - %2", _amount, _message]; _triageCardTexts pushBack format["%1x - %2", _amount, _message];
} forEach _log; } forEach _log;
if (count _triageCardTexts == 0) then { if (_triageCardTexts isEqualTo []) then {
_lbCtrl lbAdd (localize ELSTRING(medical,TriageCard_NoEntry)); _lbCtrl lbAdd (localize ELSTRING(medical,TriageCard_NoEntry));
}; };
{ {

View File

@ -63,6 +63,9 @@ private _allUsedMedication = _target getVariable [QEGVAR(medical,allUsedMedicati
_target setVariable [_x select 0, nil]; _target setVariable [_x select 0, nil];
} forEach _allUsedMedication; } forEach _allUsedMedication;
// Reset triage card since medication is all reset
_target setVariable [QEGVAR(medical,triageCard), [], true];
[_target, false] call EFUNC(medical_engine,setLimping); [_target, false] call EFUNC(medical_engine,setLimping);
// Resetting damage // Resetting damage