mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Artillery - Add Rangetable Keybind, Fix remembering last charge (#9818)
This commit is contained in:
parent
64538f2ad0
commit
22deb3af79
@ -22,10 +22,10 @@ private _ctrlElevationHigh = _dialog displayCtrl IDC_BUTTON_ELEV_HIGH;
|
||||
private _ctrlElevationLow = _dialog displayCtrl IDC_BUTTON_ELEV_LOW;
|
||||
|
||||
GVAR(lastElevationMode) = param [0, GVAR(lastElevationMode)]; // update if passed a new value
|
||||
GVAR(lastCharge) = lbCurSel _ctrlChargeList;
|
||||
GVAR(lastTablePage) = lbCurSel _ctrlChargeList;
|
||||
|
||||
// get data for currently selected mag/mode combo:
|
||||
(GVAR(magModeData) select GVAR(lastCharge)) params [["_muzzleVelocity", -1], ["_airFriction", 0]];
|
||||
(GVAR(magModeData) select GVAR(lastTablePage)) params [["_muzzleVelocity", -1], ["_airFriction", 0]];
|
||||
private _elevMin = _dialog getVariable [QGVAR(elevMin), 0];
|
||||
private _elevMax = _dialog getVariable [QGVAR(elevMax), 0];
|
||||
_ctrlElevationHigh ctrlSetTextColor ([[0.25,0.25,0.25,1],[1,1,1,1]] select GVAR(lastElevationMode));
|
||||
|
@ -1,10 +1,11 @@
|
||||
class cfgMagazines {
|
||||
class CfgMagazines {
|
||||
class 8Rnd_82mm_Mo_shells;
|
||||
class ACE_1Rnd_82mm_Mo_HE: 8Rnd_82mm_Mo_shells {
|
||||
count = 1;
|
||||
scope = 2;
|
||||
scopeCurator = 2;
|
||||
EGVAR(arsenal,hide) = -1;
|
||||
type = 256;
|
||||
author = ECSTRING(common,ACETeam);
|
||||
displayName = CSTRING(magazine_HE_displayName);
|
||||
displayNameShort = "";
|
||||
@ -19,6 +20,7 @@ class cfgMagazines {
|
||||
scope = 2;
|
||||
scopeCurator = 2;
|
||||
EGVAR(arsenal,hide) = -1;
|
||||
type = 256;
|
||||
author = ECSTRING(common,ACETeam);
|
||||
displayName = CSTRING(magazine_Smoke_displayName);
|
||||
displayNameShort = "";
|
||||
@ -33,6 +35,7 @@ class cfgMagazines {
|
||||
scope = 2;
|
||||
scopeCurator = 2;
|
||||
EGVAR(arsenal,hide) = -1;
|
||||
type = 256;
|
||||
author = ECSTRING(common,ACETeam);
|
||||
displayName = CSTRING(magazine_Illum_displayName);
|
||||
displayNameShort = "";
|
||||
@ -47,6 +50,7 @@ class cfgMagazines {
|
||||
scope = 2;
|
||||
scopeCurator = 2;
|
||||
EGVAR(arsenal,hide) = -1;
|
||||
type = 256;
|
||||
author = ECSTRING(common,ACETeam);
|
||||
displayName = CSTRING(magazine_HE_Guided_displayName);
|
||||
displayNameShort = "";
|
||||
@ -61,6 +65,7 @@ class cfgMagazines {
|
||||
scope = 2;
|
||||
scopeCurator = 2;
|
||||
EGVAR(arsenal,hide) = -1;
|
||||
type = 256;
|
||||
author = ECSTRING(common,ACETeam);
|
||||
displayName = CSTRING(magazine_HE_LaserGuided_displayName);
|
||||
displayNameShort = "";
|
||||
|
@ -7,5 +7,6 @@ PREP_RECOMPILE_START;
|
||||
PREP_RECOMPILE_END;
|
||||
|
||||
#include "initSettings.inc.sqf"
|
||||
#include "initKeybinds.inc.sqf"
|
||||
|
||||
ADDON = true;
|
||||
|
15
addons/mk6mortar/initKeybinds.inc.sqf
Normal file
15
addons/mk6mortar/initKeybinds.inc.sqf
Normal file
@ -0,0 +1,15 @@
|
||||
#include "\a3\ui_f\hpp\defineDIKCodes.inc"
|
||||
|
||||
["ACE3 Equipment", QGVAR(rangetable_action), LLSTRING(rangetable_action), {
|
||||
if (
|
||||
!([ACE_player, "ACE_RangeTable_82mm"] call EFUNC(common,hasItem)) ||
|
||||
!([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith))
|
||||
) exitWith {false};
|
||||
|
||||
// Close previously opened dialogs
|
||||
closeDialog 0;
|
||||
|
||||
// Statement
|
||||
[] call FUNC(rangeTableOpen);
|
||||
true
|
||||
}] call CBA_fnc_addKeybind; // Unbound
|
Loading…
Reference in New Issue
Block a user