From ebd6c9e33407515d482f526f98e19842353f4d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Dahlgren?= Date: Thu, 7 Sep 2023 21:02:50 +0200 Subject: [PATCH] Add magazine wells for SPE CDLC --- addons/jam/jam_spe/CfgMagazineWells.hpp | 130 ++++++++++++++++++++++++ addons/jam/jam_spe/CfgWeapons.hpp | 81 +++++++++++++++ addons/jam/jam_spe/config.cpp | 22 ++++ addons/jam/jam_spe/script_component.hpp | 3 + 4 files changed, 236 insertions(+) create mode 100644 addons/jam/jam_spe/CfgMagazineWells.hpp create mode 100644 addons/jam/jam_spe/CfgWeapons.hpp create mode 100644 addons/jam/jam_spe/config.cpp create mode 100644 addons/jam/jam_spe/script_component.hpp diff --git a/addons/jam/jam_spe/CfgMagazineWells.hpp b/addons/jam/jam_spe/CfgMagazineWells.hpp new file mode 100644 index 000000000..9490ff348 --- /dev/null +++ b/addons/jam/jam_spe/CfgMagazineWells.hpp @@ -0,0 +1,130 @@ +class CfgMagazineWells { + + class CBA_45ACP_1911 { + SPE_Magazines[] = { + "SPE_7Rnd_45ACP", + "SPE_7Rnd_45ACP_1911" + }; + }; + + class CBA_45ACP_Grease { + SPE_Magazines[] = { + "SPE_30Rnd_M3_GreaseGun_45ACP", + "SPE_30Rnd_M3_GreaseGun_45ACP_t" + }; + }; + + class CBA_45ACP_Thompson_Stick { + SPE_Magazines[] = { + "SPE_20Rnd_Thompson_45ACP", + "SPE_20Rnd_Thompson_45ACP_t", + "SPE_30Rnd_Thompson_45ACP", + "SPE_30Rnd_Thompson_45ACP_t" + }; + }; + + class CBA_9x19_MP40 { + SPE_Magazines[] = { + "SPE_32rnd_9x19", + "SPE_32rnd_9x19_t" + }; + }; + + class CBA_9x19_P08 { + SPE_Magazines[] = { + "SPE_8Rnd_9x19_P08" + }; + }; + + class CBA_9x19_STEN { + SPE_Magazines[] = { + "SPE_32Rnd_9x19_Sten" + }; + }; + + class CBA_30Carbine_M1Carbine { + SPE_Magazines[] = { + "SPE_15Rnd_762x33", + "SPE_15Rnd_762x33_t" + }; + }; + + class CBA_792x33_StG { + SPE_Magazines[] = { + "SPE_30rnd_792x33", + "SPE_30rnd_792x33_t" + }; + }; + + class CBA_3006_Garand { + SPE_Magazines[] = { + "SPE_8Rnd_762x63", + "SPE_8Rnd_762x63_M1", + "SPE_8Rnd_762x63_M2_AP", + "SPE_8Rnd_762x63_t" + }; + }; + + class CBA_3006_Spring { + SPE_Magazines[] = { + "SPE_5Rnd_762x63", + "SPE_5Rnd_762x63_M1", + "SPE_5Rnd_762x63_M2_AP", + "SPE_5Rnd_762x63_t" + }; + }; + + class CBA_3006_BAR { + SPE_Magazines[] = { + "SPE_20Rnd_762x63", + "SPE_20Rnd_762x63_M1", + "SPE_20Rnd_762x63_M2_AP" + }; + }; + + class CBA_3006_Belt { + SPE_Magazines[] = { + "SPE_50Rnd_762x63", + "SPE_50Rnd_762x63_M1", + "SPE_50Rnd_762x63_M2_AP", + "SPE_50Rnd_762x63_Tracer", + "SPE_100Rnd_762x63", + "SPE_100Rnd_762x63_M1", + "SPE_100Rnd_762x63_M2_AP", + "SPE_100Rnd_762x63_Tracer" + }; + }; + + class CBA_792x57_K98 { + SPE_Magazines[] = { + "SPE_5Rnd_792x57", + "SPE_5Rnd_792x57_SMK", + "SPE_5Rnd_792x57_sS", + "SPE_5Rnd_792x57_t" + }; + }; + + class CBA_792x57_G43 { + SPE_Magazines[] = { + "SPE_10Rnd_792x57", + "SPE_10Rnd_792x57_SMK", + "SPE_10Rnd_792x57_sS", + "SPE_10Rnd_792x57_T", + "SPE_10Rnd_792x57_T2" + }; + }; + + class CBA_792x57_LINKS { + SPE_Magazines[] = { + "SPE_50Rnd_792x57", + "SPE_50Rnd_792x57_SMK", + "SPE_50Rnd_792x57_sS", + "SPE_50Rnd_792x57_Tracer", + "SPE_100Rnd_792x57", + "SPE_100Rnd_792x57_sS", + "SPE_100Rnd_792x57_SMK", + "SPE_100Rnd_792x57_Tracer" + }; + }; + +}; diff --git a/addons/jam/jam_spe/CfgWeapons.hpp b/addons/jam/jam_spe/CfgWeapons.hpp new file mode 100644 index 000000000..920081dd2 --- /dev/null +++ b/addons/jam/jam_spe/CfgWeapons.hpp @@ -0,0 +1,81 @@ +class CfgWeapons { + + class SPE_RIFLE; + + class SPE_K98: SPE_RIFLE { + magazineWell[] += {"CBA_792x57_K98"}; + }; + + class SPE_G43: SPE_RIFLE { + magazineWell[] += {"CBA_792x57_G43"}; + }; + + class SPE_M1_Carbine: SPE_RIFLE { + magazineWell[] += {"CBA_30Carbine_M1Carbine"}; + }; + + class SPE_M1_Garand: SPE_RIFLE { + magazineWell[] += {"CBA_30Carbine_M1Carbine"}; + }; + + class SPE_M1903A3_Springfield: SPE_RIFLE { + magazineWell[] += {"CBA_3006_Garand"}; + }; + + class SPE_STG44: SPE_RIFLE { + magazineWell[] += {"CBA_792x33_StG"}; + }; + + class SPE_SRIFLE; + + class SPE_K98ZF39: SPE_SRIFLE { + magazineWell[] += {"CBA_3006_Spring"}; + }; + + class SPE_LMG; + + class SPE_M1918A2_BAR: SPE_LMG { + magazineWell[] += {"CBA_3006_BAR"}; + }; + + class SPE_M1919A4: SPE_LMG { + magazineWell[] += {"CBA_3006_Belt"}; + }; + + class SPE_MG34: SPE_LMG { + magazineWell[] += {"CBA_792x57_LINKS"}; + }; + + class SPE_MG42: SPE_LMG { + magazineWell[] += {"CBA_792x57_LINKS"}; + }; + + class SPE_SMG; + + class SPE_M1A1_Thompson: SPE_SMG { + magazineWell[] += {"CBA_45ACP_Thompson_Stick", "CBA_45ACP_Thompson_Drum"}; + }; + + class SPE_M3_GreaseGun: SPE_SMG { + magazineWell[] += {"CBA_45ACP_Grease"}; + }; + + class SPE_MP40: SPE_SMG { + magazineWell[] += {"CBA_9x19_MP40"}; + }; + + class SPE_Sten_Mk2: SPE_SMG { + magazineWell[] += {"CBA_9x19_STEN"}; + }; + + class SPE_PISTOL; + + class SPE_M1911: SPE_PISTOL { + magazineWell[] += {"CBA_45ACP_1911"}; + }; + + class SPE_P08: SPE_PISTOL { + magazineWell[] += {"CBA_9x19_P08"}; + }; + +}; diff --git a/addons/jam/jam_spe/config.cpp b/addons/jam/jam_spe/config.cpp new file mode 100644 index 000000000..ac2b3e497 --- /dev/null +++ b/addons/jam/jam_spe/config.cpp @@ -0,0 +1,22 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = ECSTRING(jam,component); + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "cba_jam", + "WW2_SPE_Core_c_ZZZ_LastLoaded_c" + }; + author = "$STR_CBA_Author"; + authors[] = {}; + url = "$STR_CBA_URL"; + skipWhenMissingDependencies = 1; + VERSION_CONFIG; + }; +}; + +#include "CfgMagazineWells.hpp" +#include "CfgWeapons.hpp" diff --git a/addons/jam/jam_spe/script_component.hpp b/addons/jam/jam_spe/script_component.hpp new file mode 100644 index 000000000..af1281fa5 --- /dev/null +++ b/addons/jam/jam_spe/script_component.hpp @@ -0,0 +1,3 @@ +#define COMPONENT jam_spe +#include "\x\cba\addons\main\script_mod.hpp" +#include "\x\cba\addons\main\script_macros.hpp"