mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
move modifyAction func to menu component
This commit is contained in:
parent
d4dd1626a5
commit
b698a88dc1
@ -3,7 +3,7 @@ class ACE_Head {
|
||||
icon = QPATHTOEF(medical,UI\icons\medical_cross.paa);
|
||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||
statement = QUOTE([ARR_3(_target, true, 0)] call EFUNC(medical_treatment,displayPatientInformation));
|
||||
modifierFunction = QUOTE([ARR_4(_target,_player,0,_this select 3)] call EFUNC(medical_treatment,modifyMedicalAction));
|
||||
modifierFunction = QUOTE([ARR_4(_target,_player,0,_this select 3)] call FUNC(modifyAction));
|
||||
condition = "true";
|
||||
runOnHover = 1;
|
||||
};
|
||||
@ -14,7 +14,7 @@ class ACE_Torso {
|
||||
runOnHover = 1;
|
||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||
statement = QUOTE([ARR_3(_target, true, 1)] call EFUNC(medical_treatment,displayPatientInformation));
|
||||
modifierFunction = QUOTE([ARR_4(_target,_player,1,_this select 3)] call EFUNC(medical_treatment,modifyMedicalAction));
|
||||
modifierFunction = QUOTE([ARR_4(_target,_player,1,_this select 3)] call FUNC(modifyAction));
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
icon = QPATHTOEF(medical,UI\icons\medical_cross.paa);
|
||||
@ -24,7 +24,7 @@ class ACE_ArmLeft {
|
||||
runOnHover = 1;
|
||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||
statement = QUOTE([ARR_3(_target, true, 2)] call EFUNC(medical_treatment,displayPatientInformation));
|
||||
modifierFunction = QUOTE([ARR_4(_target,_player,2,_this select 3)] call EFUNC(medical_treatment,modifyMedicalAction));
|
||||
modifierFunction = QUOTE([ARR_4(_target,_player,2,_this select 3)] call FUNC(modifyAction));
|
||||
condition = "true";
|
||||
icon = QPATHTOEF(medical,UI\icons\medical_cross.paa);
|
||||
};
|
||||
@ -33,7 +33,7 @@ class ACE_ArmRight {
|
||||
runOnHover = 1;
|
||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||
statement = QUOTE([ARR_3(_target, true, 3)] call EFUNC(medical_treatment,displayPatientInformation));
|
||||
modifierFunction = QUOTE([ARR_4(_target,_player,3,_this select 3)] call EFUNC(medical_treatment,modifyMedicalAction));
|
||||
modifierFunction = QUOTE([ARR_4(_target,_player,3,_this select 3)] call FUNC(modifyAction));
|
||||
condition = "true";
|
||||
icon = QPATHTOEF(medical,UI\icons\medical_cross.paa);
|
||||
};
|
||||
@ -42,7 +42,7 @@ class ACE_LegLeft {
|
||||
runOnHover = 1;
|
||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||
statement = QUOTE([ARR_3(_target, true, 4)] call EFUNC(medical_treatment,displayPatientInformation));
|
||||
modifierFunction = QUOTE([ARR_4(_target,_player,4,_this select 3)] call EFUNC(medical_treatment,modifyMedicalAction));
|
||||
modifierFunction = QUOTE([ARR_4(_target,_player,4,_this select 3)] call FUNC(modifyAction));
|
||||
condition = "true";
|
||||
icon = QPATHTOEF(medical,UI\icons\medical_cross.paa);
|
||||
};
|
||||
@ -51,7 +51,7 @@ class ACE_LegRight {
|
||||
runOnHover = 1;
|
||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||
statement = QUOTE([ARR_3(_target, true, 5)] call EFUNC(medical_treatment,displayPatientInformation));
|
||||
modifierFunction = QUOTE([ARR_4(_target,_player,5,_this select 3)] call EFUNC(medical_treatment,modifyMedicalAction));
|
||||
modifierFunction = QUOTE([ARR_4(_target,_player,5,_this select 3)] call FUNC(modifyAction));
|
||||
condition = "true";
|
||||
icon = QPATHTOEF(medical,UI\icons\medical_cross.paa);
|
||||
};
|
||||
|
@ -1,13 +1,15 @@
|
||||
|
||||
PREP(canOpenMenu);
|
||||
PREP(openMenu);
|
||||
PREP(onMenuOpen);
|
||||
PREP(onMenuClose);
|
||||
PREP(collectActions);
|
||||
PREP(collectActions3D);
|
||||
PREP(modifyAction);
|
||||
PREP(getTreatmentOptions);
|
||||
PREP(handleUI_DisplayOptions);
|
||||
PREP(handleUI_dropDownTriageCard);
|
||||
PREP(module);
|
||||
PREP(onMenuClose);
|
||||
PREP(onMenuOpen);
|
||||
PREP(openMenu);
|
||||
PREP(setTriageStatus);
|
||||
PREP(updateActivityLog);
|
||||
PREP(updateBodyImage);
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private _actionsConfig = [nil, configFile >> QEGVAR(medical_treatment,actions) >> "Basic", configFile >> QEGVAR(medical_treatment,actions) >> "Advanced"] select EGVAR(medical,level);
|
||||
private _actionsConfig = configFile >> QEGVAR(medical_treatment,actions) >> CUR_LEVEL;
|
||||
private _actionPaths = ["ACE_Head", "ACE_Torso", "ACE_ArmLeft", "ACE_ArmRight", "ACE_LegLeft", "ACE_LegRight"];
|
||||
private _actionPathTexts = [
|
||||
localize ELSTRING(interaction,Head), localize ELSTRING(interaction,Torso),
|
||||
|
@ -6,7 +6,7 @@
|
||||
* Arguments:
|
||||
* 0: The Patient Unit <OBJECT>
|
||||
* 1: The Diagnosing Unit <OBJECT>
|
||||
* 2: Selection Number <NUMBER>
|
||||
* 2: Body part index <NUMBER>
|
||||
* 3: The action to modify <OBJECT>
|
||||
*
|
||||
* ReturnValue:
|
||||
@ -14,16 +14,17 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_target", "_player", "_partNumber", "_actionData"];
|
||||
params ["_target", "_player", "_partIndex", "_actionData"];
|
||||
|
||||
private _bloodLossOnSelection = 0;
|
||||
|
||||
// Add all bleeding from wounds on selection
|
||||
{
|
||||
_x params ["", "", "_selectionX", "_amountOf", "_percentageOpen"];
|
||||
if (_selectionX == _partNumber) then {
|
||||
_x params ["", "", "_bodyPartN", "_amountOf", "_percentageOpen"];
|
||||
|
||||
if (_bodyPartN == _partIndex) then {
|
||||
_bloodLossOnSelection = _bloodLossOnSelection + (_amountOf * _percentageOpen);
|
||||
};
|
||||
} forEach (_target getvariable [QEGVAR(medical,openWounds), []]);
|
||||
@ -31,7 +32,7 @@ private _bloodLossOnSelection = 0;
|
||||
if (_bloodLossOnSelection >= 0.15) then {
|
||||
_actionData set [2, QPATHTOEF(medical,UI\icons\medical_crossRed.paa)];
|
||||
} else {
|
||||
if (_bloodLossOnSelection > 0 ) then {
|
||||
if (_bloodLossOnSelection > 0) then {
|
||||
_actionData set [2, QPATHTOEF(medical,UI\icons\medical_crossYellow.paa)];
|
||||
};
|
||||
};
|
@ -21,7 +21,6 @@ PREP(handleBandageOpening);
|
||||
PREP(isBeingCarried);
|
||||
PREP(isBeingDragged);
|
||||
PREP(medicationEffectLoop);
|
||||
PREP(modifyMedicalAction);
|
||||
PREP(onMedicationUsage);
|
||||
|
||||
// treaments
|
||||
|
Loading…
Reference in New Issue
Block a user