mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
45 lines
922 B
Plaintext
45 lines
922 B
Plaintext
/**
|
|
* fn_openMenu.sqf
|
|
* @Descr: N/A
|
|
* @Author: Glowbal
|
|
*
|
|
* @Arguments: []
|
|
* @Return:
|
|
* @PublicAPI: false
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
if (dialog) exitwith {
|
|
disableSerialization;
|
|
|
|
private "_display";
|
|
_display = uiNamespace getVariable QGVAR(medicalMenu);
|
|
if (!isnil "_display") then {
|
|
closeDialog 314412;
|
|
};
|
|
|
|
};
|
|
|
|
private ["_interactionTarget"];
|
|
_interactionTarget = objNull;
|
|
if (count _this > 0) then {
|
|
_interactionTarget = _this select 0;
|
|
|
|
} else {
|
|
_interactionTarget = cursortarget;
|
|
if (isNull _interactionTarget) then {
|
|
_interactionTarget = ACE_player;
|
|
};
|
|
if (_interactionTarget distance ACE_player > 5 || !(_interactionTarget isKindOf "CaManBase")) then {
|
|
_interactionTarget = ACE_player;
|
|
};
|
|
};
|
|
|
|
if (isNull _interactionTarget) then {
|
|
_interactionTarget = ACE_player;
|
|
};
|
|
GVAR(INTERACTION_TARGET) = _interactionTarget;
|
|
createDialog QGVAR(medicalMenu);
|