mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
ac9044f2d6
* 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>
42 lines
931 B
Plaintext
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);
|
|
};
|
|
};
|