Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disposable - switch NLAW to CBA disposable system and remove ace_disposable functionality #6955

Merged
merged 15 commits into from
Oct 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions addons/disposable/CfgEventHandlers.hpp

This file was deleted.

15 changes: 0 additions & 15 deletions addons/disposable/CfgMagazines.hpp

This file was deleted.

146 changes: 4 additions & 142 deletions addons/disposable/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -1,146 +1,8 @@
class CfgVehicles {
#define MACRO_NONLAW \
class TransportMagazines { \
class _xx_NLAW_F { \
count = 0; \
}; \
class Launcher_Base_F;
class Weapon_launch_NLAW_F: Launcher_Base_F {
class TransportMagazines {
delete NLAW_F;
};

class ReammoBox_F;
class NATO_Box_Base: ReammoBox_F {};
class Box_NATO_Ammo_F: NATO_Box_Base {
MACRO_NONLAW
};
class Box_NATO_WpsLaunch_F: NATO_Box_Base {
MACRO_NONLAW
};

class IND_Box_Base: ReammoBox_F {};
class Box_IND_WpsLaunch_F: IND_Box_Base {
MACRO_NONLAW
};
class Box_IND_Ammo_F: IND_Box_Base {
MACRO_NONLAW
};

class B_supplyCrate_F: ReammoBox_F {
MACRO_NONLAW
};
class I_supplyCrate_F: B_supplyCrate_F {
MACRO_NONLAW
};
class C_supplyCrate_F: ReammoBox_F {
MACRO_NONLAW
};

class B_AssaultPack_rgr;
class B_AssaultPack_rgr_LAT: B_AssaultPack_rgr {
MACRO_NONLAW
};
class B_AssaultPack_rgr_ReconLAT: B_AssaultPack_rgr {
MACRO_NONLAW
};

class B_Carryall_mcamo;
class B_AssaultPack_mcamo_Ammo: B_Carryall_mcamo {
MACRO_NONLAW
};
class B_Carryall_oli;
class I_Fieldpack_oli_Ammo: B_Carryall_oli {
MACRO_NONLAW
};

class B_AssaultPack_dgtl;
class I_Fieldpack_oli_LAT: B_AssaultPack_dgtl {
MACRO_NONLAW
};

class CargoNet_01_ammo_base_F;
class B_CargoNet_01_ammo_F: CargoNet_01_ammo_base_F {
MACRO_NONLAW
};
class I_CargoNet_01_ammo_F: CargoNet_01_ammo_base_F {
MACRO_NONLAW
};

class Slingload_01_Base_F;
class B_Slingload_01_Cargo_F: Slingload_01_Base_F {
MACRO_NONLAW
};

class Tank_F;
class APC_Tracked_01_base_F: Tank_F {
MACRO_NONLAW
};
/*class B_APC_Tracked_01_base_F: APC_Tracked_01_base_F {
MACRO_NONLAW
};
class B_APC_Tracked_01_rcws_F: B_APC_Tracked_01_base_F {
MACRO_NONLAW
};
class B_APC_Tracked_01_CRV_F: B_APC_Tracked_01_base_F {
MACRO_NONLAW
};
class B_APC_Tracked_01_AA_F: B_APC_Tracked_01_base_F {
MACRO_NONLAW
};*/

class Car_F;
class MRAP_01_base_F: Car_F {
MACRO_NONLAW
};
/*class MRAP_01_gmg_base_F: MRAP_01_base_F {
MACRO_NONLAW
};
class MRAP_01_hmg_base_F: MRAP_01_gmg_base_F {
MACRO_NONLAW
};
class B_MRAP_01_F: MRAP_01_base_F {
MACRO_NONLAW
};
class B_MRAP_01_gmg_F: MRAP_01_gmg_base_F {
MACRO_NONLAW
};
class B_MRAP_01_hmg_F: MRAP_01_hmg_base_F {
MACRO_NONLAW
};*/

class MRAP_03_base_F: Car_F {
MACRO_NONLAW
};
/*class MRAP_03_hmg_base_F: MRAP_03_base_F {
MACRO_NONLAW
};
class MRAP_03_gmg_base_F: MRAP_03_hmg_base_F {
MACRO_NONLAW
};
class I_MRAP_03_F: MRAP_03_base_F {
MACRO_NONLAW
};
class I_MRAP_03_hmg_F: MRAP_03_hmg_base_F {
MACRO_NONLAW
};
class I_MRAP_03_gmg_F: MRAP_03_gmg_base_F {
MACRO_NONLAW
};*/

class Wheeled_APC_F: Car_F {};
class APC_Wheeled_03_base_F: Wheeled_APC_F {
MACRO_NONLAW
};
class APC_Wheeled_01_base_F: Wheeled_APC_F {
MACRO_NONLAW
};
/*class B_APC_Wheeled_01_base_F: APC_Wheeled_01_base_F {
MACRO_NONLAW
};
class B_APC_Wheeled_01_cannon_F: B_APC_Wheeled_01_base_F {
MACRO_NONLAW
};
class I_APC_Wheeled_03_base_F: APC_Wheeled_03_base_F {
MACRO_NONLAW
};
class I_APC_Wheeled_03_cannon_F: I_APC_Wheeled_03_base_F {
MACRO_NONLAW
};*/
};
51 changes: 42 additions & 9 deletions addons/disposable/CfgWeapons.hpp
Original file line number Diff line number Diff line change
@@ -1,19 +1,52 @@
class CfgWeapons {
class Launcher_Base_F;
class Launcher;
class Launcher_Base_F: Launcher {
class WeaponSlotsInfo;
};

class launch_NLAW_F: Launcher_Base_F {
ACE_UsedTube = "ACE_launch_NLAW_Used_F"; // The class name of the used tube.
magazines[] = {"ACE_PreloadedMissileDummy"}; // The dummy magazine
scope = 2;
scopeArsenal = 2;
baseWeapon = "launch_NLAW_F";

magazines[] = {"CBA_FakeLauncherMagazine"};
magazineReloadTime = 0.1;
reloadMagazineSound[] = {"",1,1};

class WeaponSlotsInfo: WeaponSlotsInfo {
mass = 180; // launcher 100, magazine 80
};
};
class ACE_launch_NLAW_Used_F: launch_NLAW_F { // the used tube should be a sub class of the disposable launcher
EGVAR(nlaw,enabled) = 0; // disable guidance for the disposabled tube

class ACE_launch_NLAW_ready_F: launch_NLAW_F {
author = ECSTRING(common,ACETeam);
scope = 1;
ACE_isUsedLauncher = 1;
scopeArsenal = 1;
baseWeapon = "launch_NLAW_F";

magazines[] = {"NLAW_F"};

class EventHandlers {
fired = "_this call CBA_fnc_firedDisposable"; // this weapon eventhandler is required!
};

class WeaponSlotsInfo: WeaponSlotsInfo {
mass = 100;
};
};

class ACE_launch_NLAW_used_F: launch_NLAW_F {
author = ECSTRING(common,ACETeam);
scope = 1;
scopeArsenal = 1;
baseWeapon = "ACE_launch_NLAW_used_F";

displayName = CSTRING(UsedTube);
descriptionShort = CSTRING(UsedTubeDescription);
magazines[] = {"ACE_FiredMissileDummy"}; // This will disable the used launcher class from being fired again.
//picture = ""; @todo
//model = ""; @todo
weaponPoolAvailable = 0;

class WeaponSlotsInfo: WeaponSlotsInfo {
mass = 100;
};
};
};
2 changes: 1 addition & 1 deletion addons/disposable/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ace_disposable
==============

Makes the NLAW a disposable one-shot weapon and provides disposable launchers framework for use by other mods.
Makes the NLAW a disposable one-shot weapon using the [CBA Disposable Framework](https://github.com/CBATeam/CBA_A3/wiki/Disposable-Launchers).


## Maintainers
Expand Down
4 changes: 0 additions & 4 deletions addons/disposable/XEH_PREP.hpp

This file was deleted.

15 changes: 0 additions & 15 deletions addons/disposable/XEH_postInit.sqf

This file was deleted.

9 changes: 0 additions & 9 deletions addons/disposable/XEH_preInit.sqf

This file was deleted.

14 changes: 0 additions & 14 deletions addons/disposable/XEH_preStart.sqf

This file was deleted.

8 changes: 5 additions & 3 deletions addons/disposable/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
weapons[] = {"ACE_launch_NLAW_loaded_F","ACE_launch_NLAW_used_F"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author = ECSTRING(common,ACETeam);
Expand All @@ -14,7 +14,9 @@ class CfgPatches {
};
};

#include "CfgEventHandlers.hpp"
class CBA_DisposableLaunchers {
ACE_launch_NLAW_ready_F[] = {"launch_NLAW_F","ACE_launch_NLAW_used_F"};
};

#include "CfgWeapons.hpp"
#include "CfgMagazines.hpp"
#include "CfgVehicles.hpp"
Loading