mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #349 from KoffeinFlummi/medicalBugFixes
Exit displayPatientInformation PFH when a different selection is selected.
This commit is contained in:
commit
bdb5c8e728
@ -31,7 +31,9 @@ if (_show) then {
|
|||||||
[{
|
[{
|
||||||
private ["_target", "_display", "_alphaLevel", "_damaged", "_availableSelections", "_openWounds", "_selectionBloodLoss", "_red", "_green", "_blue", "_alphaLevel", "_allInjuryTexts", "_lbCtrl", "_genericMessages"];
|
private ["_target", "_display", "_alphaLevel", "_damaged", "_availableSelections", "_openWounds", "_selectionBloodLoss", "_red", "_green", "_blue", "_alphaLevel", "_allInjuryTexts", "_lbCtrl", "_genericMessages"];
|
||||||
_target = (_this select 0) select 0;
|
_target = (_this select 0) select 0;
|
||||||
if (GVAR(displayPatientInformationTarget) != _target) exitwith {
|
_selectionN = (_this select 0) select 1;
|
||||||
|
|
||||||
|
if (GVAR(displayPatientInformationTarget) != _target || GVAR(currentSelectedSelectionN) != _selectionN) exitwith {
|
||||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -44,7 +46,7 @@ if (_show) then {
|
|||||||
_allInjuryTexts = [];
|
_allInjuryTexts = [];
|
||||||
_genericMessages = [];
|
_genericMessages = [];
|
||||||
|
|
||||||
_partText = ["STR_ACE_Interaction_Head", "STR_ACE_Interaction_Torso", "STR_ACE_Interaction_ArmLeft" ,"STR_ACE_Interaction_ArmRight" ,"STR_ACE_Interaction_LegLeft", "STR_ACE_Interaction_LegRight"] select GVAR(currentSelectedSelectionN);
|
_partText = ["STR_ACE_Interaction_Head", "STR_ACE_Interaction_Torso", "STR_ACE_Interaction_ArmLeft" ,"STR_ACE_Interaction_ArmRight" ,"STR_ACE_Interaction_LegLeft", "STR_ACE_Interaction_LegRight"] select _selectionN;
|
||||||
_genericMessages pushback [localize _partText, [1, 1, 1, 1]];
|
_genericMessages pushback [localize _partText, [1, 1, 1, 1]];
|
||||||
|
|
||||||
if (_target getvariable[QGVAR(isBleeding), false]) then {
|
if (_target getvariable[QGVAR(isBleeding), false]) then {
|
||||||
@ -54,7 +56,7 @@ if (_show) then {
|
|||||||
_genericMessages pushback [localize "STR_ACE_MEDICAL_STATUS_LOST_BLOOD", [1, 0.1, 0.1, 1]];
|
_genericMessages pushback [localize "STR_ACE_MEDICAL_STATUS_LOST_BLOOD", [1, 0.1, 0.1, 1]];
|
||||||
};
|
};
|
||||||
|
|
||||||
if (((_target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select GVAR(currentSelectedSelectionN)) > 0) then {
|
if (((_target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select _selectionN) > 0) then {
|
||||||
_genericMessages pushback [localize "STR_ACE_MEDICAL_STATUS_TOURNIQUET_APPLIED", [0.77, 0.51, 0.08, 1]];
|
_genericMessages pushback [localize "STR_ACE_MEDICAL_STATUS_TOURNIQUET_APPLIED", [0.77, 0.51, 0.08, 1]];
|
||||||
};
|
};
|
||||||
if (_target getvariable[QGVAR(hasPain), false]) then {
|
if (_target getvariable[QGVAR(hasPain), false]) then {
|
||||||
@ -192,7 +194,7 @@ if (_show) then {
|
|||||||
(_display displayCtrl 303) ctrlSetText (_triageStatus select 0);
|
(_display displayCtrl 303) ctrlSetText (_triageStatus select 0);
|
||||||
(_display displayCtrl 303) ctrlSetBackgroundColor (_triageStatus select 2);
|
(_display displayCtrl 303) ctrlSetBackgroundColor (_triageStatus select 2);
|
||||||
|
|
||||||
}, 0, [_target]] call CBA_fnc_addPerFrameHandler;
|
}, 0, [_target, GVAR(currentSelectedSelectionN)]] call CBA_fnc_addPerFrameHandler;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutText ["","PLAIN"];
|
("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutText ["","PLAIN"];
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
private ["_target", "_show"];
|
private ["_target", "_show"];
|
||||||
_target = _this select 0;
|
_target = _this select 0;
|
||||||
_show = if (count _this > 1) then {_this select 1} else {true};
|
_show = if (count _this > 1) then {_this select 1} else {true};
|
||||||
GVAR(currentSelectedSelectionN) = if (count _this > 2) then {_this select 2} else {0};
|
|
||||||
|
|
||||||
GVAR(TriageCardTarget) = if (_show) then {_target} else {ObjNull};
|
GVAR(TriageCardTarget) = if (_show) then {_target} else {ObjNull};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user