From 9de834e15664677684c82e880755019ce97f27c0 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Fri, 17 Apr 2015 00:04:27 -0300 Subject: [PATCH 1/7] Prototype of simplified diagnosis for basic medical. The left gui is completely scraped. Instead, the medical interaction points are color coded to reflect theier damage (bleeding rate). --- addons/medical/ACE_Medical_Actions.hpp | 6 ++++++ addons/medical/ACE_Medical_SelfActions.hpp | 6 ++++++ addons/medical/XEH_preInit.sqf | 1 + addons/medical/functions/fnc_displayPatientInformation.sqf | 2 ++ 4 files changed, 15 insertions(+) diff --git a/addons/medical/ACE_Medical_Actions.hpp b/addons/medical/ACE_Medical_Actions.hpp index 036dd5e9d9..38f376623c 100644 --- a/addons/medical/ACE_Medical_Actions.hpp +++ b/addons/medical/ACE_Medical_Actions.hpp @@ -3,6 +3,7 @@ class ACE_Head { displayName = "$STR_ACE_Interaction_Head"; runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation)); + modifierFunction = QUOTE([ARR_4(_target,_player,0,_this select 3)] call FUNC(modifyMedicalAction)); EXCEPTIONS icon = PATHTOF(UI\icons\medical_cross.paa); distance = MEDICAL_ACTION_DISTANCE; @@ -74,6 +75,7 @@ class ACE_Torso { displayName = "$STR_ACE_Interaction_Torso"; runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation)); + modifierFunction = QUOTE([ARR_4(_target,_player,1,_this select 3)] call FUNC(modifyMedicalAction)); EXCEPTIONS icon = PATHTOF(UI\icons\medical_cross.paa); distance = MEDICAL_ACTION_DISTANCE; @@ -173,6 +175,7 @@ class ACE_ArmLeft { displayName = "$STR_ACE_Interaction_ArmLeft"; runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation)); + modifierFunction = QUOTE([ARR_4(_target,_player,2,_this select 3)] call FUNC(modifyMedicalAction)); EXCEPTIONS icon = PATHTOF(UI\icons\medical_cross.paa); distance = MEDICAL_ACTION_DISTANCE; @@ -329,6 +332,7 @@ class ACE_ArmRight { displayName = "$STR_ACE_Interaction_ArmRight"; runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation)); + modifierFunction = QUOTE([ARR_4(_target,_player,3,_this select 3)] call FUNC(modifyMedicalAction)); EXCEPTIONS icon = PATHTOF(UI\icons\medical_cross.paa); distance = MEDICAL_ACTION_DISTANCE; @@ -482,6 +486,7 @@ class ACE_LegLeft { displayName = "$STR_ACE_Interaction_LegLeft"; runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation)); + modifierFunction = QUOTE([ARR_4(_target,_player,4,_this select 3)] call FUNC(modifyMedicalAction)); EXCEPTIONS icon = PATHTOF(UI\icons\medical_cross.paa); distance = MEDICAL_ACTION_DISTANCE; @@ -623,6 +628,7 @@ class ACE_LegRight { displayName = "$STR_ACE_Interaction_LegRight"; runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation)); + modifierFunction = QUOTE([ARR_4(_target,_player,5,_this select 3)] call FUNC(modifyMedicalAction)); EXCEPTIONS icon = PATHTOF(UI\icons\medical_cross.paa); distance = MEDICAL_ACTION_DISTANCE; diff --git a/addons/medical/ACE_Medical_SelfActions.hpp b/addons/medical/ACE_Medical_SelfActions.hpp index c2a60898f4..f08dab9598 100644 --- a/addons/medical/ACE_Medical_SelfActions.hpp +++ b/addons/medical/ACE_Medical_SelfActions.hpp @@ -11,6 +11,7 @@ class Medical { icon = PATHTOF(UI\icons\medical_cross.paa); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation)); + modifierFunction = QUOTE([ARR_4(_target,_player,0,_this select 3)] call FUNC(modifyMedicalAction)); runOnHover = 1; class Bandage { @@ -78,6 +79,7 @@ class Medical { runOnHover = 1; exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation)); + modifierFunction = QUOTE([ARR_4(_target,_player,1,_this select 3)] call FUNC(modifyMedicalAction)); showDisabled = 1; priority = 2; hotkey = ""; @@ -146,6 +148,7 @@ class Medical { runOnHover = 1; exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation)); + modifierFunction = QUOTE([ARR_4(_target,_player,2,_this select 3)] call FUNC(modifyMedicalAction)); icon = PATHTOF(UI\icons\medical_cross.paa); class Bandage { @@ -246,6 +249,7 @@ class Medical { runOnHover = 1; exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation)); + modifierFunction = QUOTE([ARR_4(_target,_player,3,_this select 3)] call FUNC(modifyMedicalAction)); icon = PATHTOF(UI\icons\medical_cross.paa); class Bandage { @@ -342,6 +346,7 @@ class Medical { runOnHover = 1; exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation)); + modifierFunction = QUOTE([ARR_4(_target,_player,4,_this select 3)] call FUNC(modifyMedicalAction)); icon = PATHTOF(UI\icons\medical_cross.paa); class Bandage { @@ -427,6 +432,7 @@ class Medical { runOnHover = 1; exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation)); + modifierFunction = QUOTE([ARR_4(_target,_player,5,_this select 3)] call FUNC(modifyMedicalAction)); icon = PATHTOF(UI\icons\medical_cross.paa); class Bandage { diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index f15b4ec109..a27bc5ccb1 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -56,6 +56,7 @@ PREP(isInMedicalVehicle); PREP(isMedic); PREP(isMedicalVehicle); PREP(itemCheck); +PREP(modifyMedicalAction); PREP(onMedicationUsage); PREP(onWoundUpdateRequest); PREP(onPropagateWound); diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical/functions/fnc_displayPatientInformation.sqf index ecd2218c2b..65c98c4b85 100644 --- a/addons/medical/functions/fnc_displayPatientInformation.sqf +++ b/addons/medical/functions/fnc_displayPatientInformation.sqf @@ -14,6 +14,8 @@ #include "script_component.hpp" +// Exit for basic medical +if (GVAR(level) < 2) exitWith {}; private ["_target", "_show", "_selectionN"]; _target = _this select 0; _show = if (count _this > 1) then {_this select 1} else {true}; From 1d208b4efc698e5592df655568ee8c6b459a7897 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Fri, 17 Apr 2015 19:36:03 -0300 Subject: [PATCH 2/7] Modify Function for medical actions --- .../functions/fnc_modifyMedicalAction.sqf | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 addons/medical/functions/fnc_modifyMedicalAction.sqf diff --git a/addons/medical/functions/fnc_modifyMedicalAction.sqf b/addons/medical/functions/fnc_modifyMedicalAction.sqf new file mode 100644 index 0000000000..c7deb07c09 --- /dev/null +++ b/addons/medical/functions/fnc_modifyMedicalAction.sqf @@ -0,0 +1,33 @@ +/* + * Author: esteldunedain + * Modify the visuals of a medical action point. + * On Basic medical: modify the icon color based on damage on that body part. + * + * Arguments: + * 0: The Patient Unit + * 1: The Diagnosing Unit + * 2: Selection Number + * 3: The action to modify + * + * ReturnValue: + * nil + * + * Public: No + */ + +#include "script_component.hpp" + +// Quit for the advanced medical system +if (GVAR(level) >= 2) exitWith {}; + +EXPLODE_4_PVT(_this,_target,_player,_selectionN,_actionData); + +private ["_pointDamage"]; +_pointDamage = _target getHitPointDamage (["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"] select _selectionN); + +if (_pointDamage >= 0.8) exitWith { + _actionData set [2, QUOTE(PATHTOF(UI\icons\medical_crossRed.paa))]; +}; +if (_pointDamage > 0) exitWith { + _actionData set [2, QUOTE(PATHTOF(UI\icons\medical_crossYellow.paa))]; +}; From cce9e1f04cf41c7800c1204663b44786f5dab19c Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Fri, 17 Apr 2015 19:38:03 -0300 Subject: [PATCH 3/7] Simple diagnose --- addons/medical/ACE_Medical_Actions.hpp | 6 +++ addons/medical/ACE_Medical_Treatments.hpp | 16 +++---- addons/medical/XEH_preInit.sqf | 2 + .../medical/functions/fnc_actionDiagnose.sqf | 22 ++++++++++ .../functions/fnc_actionDiagnoseLocal.sqf | 42 +++++++++++++++++++ 5 files changed, 77 insertions(+), 11 deletions(-) create mode 100644 addons/medical/functions/fnc_actionDiagnose.sqf create mode 100644 addons/medical/functions/fnc_actionDiagnoseLocal.sqf diff --git a/addons/medical/ACE_Medical_Actions.hpp b/addons/medical/ACE_Medical_Actions.hpp index 38f376623c..1c4c1c2f9d 100644 --- a/addons/medical/ACE_Medical_Actions.hpp +++ b/addons/medical/ACE_Medical_Actions.hpp @@ -70,6 +70,12 @@ class ACE_Head { statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckResponse')] call DFUNC(treatment)); EXCEPTIONS }; + class Diagnose: CheckPulse { + displayName = "Diagnose"; + condition = QUOTE([ARR_4(_player, _target, 'head', 'Diagnose')] call DFUNC(canTreatCached)); + statement = QUOTE([ARR_4(_player, _target, 'head', 'Diagnose')] call DFUNC(treatment)); + EXCEPTIONS + }; }; class ACE_Torso { displayName = "$STR_ACE_Interaction_Torso"; diff --git a/addons/medical/ACE_Medical_Treatments.hpp b/addons/medical/ACE_Medical_Treatments.hpp index 5b5e0b6abd..03b9def612 100644 --- a/addons/medical/ACE_Medical_Treatments.hpp +++ b/addons/medical/ACE_Medical_Treatments.hpp @@ -71,14 +71,14 @@ class ACE_Medical_Actions { itemConsumed = 1; litter[] = {}; }; - class CheckPulse: Bandage { - displayName = ""; - displayNameProgress = ""; + class Diagnose: Bandage { + displayName = "Diagnose"; + displayNameProgress = "Diagnosing..."; treatmentLocations[] = {"All"}; requiredMedic = 0; - treatmentTime = 2; + treatmentTime = 1; items[] = {}; - callbackSuccess = QUOTE(DFUNC(actionCheckPulse)); + callbackSuccess = QUOTE(DFUNC(actionDiagnose)); callbackFailure = ""; callbackProgress = ""; animationPatient = ""; @@ -86,12 +86,6 @@ class ACE_Medical_Actions { itemConsumed = 0; litter[] = {}; }; - class CheckBloodPressure: CheckPulse { - callbackSuccess = QUOTE(DFUNC(actionCheckBloodPressure)); - }; - class CheckResponse: CheckPulse { - callbackSuccess = QUOTE(DFUNC(actionCheckResponse)); - }; }; class Advanced { diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index a27bc5ccb1..c1ae7666f3 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -7,6 +7,8 @@ PREP(actionCheckBloodPressureLocal); PREP(actionCheckPulse); PREP(actionCheckPulseLocal); PREP(actionCheckResponse); +PREP(actionDiagnose); +PREP(actionDiagnoseLocal); PREP(actionPlaceInBodyBag); PREP(actionRemoveTourniquet); PREP(actionLoadUnit); diff --git a/addons/medical/functions/fnc_actionDiagnose.sqf b/addons/medical/functions/fnc_actionDiagnose.sqf new file mode 100644 index 0000000000..ff1b05346c --- /dev/null +++ b/addons/medical/functions/fnc_actionDiagnose.sqf @@ -0,0 +1,22 @@ +/* +* Author: Glowbal +* Action for diagnosing in basic medical +* +* Arguments: +* 0: The medic +* 1: The patient +* +* Return Value: +* NONE +* +* Public: No +*/ + +#include "script_component.hpp" + +systemChat "actionDiagnose"; + +private ["_caller","_target","_title","_content"]; +_caller = _this select 0; +_target = _this select 1; +[[_caller, _target], QUOTE(DFUNC(actionDiagnoseLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ diff --git a/addons/medical/functions/fnc_actionDiagnoseLocal.sqf b/addons/medical/functions/fnc_actionDiagnoseLocal.sqf new file mode 100644 index 0000000000..6428db9f24 --- /dev/null +++ b/addons/medical/functions/fnc_actionDiagnoseLocal.sqf @@ -0,0 +1,42 @@ +/* + * Author: Glowbal + * Local callback for checking the pulse of a patient + * + * Arguments: + * 0: The medic + * 1: The patient + * + * Return Value: + * NONE + * + * Public: No + */ + +#include "script_component.hpp" + +systemChat "actionDiagnoseLocal"; + +_caller = _this select 0; +_unit = _this select 1; + +_genericMessages = ["Patient %1 is %2. %3. %4"]; + +_genericMessages pushBack ([_unit] call EFUNC(common,getName)); +if (alive _unit) then { + _genericMessages pushback "alive"; +} else { + _genericMessages pushback "dead"; +}; +if (_target getvariable[QGVAR(hasLostBlood), false]) then { + _genericMessages pushback "He's lost some blood"; +} else { + _genericMessages pushback "He hasn't lost blood"; +; + +if (_target getvariable[QGVAR(hasPain), false]) then { + _genericMessages pushback localize "He is in pain"; +} else { + _genericMessages pushback localize "He is not in pain"; +}; + +["displayTextStructured", [_caller], [format _genericMessages, 1.5, _caller]] call EFUNC(common,targetEvent); From a5c3e86cd3a119859bddb2fee42ffc5d100dcc93 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Fri, 17 Apr 2015 20:00:43 -0300 Subject: [PATCH 4/7] Fixes --- .../medical/functions/fnc_actionDiagnose.sqf | 2 -- .../functions/fnc_actionDiagnoseLocal.sqf | 18 ++++++++---------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/addons/medical/functions/fnc_actionDiagnose.sqf b/addons/medical/functions/fnc_actionDiagnose.sqf index ff1b05346c..7ac4bfd5a5 100644 --- a/addons/medical/functions/fnc_actionDiagnose.sqf +++ b/addons/medical/functions/fnc_actionDiagnose.sqf @@ -14,8 +14,6 @@ #include "script_component.hpp" -systemChat "actionDiagnose"; - private ["_caller","_target","_title","_content"]; _caller = _this select 0; _target = _this select 1; diff --git a/addons/medical/functions/fnc_actionDiagnoseLocal.sqf b/addons/medical/functions/fnc_actionDiagnoseLocal.sqf index 6428db9f24..58c50638bf 100644 --- a/addons/medical/functions/fnc_actionDiagnoseLocal.sqf +++ b/addons/medical/functions/fnc_actionDiagnoseLocal.sqf @@ -14,12 +14,10 @@ #include "script_component.hpp" -systemChat "actionDiagnoseLocal"; - _caller = _this select 0; _unit = _this select 1; -_genericMessages = ["Patient %1 is %2. %3. %4"]; +_genericMessages = ["Patient %1
is %2.
%3.
%4"]; _genericMessages pushBack ([_unit] call EFUNC(common,getName)); if (alive _unit) then { @@ -31,12 +29,12 @@ if (_target getvariable[QGVAR(hasLostBlood), false]) then { _genericMessages pushback "He's lost some blood"; } else { _genericMessages pushback "He hasn't lost blood"; -; - -if (_target getvariable[QGVAR(hasPain), false]) then { - _genericMessages pushback localize "He is in pain"; -} else { - _genericMessages pushback localize "He is not in pain"; }; -["displayTextStructured", [_caller], [format _genericMessages, 1.5, _caller]] call EFUNC(common,targetEvent); +if (_target getvariable[QGVAR(hasPain), false]) then { + _genericMessages pushback "He is in pain"; +} else { + _genericMessages pushback "He is not in pain"; +}; +diag_log _genericMessages; +["displayTextStructured", [_caller], [format _genericMessages, 3.0, _caller]] call EFUNC(common,targetEvent); From 15720dce31e95e18afdd69b3f53de10970f169bf Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Fri, 17 Apr 2015 20:08:30 -0300 Subject: [PATCH 5/7] Yellow and Red medical crosses --- addons/medical/ui/icons/medical_crossRed.paa | Bin 0 -> 2897 bytes addons/medical/ui/icons/medical_crossYellow.paa | Bin 0 -> 2897 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 addons/medical/ui/icons/medical_crossRed.paa create mode 100644 addons/medical/ui/icons/medical_crossYellow.paa diff --git a/addons/medical/ui/icons/medical_crossRed.paa b/addons/medical/ui/icons/medical_crossRed.paa new file mode 100644 index 0000000000000000000000000000000000000000..5a0c8e9f9cc2e54a4794234bb325084cb65c853b GIT binary patch literal 2897 zcmeHJy-vh140dUU3WnUm-UmTyE2MS-F@O+{!^XxlMY{Lk8M1LhB=b25wvUp63B^e=X(N9zWQ_ zJg>yh#B-?q36B}+Cp(RzXD9X}>o7N3U(2Eg^V#e4v-?l+DEr-YrjB*eKNMHAlAbcT zk?@%7*yXTO>$QAG4-#HK=LTf<*qppx>0g<;6lh@G`CXS8?4zC=m9<1iS|xXp-g`S% Sx88F>1r&$3dA$zLE72R7Mdi2v literal 0 HcmV?d00001 diff --git a/addons/medical/ui/icons/medical_crossYellow.paa b/addons/medical/ui/icons/medical_crossYellow.paa new file mode 100644 index 0000000000000000000000000000000000000000..74ddefd8379c7624c39de30280df92300364822d GIT binary patch literal 2897 zcmeHJ%}T^D5T3O?6g_k=-uFR-wg~M-@t}y0$h-txKgvwF(^ zx__*XtE!5a;)_7{c{vbw{FmVma#oL>b5rq$9dRH1tGz>^xc@EwB?>W~V>o*LKhu-t z&(3pt-YvrZ@&5gE{^4{kcG2#a6azNk;77qvHt3aLm}YA(4C!S%&m2%J+c Ng3&v#*Kvc1UIFa|^X&it literal 0 HcmV?d00001 From 1415adc2bde1b418c3581c63166a590e6536ea40 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sat, 25 Apr 2015 12:35:07 +0200 Subject: [PATCH 6/7] removed local diagnose action. Added localization --- addons/medical/XEH_preInit.sqf | 1 - .../medical/functions/fnc_actionDiagnose.sqf | 23 ++++++++++- .../functions/fnc_actionDiagnoseLocal.sqf | 40 ------------------- addons/medical/stringtable.xml | 22 ++++++++++ 4 files changed, 44 insertions(+), 42 deletions(-) delete mode 100644 addons/medical/functions/fnc_actionDiagnoseLocal.sqf diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index c9c149d2a6..b6deca4033 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -8,7 +8,6 @@ PREP(actionCheckPulse); PREP(actionCheckPulseLocal); PREP(actionCheckResponse); PREP(actionDiagnose); -PREP(actionDiagnoseLocal); PREP(actionPlaceInBodyBag); PREP(actionRemoveTourniquet); PREP(actionLoadUnit); diff --git a/addons/medical/functions/fnc_actionDiagnose.sqf b/addons/medical/functions/fnc_actionDiagnose.sqf index 7ac4bfd5a5..234cc6d303 100644 --- a/addons/medical/functions/fnc_actionDiagnose.sqf +++ b/addons/medical/functions/fnc_actionDiagnose.sqf @@ -17,4 +17,25 @@ private ["_caller","_target","_title","_content"]; _caller = _this select 0; _target = _this select 1; -[[_caller, _target], QUOTE(DFUNC(actionDiagnoseLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ + +_genericMessages = ["STR_ACE_MEDICAL_diagnoseMessage"]; + +_genericMessages pushBack ([_target] call EFUNC(common,getName)); +if (alive _target) then { + _genericMessages pushback "STR_ACE_MEDICAL_diagnoseAlive"; +} else { + _genericMessages pushback "STR_ACE_MEDICAL_diagnoseDead"; +}; +if (_target getvariable[QGVAR(hasLostBlood), false]) then { + _genericMessages pushback "STR_ACE_MEDICAL_lostBlood"; +} else { + _genericMessages pushback "STR_ACE_MEDICAL_noBloodloss"; +}; + +if (_target getvariable[QGVAR(hasPain), false]) then { + _genericMessages pushback "STR_ACE_MEDICAL_inPain"; +} else { + _genericMessages pushback "STR_ACE_MEDICAL_noPain"; +}; + +["displayTextStructured", [_caller], [_genericMessages, 3.0, _caller]] call EFUNC(common,targetEvent); diff --git a/addons/medical/functions/fnc_actionDiagnoseLocal.sqf b/addons/medical/functions/fnc_actionDiagnoseLocal.sqf deleted file mode 100644 index 58c50638bf..0000000000 --- a/addons/medical/functions/fnc_actionDiagnoseLocal.sqf +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Author: Glowbal - * Local callback for checking the pulse of a patient - * - * Arguments: - * 0: The medic - * 1: The patient - * - * Return Value: - * NONE - * - * Public: No - */ - -#include "script_component.hpp" - -_caller = _this select 0; -_unit = _this select 1; - -_genericMessages = ["Patient %1
is %2.
%3.
%4"]; - -_genericMessages pushBack ([_unit] call EFUNC(common,getName)); -if (alive _unit) then { - _genericMessages pushback "alive"; -} else { - _genericMessages pushback "dead"; -}; -if (_target getvariable[QGVAR(hasLostBlood), false]) then { - _genericMessages pushback "He's lost some blood"; -} else { - _genericMessages pushback "He hasn't lost blood"; -}; - -if (_target getvariable[QGVAR(hasPain), false]) then { - _genericMessages pushback "He is in pain"; -} else { - _genericMessages pushback "He is not in pain"; -}; -diag_log _genericMessages; -["displayTextStructured", [_caller], [format _genericMessages, 3.0, _caller]] call EFUNC(common,targetEvent); diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index 53c587bec0..9220eb6671 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -1322,6 +1322,28 @@ Megnézted %1-t Hai controllato %1 + + Patient %1<br/>is %2.<br/>%3.<br/>%4 + + + alive + + + dead + + + He's lost some blood + + + He hasn't lost blood + + + He is in pain + + + He is not in pain + + Bandaged Bandé From 6799903e4b1e18dadb2b73c28af39a7e78472d46 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sat, 25 Apr 2015 12:45:04 +0200 Subject: [PATCH 7/7] Also display different color for advanced --- .../functions/fnc_modifyMedicalAction.sqf | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/addons/medical/functions/fnc_modifyMedicalAction.sqf b/addons/medical/functions/fnc_modifyMedicalAction.sqf index c7deb07c09..66398a2590 100644 --- a/addons/medical/functions/fnc_modifyMedicalAction.sqf +++ b/addons/medical/functions/fnc_modifyMedicalAction.sqf @@ -17,17 +17,24 @@ #include "script_component.hpp" -// Quit for the advanced medical system -if (GVAR(level) >= 2) exitWith {}; - EXPLODE_4_PVT(_this,_target,_player,_selectionN,_actionData); +if (GVAR(level) < 2) exitwith { + private ["_pointDamage"]; + _pointDamage = _target getHitPointDamage (["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"] select _selectionN); -private ["_pointDamage"]; -_pointDamage = _target getHitPointDamage (["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"] select _selectionN); + if (_pointDamage >= 0.8) exitWith { + _actionData set [2, QUOTE(PATHTOF(UI\icons\medical_crossRed.paa))]; + }; + if (_pointDamage > 0) exitWith { + _actionData set [2, QUOTE(PATHTOF(UI\icons\medical_crossYellow.paa))]; + }; +}; -if (_pointDamage >= 0.8) exitWith { - _actionData set [2, QUOTE(PATHTOF(UI\icons\medical_crossRed.paa))]; -}; -if (_pointDamage > 0) exitWith { - _actionData set [2, QUOTE(PATHTOF(UI\icons\medical_crossYellow.paa))]; -}; +private ["_openWounds", "_amountOf"]; +_openWounds = _target getvariable [QGVAR(openWounds), []]; +{ + _amountOf = _x select 3; + if (_amountOf > 0 && {(_selectionN == (_x select 2))}) exitwith { + _actionData set [2, QUOTE(PATHTOF(UI\icons\medical_crossRed.paa))]; + }; +}foreach _openWounds;