2015-01-18 21:16:35 +00:00
|
|
|
/**
|
|
|
|
* fn_openMenu.sqf
|
|
|
|
* @Descr: N/A
|
|
|
|
* @Author: Glowbal
|
|
|
|
*
|
|
|
|
* @Arguments: []
|
|
|
|
* @Return:
|
|
|
|
* @PublicAPI: false
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-01-18 22:44:32 +00:00
|
|
|
|
|
|
|
if (dialog) exitwith {
|
|
|
|
disableSerialization;
|
|
|
|
|
|
|
|
private "_display";
|
|
|
|
_display = uiNamespace getVariable QGVAR(medicalMenu);
|
|
|
|
if (!isnil "_display") then {
|
|
|
|
closeDialog 314412;
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2015-01-18 21:16:35 +00:00
|
|
|
private ["_interactionTarget"];
|
|
|
|
_interactionTarget = objNull;
|
|
|
|
if (count _this > 0) then {
|
|
|
|
_interactionTarget = _this select 0;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
_interactionTarget = cursortarget;
|
|
|
|
if (isNull _interactionTarget) then {
|
2015-01-22 12:33:12 +00:00
|
|
|
_interactionTarget = ACE_player;
|
2015-01-18 21:16:35 +00:00
|
|
|
};
|
2015-01-22 12:33:12 +00:00
|
|
|
if (_interactionTarget distance ACE_player > 5 || !(_interactionTarget isKindOf "CaManBase")) then {
|
|
|
|
_interactionTarget = ACE_player;
|
2015-01-18 21:16:35 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
if (isNull _interactionTarget) then {
|
2015-01-22 12:33:12 +00:00
|
|
|
_interactionTarget = ACE_player;
|
2015-01-18 21:16:35 +00:00
|
|
|
};
|
|
|
|
GVAR(INTERACTION_TARGET) = _interactionTarget;
|
|
|
|
createDialog QGVAR(medicalMenu);
|