Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Medical Treatment - Modernize and Cleanup #6933

Merged
merged 51 commits into from
Jun 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
0155c43
Modernize and cleanup medical_treatment
mharis001 Apr 11, 2019
e5fb289
Merge branch 'master' into medical-treatment-work
mharis001 Apr 11, 2019
1acfff8
One line for each old public function
mharis001 Apr 11, 2019
b4f9196
Fix litterCleanupDelay name
mharis001 Apr 13, 2019
92d13fc
Improve adjustment calcs / wound blood loss / medications
PabstMirror Mar 31, 2019
8da089d
Change wound data array
PabstMirror Apr 16, 2019
ad3f0fd
Splinting and treatment and gui
PabstMirror Apr 17, 2019
80aa05e
Add arm fractures and aim effects
PabstMirror Apr 24, 2019
da68764
localizations and event
PabstMirror Apr 26, 2019
2e897e8
fix
PabstMirror Apr 26, 2019
8a29957
Merge branch 'limping' into medical-treatment-work-rebaseLimping
PabstMirror Apr 26, 2019
93d3fd5
fix merge for renamed files
PabstMirror Apr 26, 2019
e57a6fb
Fixes and code review changes
mharis001 Apr 26, 2019
9fa0b8b
Move medical logs clearing to treatment
mharis001 Apr 26, 2019
5db1a86
More cleanup work
mharis001 Apr 26, 2019
338772b
cleanup
PabstMirror Apr 27, 2019
9fe16f8
Apply suggestions from code review
mharis001 Apr 27, 2019
fe07ea0
formating, rename bone images
PabstMirror Apr 27, 2019
65601b4
Merge branch 'limping' of https://github.com/acemod/ACE3 into limping
PabstMirror Apr 27, 2019
7b64150
Merge branch 'master' into medical-treatment-work
PabstMirror Apr 27, 2019
6e71338
Fix args for setDead call in actionPlaceInBodyBag
PabstMirror Apr 27, 2019
94afb63
Merge branch 'master' into limping
PabstMirror Apr 27, 2019
796d71c
Apply suggestions from code review
mharis001 Apr 27, 2019
1c4ee3e
disable calls to extension
PabstMirror Apr 30, 2019
6d1eb91
Update fnc_onMedicationUsage.sqf
PabstMirror May 2, 2019
a23b22a
Medical - Skip unneeded setVars on initUnit (#6949)
PabstMirror May 7, 2019
cdd1de0
Medical - Transfer state machine state on locality (#6950)
PabstMirror May 7, 2019
641f3f8
Merge branch 'master' into limping
PabstMirror May 7, 2019
82bbb96
Make UAV excludes consistant, formating
PabstMirror May 7, 2019
e36bab3
Update fnc_treatmentFullHealLocal.sqf
PabstMirror May 11, 2019
615420a
Merge branch 'limping' into medical-treatment-work
PabstMirror May 12, 2019
6c1cc93
reset fractures on respawn
PabstMirror May 12, 2019
c924000
Merge branch 'limping' into medical-treatment-work
PabstMirror May 12, 2019
482c0c7
Merge branch 'master' into medical-treatment-work
PabstMirror May 12, 2019
50caca9
Merge branch 'master' into medical-treatment-work
PabstMirror May 12, 2019
f9d64d4
Fix merge
PabstMirror May 12, 2019
ab6714c
Add PAK time coefficient setting
mharis001 May 12, 2019
7355916
Fix medication
PabstMirror May 12, 2019
9af310a
Add ace_medical_replacementItems config array
mharis001 May 12, 2019
4fe4598
checkItems performance improvement
mharis001 May 12, 2019
bf1b6c9
Treatment - cap max animation speed (#6995)
PabstMirror May 12, 2019
d9fee5f
Move replacementItems compiling to preInit
mharis001 May 12, 2019
003388c
Improve replacementItems compiling
mharis001 May 13, 2019
84fa731
Cleanup splint functions, use macros for fractures
mharis001 May 26, 2019
92d7145
Rename splintCondition to canSplint
mharis001 May 26, 2019
aed68ae
Add cprCreatesPulse setting
mharis001 May 26, 2019
0a49847
Cleanup remaining functions
mharis001 May 28, 2019
cdd88de
Capitalize stringtable entry names
mharis001 May 28, 2019
3f56037
getStitchTime function and fix treatment locations
mharis001 May 28, 2019
7caefea
Update addons/medical_treatment/functions/fnc_getHealTime.sqf
mharis001 May 28, 2019
ebdcc30
Merge branch 'master' into medical-treatment-work
PabstMirror Jun 3, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions addons/advanced_fatigue/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ PREP_RECOMPILE_END;

GVAR(staminaBarWidth) = 10 * (((safezoneW / safezoneH) min 1.2) / 40);
GVAR(dutyList) = [[], []];
GVAR(setAnimExclusions) = [];

ADDON = true;
10 changes: 7 additions & 3 deletions addons/advanced_fatigue/functions/fnc_handleEffects.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ if (GVAR(ppeBlackoutLast) == 1) then {

// - Physical effects ---------------------------------------------------------
if (GVAR(isSwimming)) exitWith {
_unit setAnimSpeedCoef linearConversion [0.7, 0.9, _fatigue, 1, 0.5, true];

if (GVAR(setAnimExclusions) isEqualTo []) then {
_unit setAnimSpeedCoef linearConversion [0.7, 0.9, _fatigue, 1, 0.5, true];
};
if ((isSprintAllowed _unit) && {_fatigue > 0.7}) then {
[_unit, "blockSprint", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set);
} else {
Expand All @@ -69,7 +70,10 @@ if (GVAR(isSwimming)) exitWith {
};
};
if ((getAnimSpeedCoef _unit) != 1) then {
_unit setAnimSpeedCoef 1;
if (GVAR(setAnimExclusions) isEqualTo []) then {
TRACE_1("reset",getAnimSpeedCoef _unit);
_unit setAnimSpeedCoef 1;
};
};

if (_overexhausted) then {
Expand Down
2 changes: 1 addition & 1 deletion addons/common/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@
<Korean>기본</Korean>
</Key>
<Key ID="STR_ACE_Common_Vehicle">
<English>Medical vehicles</English>
<English>Medical Vehicles</English>
<Russian>В медицинском транспорте</Russian>
<Polish>Pojazdy medyczne</Polish>
<Spanish>Vehiculos médicos</Spanish>
Expand Down
41 changes: 39 additions & 2 deletions addons/medical/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,44 @@ PREP_RECOMPILE_END;
// Add warning for old functions that were technically public, Remove at 3.14.0
{
missionNamespace setVariable [_x, compileFinal format ['diag_log text "ACE Medical WARNING: Formerly public function [%1] has no effect in medical rewrite."; nil', _x]];
} forEach ["ace_medical_fnc_actionPlaceInBodyBag","ace_medical_fnc_actionRemoveTourniquet","ace_medical_fnc_addHeartRateAdjustment","ace_medical_fnc_addToLog","ace_medical_fnc_addToTriageCard
","ace_medical_fnc_addUnconsciousCondition","ace_medical_fnc_addVitalLoop","ace_medical_fnc_canAccessMedicalEquipment","ace_medical_fnc_canTreat","ace_medical_fnc_displayTriageCard","ace_medical_fnc_dropDownTriageCard","ace_medical_fnc_getTriageStatus","ace_medical_fnc_getUnconsciousCondition","ace_medical_fnc_hasItem","ace_medical_fnc_hasItems","ace_medical_fnc_hasTourniquetAppliedTo","ace_medical_fnc_isInMedicalFacility","ace_medical_fnc_isInMedicalVehicle","ace_medical_fnc_isMedic","ace_medical_fnc_isMedicalVehicle","ace_medical_fnc_itemCheck","ace_medical_fnc_selectionNameToNumber","ace_medical_fnc_setCardiacArrest","ace_medical_fnc_setDead","ace_medical_fnc_setHitPointDamage","ace_medical_fnc_showBloodEffect","ace_medical_fnc_treatment","ace_medical_fnc_treatmentAdvanced_bandage","ace_medical_fnc_treatmentAdvanced_CPR","ace_medical_fnc_treatmentAdvanced_CPRLocal","ace_medical_fnc_treatmentAdvanced_medication","ace_medical_fnc_treatmentAdvanced_medicationLocal","ace_medical_fnc_treatmentIV","ace_medical_fnc_treatmentIVLocal","ace_medical_fnc_unconsciousPFH","ace_medical_fnc_useItem","ace_medical_fnc_useItems"];
} forEach [
QFUNC(actionPlaceInBodyBag),
QFUNC(actionRemoveTourniquet),
QFUNC(addHeartRateAdjustment),
QFUNC(addToLog),
QFUNC(addToTriageCard),
QFUNC(addUnconsciousCondition),
QFUNC(addVitalLoop),
QFUNC(canAccessMedicalEquipment),
QFUNC(canTreat),
QFUNC(displayTriageCard),
QFUNC(dropDownTriageCard),
QFUNC(getTriageStatus),
QFUNC(getUnconsciousCondition),
QFUNC(hasItem),
QFUNC(hasItems),
QFUNC(hasTourniquetAppliedTo),
QFUNC(isInMedicalFacility),
QFUNC(isInMedicalVehicle),
QFUNC(isMedic),
QFUNC(isMedicalVehicle),
QFUNC(itemCheck),
QFUNC(selectionNameToNumber),
QFUNC(setCardiacArrest),
QFUNC(setDead),
QFUNC(setHitPointDamage),
QFUNC(showBloodEffect),
QFUNC(treatment),
QFUNC(treatmentAdvanced_bandage),
QFUNC(treatmentAdvanced_CPR),
QFUNC(treatmentAdvanced_CPRLocal),
QFUNC(treatmentAdvanced_medication),
QFUNC(treatmentAdvanced_medicationLocal),
QFUNC(treatmentIV),
QFUNC(treatmentIVLocal),
QFUNC(unconsciousPFH),
QFUNC(useItem),
QFUNC(useItems)
];

ADDON = true;
5 changes: 2 additions & 3 deletions addons/medical/dev/watchVariable.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
_return pushBack format ["Hitpoints: [HHed:%1] [HBod: %2]", (_unit getHitPointDamage "HitHead") toFixed 2, (_unit getHitPointDamage "HitBody") toFixed 2];
_return pushBack format ["[HHnd:%1] [HLeg: %2] %3", (_unit getHitPointDamage "HitHands") toFixed 2, (_unit getHitPointDamage "HitLegs") toFixed 2, _limping];

private _fractures = _unit getVariable [QEGVAR(medical,fractures), [0,0,0,0,0,0]];
private _fractures = GET_FRACTURES(_unit);
private _canSprint = if (isSprintAllowed _unit) then {""} else {"[<t color ='#FFCC22'>Sprint Blocked</t>]"};
_return pushBack format ["Fractures: %1 %2", _fractures, _canSprint];

Expand All @@ -75,7 +75,7 @@
_return pushBack format ["%1 [Time On: %2]", ALL_SELECTIONS select _tPartNum, (CBA_missionTime - _x) toFixed 1];
};
{
_x params ["", "_medClassname", "_medPartNum"];
_x params ["_medPartNum", "_medClassname"];
if (_medPartNum == _tPartNum) then {
_return pushBack format [" - Occluded Med: %1", _medClassname];
};
Expand Down Expand Up @@ -154,4 +154,3 @@
// Return:
_return joinString "<br/>"
}, [40]] call EFUNC(common,watchVariable);

3 changes: 1 addition & 2 deletions addons/medical/functions/fnc_setUnconscious.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/*
* Author: Glowbal
* Sets a unit in the unconscious state.
* For Public Use
*
* Arguments:
* 0: The unit that will be put in an unconscious state <OBJECT>
Expand All @@ -17,7 +16,7 @@
* [bob, true] call ace_medical_fnc_setUnconscious;
* [player, true, 5, true] call ace_medical_fnc_setUnconscious;
*
* Public: yes
* Public: Yes
*/

// only run this after the settings are initialized
Expand Down
2 changes: 1 addition & 1 deletion addons/medical/initSettings.sqf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// CBA Settings [ADDON: ace_medical]:

private _categoryArray = [LELSTRING(medical,Category_DisplayName), "?"];
private _categoryArray = [LELSTRING(medical,Category), "?"];

// todo: Check the description is still accurate
[
Expand Down
2 changes: 1 addition & 1 deletion addons/medical/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define COMPONENT_BEAUTIFIED Medical Core
#include "\z\ace\addons\main\script_mod.hpp"

// #define DEBUG_MODE_FULL
#define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS

Expand Down
17 changes: 1 addition & 16 deletions addons/medical/stringtable.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Medical">
<Key ID="STR_ACE_Medical_Category_DisplayName">
<Key ID="STR_ACE_Medical_Category">
<English>ACE Medical</English>
<Russian>ACE: медицина</Russian>
<Polish>ACE Opcje medyczne</Polish>
Expand Down Expand Up @@ -440,21 +440,6 @@
<Chinesesimp>设定当距离超过%1将不能使用治疗动作</Chinesesimp>
<Chinese>設定當距離超過%1將不能使用治療動作</Chinese>
</Key>
<Key ID="STR_ACE_Medical_CanNotLoaded">
<English>This person (%1) is awake and cannot be loaded</English>
<German>Diese Person (%1) ist wach und kann nicht verladen werden</German>
<Polish>Ta osoba (%1) jest przytomna i nie może zostać załadowana</Polish>
<Spanish>Esta persona (%1) está despierto y no puede ser cargado</Spanish>
<Russian>Боец (%1) в сознании и не может быть погружен</Russian>
<Portuguese>Esta pessoa (%1) está acordada e não pode ser carregada</Portuguese>
<Czech>Tato osoba (%1) je vzhůru a nemůže být naložena</Czech>
<Italian>Questa persona (%1) è sveglia e non può essere caricata.</Italian>
<French>%1 est conscient et ne peut être embarqué.</French>
<Japanese>患者 (%1) は意識があり、積み込めない</Japanese>
<Korean>이 사람 (%1) 은(는) 의식이 있어 태우지 못합니다</Korean>
<Chinesesimp>此人(%1)是清醒且不能被装载</Chinesesimp>
<Chinese>此人(%1)是清醒且不能被裝載</Chinese>
</Key>
<Key ID="STR_ACE_Medical_MedicalSettings_spontaneousWakeUpChance_DisplayName">
<English>Unconscious Wake Up Chance</English>
<Japanese>気絶から覚醒する可能性</Japanese>
Expand Down
2 changes: 1 addition & 1 deletion addons/medical_ai/functions/fnc_playTreatmentAnim.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ private _animConfig = if (_isBandage) then {
configFile >> "ACE_Medical_Actions" >> "Basic" >> "Morphine";
};

private _configProperty = "animationCaller";
private _configProperty = "animationMedic";
if (_isSelfTreatment) then {
_configProperty = _configProperty + "Self";
};
Expand Down
2 changes: 1 addition & 1 deletion addons/medical_blood/initSettings.sqf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// CBA Settings [ADDON: ace_medical_blood]:

private _categoryArray = [LELSTRING(medical,Category_DisplayName), LLSTRING(subCategory)];
private _categoryArray = [LELSTRING(medical,Category), LLSTRING(subCategory)];

[
QGVAR(enabledFor), "LIST",
Expand Down
4 changes: 2 additions & 2 deletions addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ private _bodyPartVisParams = [_unit, false, false, false, false]; // params arra
case (_causeFracture && {EGVAR(medical,fractures) > 0} && {_bodyPartNToAdd > 1} && {_woundDamage > FRACTURE_DAMAGE_THRESHOLD}): {
TRACE_1("limb fracture",_bodyPartNToAdd);
// todo: play sound?
private _fractures = _unit getVariable [QEGVAR(medical,fractures), [0,0,0,0,0,0]];
private _fractures = GET_FRACTURES(_unit);
_fractures set [_bodyPartNToAdd, 1];
_unit setVariable [QEGVAR(medical,fractures), _fractures, true];
_unit setVariable [VAR_FRACTURES, _fractures, true];
[QEGVAR(medical,fracture), [_unit, _bodyPartNToAdd]] call CBA_fnc_localEvent; // local event for fracture
_updateDamageEffects = true;
};
Expand Down
2 changes: 1 addition & 1 deletion addons/medical_damage/initSettings.sqf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// CBA Settings [ADDON: ace_medical_damage]:

private _categoryArray = [LELSTRING(medical,Category_DisplayName), LLSTRING(subCategory)];
private _categoryArray = [LELSTRING(medical,Category), LLSTRING(subCategory)];

[
QEGVAR(medical,playerDamageThreshold), "SLIDER",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if (!local _unit) exitWith { ERROR("Unit not local or null"); };
private _isLimping = false;

if (EGVAR(medical,fractures) > 0) then {
private _fractures = _unit getVariable [QEGVAR(medical,fractures), [0,0,0,0,0,0]];
private _fractures = GET_FRACTURES(_unit);
TRACE_1("",_fractures);
if (((_fractures select 4) == 1) || {(_fractures select 5) == 1}) then {
TRACE_1("limping because of fracture",_fractures);
Expand Down
34 changes: 20 additions & 14 deletions addons/medical_engine/script_macros_medical.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS


#define ALL_BODY_PARTS ["head", "body", "leftarm", "rightarm", "leftleg", "rightleg"]
#define ALL_SELECTIONS ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"]
#define ALL_HITPOINTS ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"]
Expand Down Expand Up @@ -97,6 +96,8 @@

#define DEFAULT_TOURNIQUET_VALUES [0,0,0,0,0,0]

#define DEFAULT_FRACTURE_VALUES [0,0,0,0,0,0]

// Triage colors, for consistency across UIs and functions
#define TRIAGE_COLOR_NONE 0, 0, 0, 0.9
#define TRIAGE_COLOR_MINIMAL 0, 0.5, 0, 0.9
Expand All @@ -110,25 +111,29 @@
#define TRIAGE_TEXT_COLOR_IMMEDIATE 1, 1, 1, 1
#define TRIAGE_TEXT_COLOR_DECEASED 1, 1, 1, 1

// Medical activity logs
#define MED_LOG_MAX_ENTRIES 8
#define MED_LOG_VARNAME(type) (format [QEGVAR(medical,log_%1), type])

// - Unit Variables ----------------------------------------------------
// These variables get stored in object space and used across components
// Defined here for easy consistency with GETVAR/SETVAR (also a list for reference)
#define VAR_BLOOD_PRESS QEGVAR(medical,bloodPressure)
#define VAR_BLOOD_VOL QEGVAR(medical,bloodVolume)
#define VAR_BLOOD_PRESS QEGVAR(medical,bloodPressure)
#define VAR_BLOOD_VOL QEGVAR(medical,bloodVolume)
#define VAR_WOUND_BLEEDING QEGVAR(medical,woundBleeding)
#define VAR_CRDC_ARRST QEGVAR(medical,inCardiacArrest)
#define VAR_HEART_RATE QEGVAR(medical,heartRate)
#define VAR_PAIN QEGVAR(medical,pain)
#define VAR_PAIN_SUPP QEGVAR(medical,painSuppress)
#define VAR_PERIPH_RES QEGVAR(medical,peripheralResistance)
#define VAR_UNCON "ACE_isUnconscious"
#define VAR_CRDC_ARRST QEGVAR(medical,inCardiacArrest)
#define VAR_HEART_RATE QEGVAR(medical,heartRate)
#define VAR_PAIN QEGVAR(medical,pain)
#define VAR_PAIN_SUPP QEGVAR(medical,painSuppress)
#define VAR_PERIPH_RES QEGVAR(medical,peripheralResistance)
#define VAR_UNCON "ACE_isUnconscious"
// These variables track gradual adjustments (from medication, etc.)
#define VAR_MEDICATIONS QEGVAR(medical,medications)
#define VAR_MEDICATIONS QEGVAR(medical,medications)
// These variables track the current state of status values above
#define VAR_HEMORRHAGE QEGVAR(medical,hemorrhage)
#define VAR_IN_PAIN QEGVAR(medical,inPain)
#define VAR_TOURNIQUET QEGVAR(medical,tourniquets)

#define VAR_HEMORRHAGE QEGVAR(medical,hemorrhage)
#define VAR_IN_PAIN QEGVAR(medical,inPain)
#define VAR_TOURNIQUET QEGVAR(medical,tourniquets)
#define VAR_FRACTURES QEGVAR(medical,fractures)

// - Unit Functions ---------------------------------------------------
// Retrieval macros for common unit values
Expand All @@ -140,6 +145,7 @@
#define GET_PAIN(unit) (unit getVariable [VAR_PAIN,0])
#define GET_PAIN_SUPPRESS(unit) (unit getVariable [VAR_PAIN_SUPP,0])
#define GET_TOURNIQUETS(unit) (unit getVariable [VAR_TOURNIQUET, DEFAULT_TOURNIQUET_VALUES])
#define GET_FRACTURES(unit) (unit getVariable [VAR_FRACTURES, DEFAULT_FRACTURE_VALUES])
#define IN_CRDC_ARRST(unit) (unit getVariable [VAR_CRDC_ARRST,false])
#define IS_BLEEDING(unit) (GET_WOUND_BLEEDING(unit) > 0)
#define IS_IN_PAIN(unit) (unit getVariable [VAR_IN_PAIN,false])
Expand Down
2 changes: 1 addition & 1 deletion addons/medical_feedback/initSettings.sqf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// CBA Settings [ADDON: ace_medical_feedback]:

private _categoryArray = [LELSTRING(medical,Category_DisplayName), LLSTRING(subCategory)];
private _categoryArray = [LELSTRING(medical,Category), LLSTRING(subCategory)];

[
QGVAR(painEffectType),
Expand Down
6 changes: 3 additions & 3 deletions addons/medical_gui/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@ class CfgVehicles {
#include "InteractionBodyParts.hpp"
#undef ACTION_CONDITION
};
class ACE_LoadPatient {
class ACE_LoadPatient {
displayName = CSTRING(LoadPatient);
condition = QUOTE(_target getVariable [ARR_2('ACE_isUnconscious',false)] && {alive _target} && {vehicle _target == _target});
exceptions[] = {"isNotDragging", "isNotCarrying"};
statement = QUOTE([ARR_2(_player, _target)] call EFUNC(medical_treatment,actionLoadUnit));
statement = QUOTE([ARR_2(_player, _target)] call EFUNC(medical_treatment,loadUnit));
icon = QPATHTOF(ui\cross.paa);
insertChildren = QUOTE(call DEFUNC(medical_treatment,addLoadPatientActions));
};
class ACE_UnloadPatient {
displayName = CSTRING(UnloadPatient);
condition = QUOTE(_target getVariable [ARR_2('ACE_isUnconscious',false)] && {vehicle _target != _target} && {vehicle _player == _player});
exceptions[] = {"isNotDragging", "isNotCarrying", "isNotInside"};
statement = QUOTE([ARR_2(_player, _target)] call EFUNC(medical_treatment,actionUnloadUnit));
statement = QUOTE([ARR_2(_player, _target)] call EFUNC(medical_treatment,unloadUnit));
icon = QPATHTOF(ui\cross.paa);
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ if (isNull _display) then {

// Update activity log
private _ctrlActivityLog = _display displayCtrl IDC_ACTIVITY;
private _activityLog = _target getVariable [QEGVAR(medical,logFile_activity_view), []];
private _activityLog = _target getVariable [MED_LOG_VARNAME("activity"), []];
[_ctrlActivityLog, _activityLog] call FUNC(updateLogList);

// Update triage status
Expand Down
4 changes: 2 additions & 2 deletions addons/medical_gui/functions/fnc_menuPFH.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ private _ctrlBodyImage = _display displayCtrl IDC_BODY_GROUP;

// Update activity and quick view logs
private _ctrlActivityLog = _display displayCtrl IDC_ACTIVITY;
private _activityLog = GVAR(target) getVariable [QEGVAR(medical,logFile_activity_view), []];
private _activityLog = GVAR(target) getVariable [MED_LOG_VARNAME("activity"), []];
[_ctrlActivityLog, _activityLog] call FUNC(updateLogList);

private _ctrlQuickView = _display displayCtrl IDC_QUICKVIEW;
private _quickView = GVAR(target) getVariable [QEGVAR(medical,logFile_quick_view), []];
private _quickView = GVAR(target) getVariable [MED_LOG_VARNAME("quick_view"), []];
[_ctrlQuickView, _quickView] call FUNC(updateLogList);

// Update triage status
Expand Down
13 changes: 7 additions & 6 deletions addons/medical_gui/functions/fnc_updateBodyImage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ params ["_ctrlGroup", "_target"];

// Get tourniquets, damage, and blood loss for target
private _tourniquets = GET_TOURNIQUETS(_target);
private _fractures = _target getVariable [QEGVAR(medical,fractures), [0,0,0,0,0,0]];
private _fractures = GET_FRACTURES(_target);
private _bodyPartDamage = _target getVariable [QEGVAR(medical,bodyPartDamage), [0, 0, 0, 0, 0, 0]];
private _bodyPartBloodLoss = [0, 0, 0, 0, 0, 0];

Expand All @@ -38,18 +38,19 @@ private _bodyPartBloodLoss = [0, 0, 0, 0, 0, 0];
private _ctrlTourniquet = _ctrlGroup controlsGroupCtrl _tourniquetIDC;
_ctrlTourniquet ctrlShow _hasTourniquet;
};

// Show or hide fractrue/bones
if (_fractureIDC != -1) then {
private _ctrlBone = _ctrlGroup controlsGroupCtrl _fractureIDC;
switch (_fractures select _forEachIndex) do {
case (0): {
case 0: {
_ctrlBone ctrlShow false;
};
case (1): {
case 1: {
_ctrlBone ctrlShow true;
_ctrlBone ctrlSetTextColor [1, 0, 0, 1];
};
case (-1): {
case -1: {
if (EGVAR(medical,fractures) == 2) then {
_ctrlBone ctrlShow true;
_ctrlBone ctrlSetTextColor [0, 0, 1, 1];
Expand All @@ -74,8 +75,8 @@ private _bodyPartBloodLoss = [0, 0, 0, 0, 0, 0];
} forEach [
[IDC_BODY_HEAD],
[IDC_BODY_TORSO],
[IDC_BODY_ARMLEFT, IDC_BODY_ARMLEFT_T, IDC_BODY_ARMLEFT_B],
[IDC_BODY_ARMLEFT, IDC_BODY_ARMLEFT_T, IDC_BODY_ARMLEFT_B],
[IDC_BODY_ARMRIGHT, IDC_BODY_ARMRIGHT_T, IDC_BODY_ARMRIGHT_B],
[IDC_BODY_LEGLEFT, IDC_BODY_LEGLEFT_T, IDC_BODY_LEGLEFT_B],
[IDC_BODY_LEGLEFT, IDC_BODY_LEGLEFT_T, IDC_BODY_LEGLEFT_B],
[IDC_BODY_LEGRIGHT, IDC_BODY_LEGRIGHT_T, IDC_BODY_LEGRIGHT_B]
];
Loading