Integrated the ATragMX into the ace interaction menu

This commit is contained in:
ulteq 2015-04-07 20:09:25 +02:00
parent 26186e1ea4
commit a4e22986e0
4 changed files with 33 additions and 9 deletions

View File

@ -2,14 +2,15 @@ class CfgVehicles {
class Man;
class CAManBase: Man {
class ACE_SelfActions {
class ACE_OpenATragMX {
displayName = "$STR_ACE_ATragMX_OpenATragMXDialog";
condition = QUOTE('ACE_ATragMX' in items _player && {!GVAR(ATragMX)});
statement = QUOTE(call FUNC(create_dialog));
showDisabled = 0;
priority = 2;
icon = PATHTOF(UI\ATRAG_Icon.paa);
hotkey = "K";
class ACE_Equipment {
class GVAR(open) {
displayName = "$STR_ACE_ATragMX_OpenATragMXDialog";
condition = QUOTE(call FUNC(canShow));
statement = QUOTE(call FUNC(create_dialog));
showDisabled = 0;
priority = 2;
icon = PATHTOF(UI\ATRAG_Icon.paa);
};
};
};
};

View File

@ -1,6 +1,6 @@
#include "script_component.hpp"
#include "initKeybinds.sqf"
//#include "initKeybinds.sqf"
if (count (profileNamespace getVariable ["ACE_ATragMX_gunList", []]) > 0) then {
GVAR(ATragMX_gunList) = profileNamespace getVariable "ACE_ATragMX_gunList";

View File

@ -9,6 +9,7 @@ PREP(calculate_solution);
PREP(calculate_target_range_assist);
PREP(calculate_target_solution);
PREP(calculate_target_speed_assist);
PREP(canShow);
PREP(change_gun);
PREP(create_dialog);
PREP(cycle_range_card_columns);

View File

@ -0,0 +1,22 @@
/*
* Authors: Ruthberg
* Tests if the ATragMX can be shown
*
* Arguments:
* Nothing
*
* Return Value:
* canShow (bool)
*
* Example:
* call ace_atragmx_fnc_canShow
*
* Public: No
*/
#include "script_component.hpp"
private ["_returnValue"];
_returnValue = ("ACE_ATragMX" in (items ACE_player)) && {[ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)} && {!(underwater ACE_player)};
_returnValue