mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Added injuries to injury list
This commit is contained in:
parent
3fc29673bb
commit
64121c3376
@ -17,6 +17,7 @@
|
||||
private ["_target", "_show"];
|
||||
_target = _this select 0;
|
||||
_show = if (count _this > 1) then {_this select 1} else {true};
|
||||
GVAR(currentSelectedSelectionN) = if (count _this > 2) then {_this select 2} else {0};
|
||||
|
||||
GVAR(displayPatientInformationTarget) = if (_show) then {_target} else {ObjNull};
|
||||
|
||||
@ -25,7 +26,7 @@ if (_show) then {
|
||||
("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutRsc [QGVAR(DisplayInformation),"PLAIN"];
|
||||
|
||||
[{
|
||||
private ["_target", "_display", "_alphaLevel", "_damaged", "_availableSelections", "_openWounds", "_selectionBloodLoss", "_red", "_green", "_blue", "_alphaLevel"];
|
||||
private ["_target", "_display", "_alphaLevel", "_damaged", "_availableSelections", "_openWounds", "_selectionBloodLoss", "_red", "_green", "_blue", "_alphaLevel", "_allInjuryTexts", "_lbCtrl"];
|
||||
_target = (_this select 0) select 0;
|
||||
if (GVAR(displayPatientInformationTarget) != _target) exitwith {
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
@ -42,9 +43,18 @@ if (_show) then {
|
||||
_availableSelections = [50,51,52,53,54,55];
|
||||
_openWounds = _target getvariable [QGVAR(openWounds), []];
|
||||
|
||||
_allInjuryTexts = [];
|
||||
|
||||
_selectionBloodLoss = [0,0,0,0,0,0];
|
||||
{
|
||||
// Find how much this bodypart is bleeding
|
||||
_selectionBloodLoss set [(_x select 2), (_selectionBloodLoss select (_x select 2)) + ((_x select 4) * (_x select 3))];
|
||||
if (GVAR(currentSelectedSelectionN) == (_x select 2)) then {
|
||||
// Collect the text to be displayed for this injury [ Select injury class type definition - select the classname DisplayName (6th), amount of injuries for this]
|
||||
if (_x select 3 > 0) then {
|
||||
_allInjuryTexts pushback format["%2x %1", (GVAR(AllWoundInjuryTypes) select (_x select 1)) select 6, _x select 3];
|
||||
};
|
||||
};
|
||||
}foreach _openWounds;
|
||||
|
||||
{
|
||||
@ -66,6 +76,14 @@ if (_show) then {
|
||||
}foreach _selectionBloodLoss;
|
||||
|
||||
// TODO fill the lb with the appropiate information for the patient
|
||||
_lbCtrl = (_display displayCtrl 200);
|
||||
lbClear _lbCtrl;
|
||||
{
|
||||
_lbCtrl lbAdd _x;
|
||||
}foreach _allInjuryTexts;
|
||||
if (count _allInjuryTexts == 0) then {
|
||||
_lbCtrl lbAdd "No injuries on this bodypart..";
|
||||
};
|
||||
|
||||
}, 0, [_target]] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user