mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix base interaction nodes
This commit is contained in:
parent
7d2d40ee55
commit
c7afae88f7
@ -44,6 +44,15 @@ class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
class Medical {
|
||||
displayName = CSTRING(Actions_Medical);
|
||||
runOnHover = 1;
|
||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||
statement = QUOTE([ARR_3(_target, true, 0)] call EFUNC(medical,displayPatientInformation));
|
||||
condition = "true";
|
||||
icon = QPATHTOEF(medical,UI\icons\medical_cross.paa);
|
||||
#include "InteractionBodyParts.hpp"
|
||||
};
|
||||
class Medical_Menu {
|
||||
displayName = CSTRING(OpenMenu);
|
||||
runOnHover = 0;
|
||||
@ -55,6 +64,7 @@ class CfgVehicles {
|
||||
};
|
||||
|
||||
class ACE_Actions {
|
||||
#include "InteractionBodyParts.hpp"
|
||||
// Create a consolidates medical menu for treatment while boarded
|
||||
class ACE_MainActions {
|
||||
class Medical_Menu {
|
||||
|
57
addons/medical_menu/InteractionBodyParts.hpp
Normal file
57
addons/medical_menu/InteractionBodyParts.hpp
Normal file
@ -0,0 +1,57 @@
|
||||
class ACE_Head {
|
||||
displayName = ECSTRING(interaction,Head);
|
||||
icon = QPATHTOEF(medical,UI\icons\medical_cross.paa);
|
||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||
statement = QUOTE([ARR_3(_target, true, 0)] call EFUNC(medical,displayPatientInformation));
|
||||
modifierFunction = QUOTE([ARR_4(_target,_player,0,_this select 3)] call EFUNC(medical_treatment,modifyMedicalAction));
|
||||
condition = "true";
|
||||
runOnHover = 1;
|
||||
};
|
||||
class ACE_Torso {
|
||||
displayName = ECSTRING(interaction,Torso);
|
||||
distance = 5.0;
|
||||
condition = "true";
|
||||
runOnHover = 1;
|
||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||
statement = QUOTE([ARR_3(_target, true, 1)] call EFUNC(medical,displayPatientInformation));
|
||||
modifierFunction = QUOTE([ARR_4(_target,_player,1,_this select 3)] call EFUNC(medical_treatment,modifyMedicalAction));
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
icon = QPATHTOEF(medical,UI\icons\medical_cross.paa);
|
||||
};
|
||||
class ACE_ArmLeft {
|
||||
displayName = ECSTRING(interaction,ArmLeft);
|
||||
runOnHover = 1;
|
||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||
statement = QUOTE([ARR_3(_target, true, 2)] call EFUNC(medical,displayPatientInformation));
|
||||
modifierFunction = QUOTE([ARR_4(_target,_player,2,_this select 3)] call EFUNC(medical_treatment,modifyMedicalAction));
|
||||
condition = "true";
|
||||
icon = QPATHTOEF(medical,UI\icons\medical_cross.paa);
|
||||
};
|
||||
class ACE_ArmRight {
|
||||
displayName = ECSTRING(interaction,ArmRight);
|
||||
runOnHover = 1;
|
||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||
statement = QUOTE([ARR_3(_target, true, 3)] call EFUNC(medical,displayPatientInformation));
|
||||
modifierFunction = QUOTE([ARR_4(_target,_player,3,_this select 3)] call EFUNC(medical_treatment,modifyMedicalAction));
|
||||
condition = "true";
|
||||
icon = QPATHTOEF(medical,UI\icons\medical_cross.paa);
|
||||
};
|
||||
class ACE_LegLeft {
|
||||
displayName = ECSTRING(interaction,LegLeft);
|
||||
runOnHover = 1;
|
||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||
statement = QUOTE([ARR_3(_target, true, 4)] call EFUNC(medical,displayPatientInformation));
|
||||
modifierFunction = QUOTE([ARR_4(_target,_player,4,_this select 3)] call EFUNC(medical_treatment,modifyMedicalAction));
|
||||
condition = "true";
|
||||
icon = QPATHTOEF(medical,UI\icons\medical_cross.paa);
|
||||
};
|
||||
class ACE_LegRight {
|
||||
displayName = ECSTRING(interaction,LegRight);
|
||||
runOnHover = 1;
|
||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||
statement = QUOTE([ARR_3(_target, true, 5)] call EFUNC(medical,displayPatientInformation));
|
||||
modifierFunction = QUOTE([ARR_4(_target,_player,5,_this select 3)] call EFUNC(medical_treatment,modifyMedicalAction));
|
||||
condition = "true";
|
||||
icon = QPATHTOEF(medical,UI\icons\medical_cross.paa);
|
||||
};
|
@ -25,17 +25,6 @@ private _actionPathTexts = [
|
||||
];
|
||||
private _actionPathPositions = ["spine3", "pilot", "LeftForeArm", "RightForeArm", "LKnee", "RKnee"];
|
||||
|
||||
// - Create base nodes --------------------------------------------------------
|
||||
{
|
||||
private _action = [_x, _actionPathTexts select _forEachIndex, QPATHTOEF(medical,UI\icons\medical_cross.paa), {
|
||||
[_target, true, _this] call EFUNC(medical,displayPatientInformation);
|
||||
}, {true}, {}, _forEachIndex, _actionPathPositions select _forEachIndex, 2, [false, true, false, false, false], {
|
||||
[_target, _player, _this select 2, _this select 3] call EFUNC(medical_treatment,modifyMedicalAction);
|
||||
}] call EFUNC(interact_menu,createAction);
|
||||
["CAManBase", 0, ["ACE_MainActions"], _action, true] call EFUNC(interact_menu,addActionToClass);
|
||||
["CAManBase", 1, ["ACE_SelfActions"], _action, true] call EFUNC(interact_menu,addActionToClass);
|
||||
} forEach _actionPaths;
|
||||
|
||||
// - Create treatment actions -------------------------------------------------
|
||||
{
|
||||
private _config = _x;
|
||||
@ -67,7 +56,7 @@ private _actionPathPositions = ["spine3", "pilot", "LeftForeArm", "RightForeArm"
|
||||
_actionName, _displayName, _icon, _statement, _condition, {}, configName _config, [0, 0, 0], 2, [false, true, false, false, false]
|
||||
] call EFUNC(interact_menu,createAction);
|
||||
diag_log formatText ["ACTIONS LOL: %1", [_actionName, _displayName, _icon, _statement, _condition]];
|
||||
["CAManBase", 0, ["ACE_MainActions", _actionPath], _action, true] call EFUNC(interact_menu,addActionToClass);
|
||||
["CAManBase", 1, ["ACE_SelfActions", _actionPath], _action, true] call EFUNC(interact_menu,addActionToClass);
|
||||
["CAManBase", 0, [_actionPath], _action, true] call EFUNC(interact_menu,addActionToClass);
|
||||
["CAManBase", 1, ["ACE_SelfActions", "Medical", _actionPath], _action, true] call EFUNC(interact_menu,addActionToClass);
|
||||
} forEach _allowedSelections;
|
||||
} forEach configProperties [_actionsConfig, "isClass _x"];
|
||||
|
Loading…
Reference in New Issue
Block a user