From 33a5fb46f5321c0fc6d9a73dc7d1495578e40b5c Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Tue, 8 May 2018 14:45:24 +0100 Subject: [PATCH] Fix patient information display --- addons/medical/XEH_PREP.hpp | 3 +-- addons/medical/XEH_postInit.sqf | 2 -- .../medical/functions/fnc_dev_watchMedicalStats.sqf | 2 +- addons/medical_gui/CfgVehicles.hpp | 4 ++-- addons/medical_gui/InteractionBodyParts.hpp | 12 ++++++------ addons/medical_gui/XEH_PREP.hpp | 9 +++++---- addons/medical_gui/XEH_postInit.sqf | 4 ++++ .../functions/fnc_displayPatientInformation.sqf | 0 8 files changed, 19 insertions(+), 17 deletions(-) rename addons/{medical => medical_gui}/functions/fnc_displayPatientInformation.sqf (100%) diff --git a/addons/medical/XEH_PREP.hpp b/addons/medical/XEH_PREP.hpp index afd5ec4019..95626e3177 100644 --- a/addons/medical/XEH_PREP.hpp +++ b/addons/medical/XEH_PREP.hpp @@ -5,7 +5,6 @@ PREP(bodyCleanupLoop); PREP(conditionCardiacArrestTimer); PREP(conditionExecutionDeath); PREP(dev_watchMedicalStats); -PREP(displayPatientInformation); PREP(displayTriageCard); PREP(getUnitState); PREP(handleIncapacitation); @@ -14,8 +13,8 @@ PREP(handleKilled); PREP(handleLocal); PREP(handleRespawn); PREP(install); -PREP(moduleAssignMedicRoles); PREP(moduleAssignMedicalVehicle); +PREP(moduleAssignMedicRoles); PREP(moduleMedicalSettings); PREP(serverRemoveBody); PREP(setUnconsciousStatemachine); diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index 6c36347053..c716620c9c 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -1,8 +1,6 @@ #define DEBUG_MODE_FULL #include "script_component.hpp" -["ace_interactMenuClosed", {[objNull, 0] call FUNC(displayPatientInformation);}] call CBA_fnc_addEventHandler; - //Handle Deleting Bodies and creating litter on Server: if (isServer) then { ["ace_placedInBodyBag", FUNC(serverRemoveBody)] call CBA_fnc_addEventHandler; diff --git a/addons/medical/functions/fnc_dev_watchMedicalStats.sqf b/addons/medical/functions/fnc_dev_watchMedicalStats.sqf index 351657d8f5..08861c2b88 100644 --- a/addons/medical/functions/fnc_dev_watchMedicalStats.sqf +++ b/addons/medical/functions/fnc_dev_watchMedicalStats.sqf @@ -18,7 +18,7 @@ ["medical", { // Hide when patient display is up because they might overlap - if (!isNull EGVAR(medical,displayPatientInformationTarget)) exitWith {""}; + if (!isNull EGVAR(medical_gui,displayPatientInformationTarget)) exitWith {""}; private _unit = cursorTarget; if (!(_unit isKindOf "CAManBase")) then {_unit = cursorObject}; diff --git a/addons/medical_gui/CfgVehicles.hpp b/addons/medical_gui/CfgVehicles.hpp index 2315b32a25..64a58011dd 100644 --- a/addons/medical_gui/CfgVehicles.hpp +++ b/addons/medical_gui/CfgVehicles.hpp @@ -48,7 +48,7 @@ class CfgVehicles { displayName = ECSTRING(medical,Actions_Medical); runOnHover = 1; exceptions[] = {"isNotInside", "isNotSitting"}; - statement = QUOTE([ARR_3(_target,1,0)] call EFUNC(medical,displayPatientInformation)); + statement = QUOTE([ARR_3(_target,1,0)] call FUNC(displayPatientInformation)); condition = "true"; icon = QPATHTOF(ui\ui\icons\medical_cross.paa); #define ACTION_CONDITION condition = "true"; @@ -83,7 +83,7 @@ class CfgVehicles { displayName = ECSTRING(medical,Actions_Medical); runOnHover = 1; exceptions[] = {"isNotInside", "isNotSitting"}; - statement = QUOTE([ARR_3(_target,1,0)] call EFUNC(medical,displayPatientInformation)); + statement = QUOTE([ARR_3(_target,1,0)] call FUNC(displayPatientInformation)); condition = QUOTE(((vehicle _target != _target && vehicle _target == vehicle _player) || {EGVAR(medical,menuTypeStyle) == 1})); icon = QPATHTOF(ui\ui\icons\medical_cross.paa); #define ACTION_CONDITION condition = "true"; diff --git a/addons/medical_gui/InteractionBodyParts.hpp b/addons/medical_gui/InteractionBodyParts.hpp index c632e486df..52636ae64d 100644 --- a/addons/medical_gui/InteractionBodyParts.hpp +++ b/addons/medical_gui/InteractionBodyParts.hpp @@ -4,7 +4,7 @@ class ACE_Head { icon = QPATHTOF(ui\ui\icons\medical_cross.paa); exceptions[] = {"isNotInside", "isNotSitting"}; ACTION_CONDITION - statement = QUOTE([ARR_3(_target,1,0)] call EFUNC(medical,displayPatientInformation)); + statement = QUOTE([ARR_3(_target,1,0)] call FUNC(displayPatientInformation)); modifierFunction = QUOTE([ARR_4(_target,_player,0,_this select 3)] call FUNC(modifyAction)); runOnHover = 1; }; @@ -14,7 +14,7 @@ class ACE_Torso { icon = QPATHTOF(ui\ui\icons\medical_cross.paa); exceptions[] = {"isNotInside", "isNotSitting"}; ACTION_CONDITION - statement = QUOTE([ARR_3(_target,1,1)] call EFUNC(medical,displayPatientInformation)); + statement = QUOTE([ARR_3(_target,1,1)] call FUNC(displayPatientInformation)); modifierFunction = QUOTE([ARR_4(_target,_player,1,_this select 3)] call FUNC(modifyAction)); runOnHover = 1; }; @@ -24,7 +24,7 @@ class ACE_ArmLeft { icon = QPATHTOF(ui\ui\icons\medical_cross.paa); exceptions[] = {"isNotInside", "isNotSitting"}; ACTION_CONDITION - statement = QUOTE([ARR_3(_target,1,2)] call EFUNC(medical,displayPatientInformation)); + statement = QUOTE([ARR_3(_target,1,2)] call FUNC(displayPatientInformation)); modifierFunction = QUOTE([ARR_4(_target,_player,2,_this select 3)] call FUNC(modifyAction)); runOnHover = 1; }; @@ -34,7 +34,7 @@ class ACE_ArmRight { icon = QPATHTOF(ui\ui\icons\medical_cross.paa); exceptions[] = {"isNotInside", "isNotSitting"}; ACTION_CONDITION - statement = QUOTE([ARR_3(_target,1,3)] call EFUNC(medical,displayPatientInformation)); + statement = QUOTE([ARR_3(_target,1,3)] call FUNC(displayPatientInformation)); modifierFunction = QUOTE([ARR_4(_target,_player,3,_this select 3)] call FUNC(modifyAction)); runOnHover = 1; }; @@ -44,7 +44,7 @@ class ACE_LegLeft { icon = QPATHTOF(ui\ui\icons\medical_cross.paa); exceptions[] = {"isNotInside", "isNotSitting"}; ACTION_CONDITION - statement = QUOTE([ARR_3(_target,1,4)] call EFUNC(medical,displayPatientInformation)); + statement = QUOTE([ARR_3(_target,1,4)] call FUNC(displayPatientInformation)); modifierFunction = QUOTE([ARR_4(_target,_player,4,_this select 3)] call FUNC(modifyAction)); runOnHover = 1; }; @@ -54,7 +54,7 @@ class ACE_LegRight { icon = QPATHTOF(ui\ui\icons\medical_cross.paa); exceptions[] = {"isNotInside", "isNotSitting"}; ACTION_CONDITION - statement = QUOTE([ARR_3(_target,1,5)] call EFUNC(medical,displayPatientInformation)); + statement = QUOTE([ARR_3(_target,1,5)] call FUNC(displayPatientInformation)); modifierFunction = QUOTE([ARR_4(_target,_player,5,_this select 3)] call FUNC(modifyAction)); runOnHover = 1; }; diff --git a/addons/medical_gui/XEH_PREP.hpp b/addons/medical_gui/XEH_PREP.hpp index ac7e740deb..46a69fe27f 100644 --- a/addons/medical_gui/XEH_PREP.hpp +++ b/addons/medical_gui/XEH_PREP.hpp @@ -1,14 +1,15 @@ PREP(canOpenMenu); -PREP(openMenu); -PREP(onMenuOpen); -PREP(onMenuClose); PREP(collectActions); PREP(collectActions3D); -PREP(modifyAction); +PREP(displayPatientInformation); PREP(getTreatmentOptions); PREP(handleUI_DisplayOptions); PREP(handleUI_dropDownTriageCard); +PREP(modifyAction); PREP(module); +PREP(onMenuClose); +PREP(onMenuOpen); +PREP(openMenu); PREP(setTriageStatus); PREP(updateActivityLog); PREP(updateBodyImage); diff --git a/addons/medical_gui/XEH_postInit.sqf b/addons/medical_gui/XEH_postInit.sqf index 413da0ca9e..1d993887e2 100644 --- a/addons/medical_gui/XEH_postInit.sqf +++ b/addons/medical_gui/XEH_postInit.sqf @@ -34,3 +34,7 @@ GVAR(pendingReopen) = false; }; false }, [35, [false, false, false]], false, 0] call CBA_fnc_addKeybind; + + +// Close patient information when interact menu is closed +["ace_interactMenuClosed", {[objNull, 0] call FUNC(displayPatientInformation);}] call CBA_fnc_addEventHandler; diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical_gui/functions/fnc_displayPatientInformation.sqf similarity index 100% rename from addons/medical/functions/fnc_displayPatientInformation.sqf rename to addons/medical_gui/functions/fnc_displayPatientInformation.sqf