mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
e11e102a76
* Enable majority of actions underwater * Remove log * Add logistics_wirecutter support (don't play kneel animations underwater - looks silly) * Don't perform kneel animations when repairing or medicaling underwater * Fix interaction menu rendering underwater (was moving based on player eye level due to height max used for large vehicles) * Fix attach underwater (LIW does not work underwater, LIS does), Add attach scan drawing define * Remove left-over systemChat * Remove vehiclelock from Plane, Disallow linking belt underwater, Allow checking ammo when sitting via action (was already possible via keybind), Use param for LIS
41 lines
994 B
Plaintext
41 lines
994 B
Plaintext
/*
|
|
* Author: Glowbal
|
|
* Grab available treatment options for given category
|
|
*
|
|
* Arguments:
|
|
* 0: The medic <OBJECT>
|
|
* 1: The patient <OBJECT>
|
|
* 2: Category name <STRING>
|
|
*
|
|
* Return Value:
|
|
* Available actions <ARRAY>
|
|
*
|
|
* Example:
|
|
* [ACE_player, poor_dude, "some category"] call ace_medical_menu_fnc_getTreatmentOptions
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params ["_player", "_target", "_name"];
|
|
|
|
if (!([ACE_player, _target, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith))) exitWith {[]};
|
|
|
|
private _actions = if (EGVAR(medical,level) == 2) then {
|
|
GVAR(actionsAdvanced);
|
|
} else {
|
|
GVAR(actionsBasic);
|
|
};
|
|
|
|
private _collectedActions = [];
|
|
private _bodyPart = EGVAR(medical,SELECTIONS) select GVAR(selectedBodyPart);
|
|
{
|
|
_x params ["", "_currentCategory", "_currentCondition"];
|
|
if (_name == _currentCategory && {call _currentCondition}) then {
|
|
_collectedActions pushBack _x;
|
|
};
|
|
nil
|
|
} count _actions;
|
|
|
|
_collectedActions;
|