mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Cleanup
This commit is contained in:
parent
470492759c
commit
560609fbed
@ -17,23 +17,20 @@
|
|||||||
//Add deviceKey entry:
|
//Add deviceKey entry:
|
||||||
private ["_conditonCode", "_toggleCode", "_closeCode"];
|
private ["_conditonCode", "_toggleCode", "_closeCode"];
|
||||||
_conditonCode = {
|
_conditonCode = {
|
||||||
("ACE_ATragMX" in (uniformItems ACE_player)) || {"ACE_ATragMX" in (vestItems ACE_player)}
|
[] call FUNC(can_show);
|
||||||
};
|
};
|
||||||
_toggleCode = {
|
_toggleCode = {
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {};
|
||||||
if (GVAR(active)) exitWith {
|
if (GVAR(active)) exitWith {
|
||||||
closeDialog 0;
|
closeDialog 0;
|
||||||
false
|
|
||||||
};
|
};
|
||||||
// Statement
|
// Statement
|
||||||
[] call FUNC(create_dialog);
|
[] call FUNC(create_dialog);
|
||||||
false
|
|
||||||
};
|
};
|
||||||
_closeCode = {
|
_closeCode = {
|
||||||
if (dialog && {!isNull (uiNamespace getVariable ["ATragMX_Display", displayNull])}) then {
|
if (GVAR(active)) exitWith {
|
||||||
closeDialog 0;
|
closeDialog 0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
[(localize LSTRING(Name)), QUOTE(PATHTOF(UI\ATRAG_Icon.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
|
||||||
[(localize "STR_ACE_ATragMX_Name"), QUOTE(PATHTOF(UI\ATRAG_Icon.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
|
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
{false},
|
{false},
|
||||||
[0, [true, false, false]], false, 0] call CBA_fnc_addKeybind; // (empty default key)
|
[0, [true, false, false]], false, 0] call CBA_fnc_addKeybind; // (empty default key)
|
||||||
|
|
||||||
|
|
||||||
//Add deviceKey entry:
|
//Add deviceKey entry:
|
||||||
private ["_conditonCode", "_toggleCode", "_closeCode"];
|
private ["_conditonCode", "_toggleCode", "_closeCode"];
|
||||||
_conditonCode = {
|
_conditonCode = {
|
||||||
@ -32,7 +33,7 @@ _conditonCode = {
|
|||||||
};
|
};
|
||||||
_toggleCode = {
|
_toggleCode = {
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {};
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
if (!GVAR(Overlay)) then {
|
if (!GVAR(Overlay)) then {
|
||||||
@ -44,9 +45,6 @@ _toggleCode = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
_closeCode = {
|
_closeCode = {
|
||||||
// Conditions: canInteract
|
|
||||||
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
if (GVAR(Overlay)) then {
|
if (GVAR(Overlay)) then {
|
||||||
//If dispaly is open, close it:
|
//If dispaly is open, close it:
|
||||||
@ -57,7 +55,5 @@ _closeCode = {
|
|||||||
GVAR(Kestrel4500) = false;
|
GVAR(Kestrel4500) = false;
|
||||||
closeDialog 0;
|
closeDialog 0;
|
||||||
};
|
};
|
||||||
false
|
|
||||||
};
|
};
|
||||||
|
[(localize LSTRING(Name)), QUOTE(PATHTOF(UI\Kestrel4500.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
|
||||||
[(localize "STR_ACE_Kestrel_Name"), QUOTE(PATHTOF(UI\Kestrel4500.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
|
|
||||||
|
@ -3,22 +3,18 @@ class CfgVehicles {
|
|||||||
class CAManBase: Man {
|
class CAManBase: Man {
|
||||||
class ACE_SelfActions {
|
class ACE_SelfActions {
|
||||||
class ACE_Equipment {
|
class ACE_Equipment {
|
||||||
class GVAR(show) {
|
class GVAR(configure) {
|
||||||
//Opens the mini map
|
//Opens the dialog
|
||||||
displayName = CSTRING(show);
|
displayName = CSTRING(configure);
|
||||||
condition = QUOTE([DISPLAY_MODE_DIALOG] call FUNC(canShow));
|
condition = QUOTE(([DISPLAY_MODE_DIALOG] call FUNC(canShow)) && {GVAR(currentShowMode) != DISPLAY_MODE_DIALOG});
|
||||||
statement = QUOTE([DISPLAY_MODE_DISPLAY] call FUNC(openDisplay));
|
statement = QUOTE([DISPLAY_MODE_DIALOG] call FUNC(openDisplay));
|
||||||
showDisabled = 0;
|
|
||||||
priority = 0.2;
|
|
||||||
icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa));
|
icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa));
|
||||||
exceptions[] = {"notOnMap", "isNotInside"};
|
exceptions[] = {"notOnMap", "isNotInside"};
|
||||||
class GVAR(configure) {
|
class GVAR(show) {
|
||||||
//Opens the dialog
|
//Opens the mini map
|
||||||
displayName = CSTRING(configure);
|
displayName = CSTRING(show);
|
||||||
condition = QUOTE(([DISPLAY_MODE_DIALOG] call FUNC(canShow)) && {GVAR(currentShowMode) != DISPLAY_MODE_DIALOG});
|
condition = QUOTE(([DISPLAY_MODE_DISPLAY] call FUNC(canShow)) && {GVAR(currentShowMode) != DISPLAY_MODE_DISPLAY});
|
||||||
statement = QUOTE([DISPLAY_MODE_DIALOG] call FUNC(openDisplay));
|
statement = QUOTE([DISPLAY_MODE_DISPLAY] call FUNC(openDisplay));
|
||||||
showDisabled = 0;
|
|
||||||
priority = 0.1;
|
|
||||||
icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa));
|
icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa));
|
||||||
exceptions[] = {"notOnMap", "isNotInside"};
|
exceptions[] = {"notOnMap", "isNotInside"};
|
||||||
};
|
};
|
||||||
@ -26,8 +22,6 @@ class CfgVehicles {
|
|||||||
displayName = CSTRING(closeUnit);
|
displayName = CSTRING(closeUnit);
|
||||||
condition = QUOTE(GVAR(currentShowMode) != DISPLAY_MODE_CLOSED);
|
condition = QUOTE(GVAR(currentShowMode) != DISPLAY_MODE_CLOSED);
|
||||||
statement = QUOTE([DISPLAY_MODE_CLOSED] call FUNC(openDisplay));
|
statement = QUOTE([DISPLAY_MODE_CLOSED] call FUNC(openDisplay));
|
||||||
showDisabled = 0;
|
|
||||||
priority = 0.3;
|
|
||||||
icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa));
|
icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa));
|
||||||
exceptions[] = {"notOnMap", "isNotInside"};
|
exceptions[] = {"notOnMap", "isNotInside"};
|
||||||
};
|
};
|
||||||
|
@ -6,19 +6,18 @@ if (!hasInterface) exitWith {};
|
|||||||
//Add deviceKey entry:
|
//Add deviceKey entry:
|
||||||
private ["_conditonCode", "_toggleCode", "_closeCode"];
|
private ["_conditonCode", "_toggleCode", "_closeCode"];
|
||||||
_conditonCode = {
|
_conditonCode = {
|
||||||
("ACE_microDAGR" in (items ace_player))
|
("ACE_microDAGR" in (items ACE_player))
|
||||||
};
|
};
|
||||||
_toggleCode = {
|
_toggleCode = {
|
||||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {};
|
||||||
[] call FUNC(openDisplay); //toggle display mode
|
[] call FUNC(openDisplay); //toggle display mode
|
||||||
true
|
|
||||||
};
|
};
|
||||||
_closeCode = {
|
_closeCode = {
|
||||||
if (GVAR(currentShowMode) == DISPLAY_MODE_CLOSED) exitWith {false};
|
if (GVAR(currentShowMode) == DISPLAY_MODE_CLOSED) exitWith {};
|
||||||
[DISPLAY_MODE_CLOSED] call FUNC(openDisplay);
|
[DISPLAY_MODE_CLOSED] call FUNC(openDisplay);
|
||||||
true
|
|
||||||
};
|
};
|
||||||
[(localize "STR_ACE_microdagr_itemName"), QUOTE(PATHTOF(images\microDAGR_item.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
|
[(localize LSTRING(itemName)), QUOTE(PATHTOF(images\microDAGR_item.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
|
||||||
|
|
||||||
|
|
||||||
//Add Eventhandler:
|
//Add Eventhandler:
|
||||||
["RangerfinderData", {_this call FUNC(recieveRangefinderData)}] call EFUNC(common,addEventHandler);
|
["RangerfinderData", {_this call FUNC(recieveRangefinderData)}] call EFUNC(common,addEventHandler);
|
||||||
|
Loading…
Reference in New Issue
Block a user