Skip to content

Commit 2b76bdd

Browse files
Spike - Add Olive Launcher Variant (#11003)
* Hide Spike Base Weapon from ACE Arsenal * Add Olive Spike Variant * Also hide base weapon from vanilla arsenal * Use config for enabled check * rem short --------- Co-authored-by: mrschick <58027418+mrschick@users.noreply.github.com>
1 parent 704584d commit 2b76bdd

4 files changed

Lines changed: 23 additions & 1 deletion

File tree

addons/spike/CfgWeapons.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ class CfgWeapons {
44
class Single;
55
};
66
class GVAR(base): launch_B_Titan_short_F {
7+
scope = 1;
78
class Single: Single {
89
EGVAR(missileGuidance,attackProfile) = "SPIKE_TOP";
910
};
1011
};
12+
1113
class GVAR(launcher): GVAR(base) {
1214
scope = 2;
1315
GVAR(enabled) = 1;
@@ -25,5 +27,12 @@ class CfgWeapons {
2527
magazines[] = {QGVAR(lr)};
2628
magazineWell[] = {};
2729
};
30+
31+
class GVAR(launcher_olive): GVAR(launcher) {
32+
GVAR(enabled) = 1;
33+
displayName = CSTRING(LR_olive);
34+
hiddenSelectionsTextures[] = {"A3\Weapons_F_Beta\Launchers\Titan\Data\Launcher_INDP_CO.paa","A3\Weapons_F_Beta\Launchers\Titan\Data\TubeM_INDP_CO.paa"};
35+
picture = "\A3\Weapons_F_Beta\Launchers\Titan\Data\UI\icon_launch_I_Titan_short_F_ca.paa";
36+
};
2837
};
2938

addons/spike/XEH_postInit.sqf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ if (hasInterface) then {
2020

2121
GVAR(activeCamera) = objNull;
2222
GVAR(projectileHashMap) = createHashMap; // used in the seeker to get the namespace for the associated projectile
23+
GVAR(launcherWeapons) = createHashMap; // Used to quickly determine whether the current weapon is a Spike launcher
2324
};

addons/spike/functions/fnc_keyDown.sqf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@
1515
*
1616
* Public: No
1717
*/
18-
if ((currentWeapon ACE_player) != QGVAR(launcher)) exitWith {};
18+
19+
private _currentWeapon = currentWeapon ACE_player;
20+
if !(GVAR(launcherWeapons) getOrDefaultCall [_currentWeapon, {
21+
private _weaponConfig = configProperties [configFile >> "CfgWeapons" >> _currentWeapon, QUOTE(configName _x == QUOTE(QGVAR(enabled))), false];
22+
(_weaponConfig isNotEqualTo []) && {(getNumber (_weaponConfig select 0)) == 1}
23+
}, true]) exitWith {};
1924

2025
params ["_key", "_down"];
2126

addons/spike/stringtable.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@
2222
<Korean>LR</Korean>
2323
<Japanese>LR</Japanese>
2424
</Key>
25+
<Key ID="STR_ACE_SPIKE_LR_olive">
26+
<English>Spike LR (Olive)</English>
27+
<French>Spike LR (Olive)</French>
28+
<Russian>Spike LR (олива)</Russian>
29+
<Korean>스파이크 LR (올리브)</Korean>
30+
<Japanese>スパイク LR (オリーブ)</Japanese>
31+
</Key>
2532
<Key ID="STR_ACE_SPIKE_LeaveCamera">
2633
<English>Leave Camera</English>
2734
<French>Quitter l'appareil</French>

0 commit comments

Comments
 (0)