Skip to content

Commit

Permalink
Add magazine wells for SPE CDLC
Browse files Browse the repository at this point in the history
  • Loading branch information
Dahlgren committed Sep 7, 2023
1 parent 0796c26 commit ebd6c9e
Show file tree
Hide file tree
Showing 4 changed files with 236 additions and 0 deletions.
130 changes: 130 additions & 0 deletions addons/jam/jam_spe/CfgMagazineWells.hpp
Original file line number Diff line number Diff line change
@@ -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"
};
};

};
81 changes: 81 additions & 0 deletions addons/jam/jam_spe/CfgWeapons.hpp
Original file line number Diff line number Diff line change
@@ -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"};
};

};
22 changes: 22 additions & 0 deletions addons/jam/jam_spe/config.cpp
Original file line number Diff line number Diff line change
@@ -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"
3 changes: 3 additions & 0 deletions addons/jam/jam_spe/script_component.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#define COMPONENT jam_spe
#include "\x\cba\addons\main\script_mod.hpp"
#include "\x\cba\addons\main\script_macros.hpp"

0 comments on commit ebd6c9e

Please sign in to comment.