mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Integrated the Kestrel 4500 into the ace interaction menu
This commit is contained in:
parent
9fb26c2d18
commit
a4c70fe616
@ -2,14 +2,34 @@ class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
class ACE_OpenKestrel4500 {
|
||||
displayName = "$STR_ACE_Kestrel4500_OpenKestrelDialog";
|
||||
condition = QUOTE('ACE_Kestrel4500' in items _player && {!GVAR(Kestrel4500)});
|
||||
class ACE_Equipment {
|
||||
class GVAR(open) {
|
||||
displayName = "$STR_ACE_Kestrel4500_OpenKestrel";
|
||||
condition = QUOTE(call FUNC(canShow) && !GVAR(Kestrel4500));
|
||||
statement = QUOTE(call FUNC(createKestrelDialog));
|
||||
showDisabled = 0;
|
||||
priority = 2;
|
||||
icon = PATHTOF(UI\Kestrel4500_Icon.paa);
|
||||
hotkey = "K";
|
||||
priority = 0.1;
|
||||
icon = QUOTE(PATHTOF(UI\Kestrel4500_Icon.paa));
|
||||
exceptions[] = {"notOnMap"};
|
||||
};
|
||||
class GVAR(show) {
|
||||
displayName = "$STR_ACE_Kestrel4500_ShowKestrel";
|
||||
condition = QUOTE(call FUNC(canShow) && !GVAR(Kestrel4500_Overlay));
|
||||
statement = QUOTE(call FUNC(displayKestrel));
|
||||
showDisabled = 0;
|
||||
priority = 0.2;
|
||||
icon = QUOTE(PATHTOF(UI\Kestrel4500_Icon.paa));
|
||||
exceptions[] = {"notOnMap"};
|
||||
};
|
||||
class GVAR(hide) {
|
||||
displayName = "$STR_ACE_Kestrel4500_HideKestrel";
|
||||
condition = QUOTE(GVAR(Kestrel4500_Overlay));
|
||||
statement = QUOTE(call FUNC(displayKestrel));
|
||||
showDisabled = 0;
|
||||
priority = 0.3;
|
||||
icon = QUOTE(PATHTOF(UI\Kestrel4500_Icon.paa));
|
||||
exceptions[] = {"notOnMap"};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
#include "initKeybinds.sqf"
|
||||
//#include "initKeybinds.sqf"
|
||||
|
||||
GVAR(Kestrel4500_Menus) = ["Direction", "Wind SPD m/s", "CROSSWIND m/s", "HEADWIND m/s", "TEMP °C", "HUMIDITY %", "BARO hPA", "ALTITUDE m", "User Screen 1", "User Screen 2"];
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
ADDON = false;
|
||||
|
||||
PREP(buttonPressed);
|
||||
PREP(canShow);
|
||||
PREP(collectData);
|
||||
PREP(createKestrelDialog);
|
||||
PREP(displayKestrel);
|
||||
|
22
addons/kestrel4500/functions/fnc_canShow.sqf
Normal file
22
addons/kestrel4500/functions/fnc_canShow.sqf
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Authors: Ruthberg
|
||||
* Tests if the Kestrel 4500 can be shown
|
||||
*
|
||||
* Arguments:
|
||||
* Nothing
|
||||
*
|
||||
* Return Value:
|
||||
* canShow (bool)
|
||||
*
|
||||
* Example:
|
||||
* [mode] call ace_kestrel4500_fnc_canShow
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_returnValue"];
|
||||
|
||||
_returnValue = ("ACE_Kestrel4500" in (items ACE_player)) && {[ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)} && {!(underwater ACE_player)};
|
||||
|
||||
_returnValue
|
@ -26,6 +26,7 @@ createDialog 'Kestrel4500_Display';
|
||||
|
||||
[{
|
||||
if (!dialog || !GVAR(Kestrel4500)) exitWith {
|
||||
GVAR(Kestrel4500) = false;
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
|
@ -16,9 +16,15 @@
|
||||
<Key ID="STR_ACE_Kestrel_Description">
|
||||
<English>Kestrel 4500 Pocket Weather Tracker</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Kestrel4500_OpenKestrelDialog">
|
||||
<Key ID="STR_ACE_Kestrel4500_OpenKestrel">
|
||||
<English>Open Kestrel 4500</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Kestrel4500_ShowKestrel">
|
||||
<English>Show Kestrel 4500</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Kestrel4500_HideKestrel">
|
||||
<English>Hide Kestrel 4500</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Kestrel4500_KestrelDialogKey">
|
||||
<English>Open Kestrel 4500</English>
|
||||
</Key>
|
||||
|
Loading…
Reference in New Issue
Block a user