ACE3/addons/zeus/functions/fnc_moduleMedicalMenu.sqf
johnb432 ac9044f2d6
Zeus - Add medical menu module (#9367)
* open medical menu from Zeus

* fix function header

* Zeus can use every action, add room for more buttons in medical menu

* Update addons/medical_treatment/functions/fnc_treatment.sqf

* Added zeus treatment time coeff

* Update addons/medical_gui/functions/fnc_canOpenMenu.sqf

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* Update fnc_canOpenMenu.sqf

* Update initSettings.sqf

* Update fnc_moduleMedicalMenu.sqf

* Added check + documentation

* Update fnc_canTreat.sqf

---------

Authored-by: Brett <brett@mayson.io>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-11-20 13:52:29 -08:00

42 lines
931 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: Brett Mayson
* Opens the medical menu for the unit
*
* Arguments:
* 0: The module logic <OBJECT>
*
* Return Value:
* None
*
* Example:
* [LOGIC] call ace_zeus_fnc_moduleMedicalMenu
*
* Public: No
*/
params ["_logic"];
if !(local _logic) exitWith {};
private _unit = attachedTo _logic;
deleteVehicle _logic;
switch (false) do {
case !(isNull _unit): {
[LSTRING(NothingSelected)] call FUNC(showMessage);
};
case (_unit isKindOf "CAManBase"): {
[LSTRING(OnlyInfantry)] call FUNC(showMessage);
};
case (["ace_medical_gui"] call EFUNC(common,isModLoaded)): {
[LSTRING(RequiresAddon)] call FUNC(showMessage);
};
case ([objNull, _unit] call EFUNC(medical_gui,canOpenMenu)): {
[LSTRING(MedicalMenuDisabled)] call FUNC(showMessage);
};
default {
[_unit] call EFUNC(medical_gui,openMenu);
};
};