mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Medical - Add self interaction when needed (#6912)
* Medical - Add self interaction when needed * Update addons/medical_gui/XEH_postInit.sqf Co-Authored-By: PabstMirror <pabstmirror@gmail.com> * Update addons/medical_gui/XEH_postInit.sqf Co-Authored-By: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
parent
978049eab1
commit
b907c9d547
@ -12,9 +12,19 @@ GVAR(pendingReopen) = false;
|
||||
|
||||
GVAR(menuPFH) = -1;
|
||||
|
||||
GVAR(selfInteractionActions) = [];
|
||||
[] call FUNC(addTreatmentActions);
|
||||
[] call FUNC(collectActions);
|
||||
|
||||
[QEGVAR(interact_menu,newControllableObject), {
|
||||
params ["_type"]; // string of the object's classname
|
||||
if (!(_type isKindOf "CAManBase")) exitWith {};
|
||||
{
|
||||
_x set [0, _type];
|
||||
_x call EFUNC(interact_menu,addActionToClass);
|
||||
} forEach GVAR(selfInteractionActions);
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["ace_treatmentSucceded", {
|
||||
if (GVAR(openAfterTreatment) && {GVAR(pendingReopen)}) then {
|
||||
GVAR(pendingReopen) = false;
|
||||
|
@ -10,7 +10,7 @@
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [] call ace_medical_gui_fnc_addInteractActions
|
||||
* [] call ace_medical_gui_fnc_addTreatmentActions
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
@ -60,6 +60,6 @@ private _fnc_condition = {
|
||||
|
||||
["CAManBase", 0, [_actionPath], _action, true] call EFUNC(interact_menu,addActionToClass);
|
||||
["CAManBase", 0, ["ACE_MainActions", "ACE_Medical_Radial", _actionPath], _action, true] call EFUNC(interact_menu,addActionToClass);
|
||||
["CAManBase", 1, ["ACE_SelfActions", "ACE_Medical", _actionPath], _action, true] call EFUNC(interact_menu,addActionToClass);
|
||||
GVAR(selfInteractionActions) pushBack ["", 1, ["ACE_SelfActions", "ACE_Medical", _actionPath], _action];
|
||||
} forEach _allowedBodyParts;
|
||||
} forEach configProperties [_actionsConfig, "isClass _x"];
|
||||
|
Loading…
Reference in New Issue
Block a user