From 8b778b85025a95ef56ea836e05aca4e1abc0c55e Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 13 Nov 2024 16:54:44 -0600 Subject: [PATCH] refactor to customGear --- addons/customGear/CfgWeapons.hpp | 83 ------------------ addons/customGear/config.hpp | 5 +- addons/customGear/fauxC7/CfgWeapons.hpp | 84 +++++++++++++++++++ addons/customGear/fauxC7/config.cpp | 18 ++++ .../fauxLAMG/CfgWeapons.hpp | 0 .../fauxLAMG/config.cpp | 4 +- .../miscFixes/fauxLAMG/script_component.hpp | 12 --- 7 files changed, 107 insertions(+), 99 deletions(-) create mode 100644 addons/customGear/fauxC7/CfgWeapons.hpp create mode 100644 addons/customGear/fauxC7/config.cpp rename addons/{miscFixes => customGear}/fauxLAMG/CfgWeapons.hpp (100%) rename addons/{miscFixes => customGear}/fauxLAMG/config.cpp (83%) delete mode 100644 addons/miscFixes/fauxLAMG/script_component.hpp diff --git a/addons/customGear/CfgWeapons.hpp b/addons/customGear/CfgWeapons.hpp index 4434aad8..e04bee05 100644 --- a/addons/customGear/CfgWeapons.hpp +++ b/addons/customGear/CfgWeapons.hpp @@ -1,87 +1,4 @@ -class Mode_FullAuto; class CfgWeapons { - // Adds C7, C7GL, and C7A2, C7A2 - class CUP_arifle_M16A1E1; - class potato_fauxC7_c7: CUP_arifle_M16A1E1 { - author = "Potato"; - displayName = "C7"; - modes[] = {"Single","FullAuto","Burst_medium","single_medium_optics1","single_medium_optics2"}; - class FullAuto: Mode_FullAuto { - class BaseSoundModeType; - class StandardSound: BaseSoundModeType { - soundsetshot[] = {"jsrs_m16a4_shot_soundset","jsrs_5x56mm_reverb_soundset"}; - }; - class SilencedSound: BaseSoundModeType { - soundsetshot[] = {"jsrs_spar_shot_silenced_soundset","jsrs_5x56mm_sd_reverb_soundset"}; - }; - soundBurst = 0; - ffCount = 3; - dispersion = 0.0006; - reloadTime = 0.075; - minRange = 1; - minRangeProbab = 0.2; - midRange = 100; - midRangeProbab = 0.7; - maxRange = 300; - maxRangeProbab = 0.05; - }; - }; - class CUP_arifle_M16A1GL; - class potato_fauxC7_c7GL: CUP_arifle_M16A1GL { - author = "Potato"; - displayName = "C7 M203"; - }; - class CUP_arifle_M16A4_Base; - class potato_fauxC7_c7a2: CUP_arifle_M16A4_Base { - author = "Potato"; - displayName = "C7A2"; - modes[] = {"Single","FullAuto","Burst_medium","single_medium_optics1","single_medium_optics2"}; - class FullAuto: Mode_FullAuto { - class BaseSoundModeType; - class StandardSound: BaseSoundModeType { - soundsetshot[] = {"jsrs_m16a4_shot_soundset","jsrs_5x56mm_reverb_soundset"}; - }; - class SilencedSound: BaseSoundModeType { - soundsetshot[] = {"jsrs_spar_shot_silenced_soundset","jsrs_5x56mm_sd_reverb_soundset"}; - }; - soundBurst = 0; - ffCount = 3; - dispersion = 0.0006; - reloadTime = 0.075; - minRange = 1; - minRangeProbab = 0.2; - midRange = 100; - midRangeProbab = 0.7; - maxRange = 300; - maxRangeProbab = 0.05; - }; - }; - class CUP_arifle_M16A4_GL; - class potato_fauxC7_c7a2GL: CUP_arifle_M16A4_GL { - author = "Potato"; - displayName = "C7A2 M203"; - modes[] = {"Single","FullAuto","Burst_medium","single_medium_optics1","single_medium_optics2"}; - class FullAuto: Mode_FullAuto { - class BaseSoundModeType; - class StandardSound: BaseSoundModeType { - soundsetshot[] = {"jsrs_m16a4_shot_soundset","jsrs_5x56mm_reverb_soundset"}; - }; - class SilencedSound: BaseSoundModeType { - soundsetshot[] = {"jsrs_spar_shot_silenced_soundset","jsrs_5x56mm_sd_reverb_soundset"}; - }; - soundBurst = 0; - ffCount = 3; - dispersion = 0.0006; - reloadTime = 0.075; - minRange = 1; - minRangeProbab = 0.2; - midRange = 100; - midRangeProbab = 0.7; - maxRange = 300; - maxRangeProbab = 0.05; - }; - }; - // Adds MG5 in 7.62x51mm class MMG_01_tan_F; class potato_fauxMG5_MG5: MMG_01_tan_F { diff --git a/addons/customGear/config.hpp b/addons/customGear/config.hpp index f4395501..2cdd313d 100644 --- a/addons/customGear/config.hpp +++ b/addons/customGear/config.hpp @@ -3,15 +3,14 @@ class CfgPatches { class ADDON { units[] = {}; - weapons[] = { "potato_fauxC7_c7", "potato_fauxC7_c7GL", "potato_fauxC7_c7a2", "potato_fauxC7_c7a2GL", "potato_fauxMG5_MG5" }; - magazines[] = {}; + weapons[] = { "potato_fauxMG5_MG5" }; requiredVersion = REQUIRED_VERSION; requiredAddons[] = { "potato_core" }; author = "Potato"; - authors[] = {"PabstMirror", "AACO"}; authorUrl = "https://github.com/BourbonWarfare/POTATO"; VERSION_CONFIG; }; }; +#include "CfgWeapons.hpp" #include "CfgVehicles.hpp" \ No newline at end of file diff --git a/addons/customGear/fauxC7/CfgWeapons.hpp b/addons/customGear/fauxC7/CfgWeapons.hpp new file mode 100644 index 00000000..92d1ae82 --- /dev/null +++ b/addons/customGear/fauxC7/CfgWeapons.hpp @@ -0,0 +1,84 @@ +class Mode_FullAuto; +class CfgWeapons { + // Adds C7, C7GL, and C7A2, C7A2 + class CUP_arifle_M16A1E1; + class potato_fauxC7_c7: CUP_arifle_M16A1E1 { + author = "Potato"; + displayName = "C7"; + modes[] = {"Single","FullAuto","Burst_medium","single_medium_optics1","single_medium_optics2"}; + class FullAuto: Mode_FullAuto { + class BaseSoundModeType; + class StandardSound: BaseSoundModeType { + soundsetshot[] = {"jsrs_m16a4_shot_soundset","jsrs_5x56mm_reverb_soundset"}; + }; + class SilencedSound: BaseSoundModeType { + soundsetshot[] = {"jsrs_spar_shot_silenced_soundset","jsrs_5x56mm_sd_reverb_soundset"}; + }; + soundBurst = 0; + ffCount = 3; + dispersion = 0.0006; + reloadTime = 0.075; + minRange = 1; + minRangeProbab = 0.2; + midRange = 100; + midRangeProbab = 0.7; + maxRange = 300; + maxRangeProbab = 0.05; + }; + }; + class CUP_arifle_M16A1GL; + class potato_fauxC7_c7GL: CUP_arifle_M16A1GL { + author = "Potato"; + displayName = "C7 M203"; + }; + class CUP_arifle_M16A4_Base; + class potato_fauxC7_c7a2: CUP_arifle_M16A4_Base { + author = "Potato"; + displayName = "C7A2"; + modes[] = {"Single","FullAuto","Burst_medium","single_medium_optics1","single_medium_optics2"}; + class FullAuto: Mode_FullAuto { + class BaseSoundModeType; + class StandardSound: BaseSoundModeType { + soundsetshot[] = {"jsrs_m16a4_shot_soundset","jsrs_5x56mm_reverb_soundset"}; + }; + class SilencedSound: BaseSoundModeType { + soundsetshot[] = {"jsrs_spar_shot_silenced_soundset","jsrs_5x56mm_sd_reverb_soundset"}; + }; + soundBurst = 0; + ffCount = 3; + dispersion = 0.0006; + reloadTime = 0.075; + minRange = 1; + minRangeProbab = 0.2; + midRange = 100; + midRangeProbab = 0.7; + maxRange = 300; + maxRangeProbab = 0.05; + }; + }; + class CUP_arifle_M16A4_GL; + class potato_fauxC7_c7a2GL: CUP_arifle_M16A4_GL { + author = "Potato"; + displayName = "C7A2 M203"; + modes[] = {"Single","FullAuto","Burst_medium","single_medium_optics1","single_medium_optics2"}; + class FullAuto: Mode_FullAuto { + class BaseSoundModeType; + class StandardSound: BaseSoundModeType { + soundsetshot[] = {"jsrs_m16a4_shot_soundset","jsrs_5x56mm_reverb_soundset"}; + }; + class SilencedSound: BaseSoundModeType { + soundsetshot[] = {"jsrs_spar_shot_silenced_soundset","jsrs_5x56mm_sd_reverb_soundset"}; + }; + soundBurst = 0; + ffCount = 3; + dispersion = 0.0006; + reloadTime = 0.075; + minRange = 1; + minRangeProbab = 0.2; + midRange = 100; + midRangeProbab = 0.7; + maxRange = 300; + maxRangeProbab = 0.05; + }; + }; +}; diff --git a/addons/customGear/fauxC7/config.cpp b/addons/customGear/fauxC7/config.cpp new file mode 100644 index 00000000..35a68ce7 --- /dev/null +++ b/addons/customGear/fauxC7/config.cpp @@ -0,0 +1,18 @@ +#include "\z\potato\addons\customGear\script_component.hpp" +#undef COMPONENT +#define COMPONENT customGear_fauxC7 + + +class CfgPatches { + class ADDON { + weapons[] = { "potato_fauxC7_c7", "potato_fauxC7_c7GL", "potato_fauxC7_c7a2", "potato_fauxC7_c7a2GL" }; + units[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"potato_core", "CUP_Weapons_LoadOrder", "jsrs_soundmod_cup_weapons"}; + skipWhenMissingDependencies = 1; + author = "Potato"; + authors[] = {"AChesheireCat"}; + authorUrl = "https://github.com/BourbonWarfare/POTATO"; + VERSION_CONFIG; + }; +}; diff --git a/addons/miscFixes/fauxLAMG/CfgWeapons.hpp b/addons/customGear/fauxLAMG/CfgWeapons.hpp similarity index 100% rename from addons/miscFixes/fauxLAMG/CfgWeapons.hpp rename to addons/customGear/fauxLAMG/CfgWeapons.hpp diff --git a/addons/miscFixes/fauxLAMG/config.cpp b/addons/customGear/fauxLAMG/config.cpp similarity index 83% rename from addons/miscFixes/fauxLAMG/config.cpp rename to addons/customGear/fauxLAMG/config.cpp index fda66de4..bf7b7fda 100644 --- a/addons/miscFixes/fauxLAMG/config.cpp +++ b/addons/customGear/fauxLAMG/config.cpp @@ -1,4 +1,6 @@ -#include "script_component.hpp" +#include "\z\potato\addons\customGear\script_component.hpp" +#undef COMPONENT +#define COMPONENT customGear_fauxLAMG class CfgPatches { class ADDON { diff --git a/addons/miscFixes/fauxLAMG/script_component.hpp b/addons/miscFixes/fauxLAMG/script_component.hpp deleted file mode 100644 index d83aae48..00000000 --- a/addons/miscFixes/fauxLAMG/script_component.hpp +++ /dev/null @@ -1,12 +0,0 @@ -#define COMPONENT fauxLAMG -#include "\z\potato\addons\core\script_mod.hpp" - -// #define DEBUG_MODE_FULL -// #define DISABLE_COMPILE_CACHE -// #define ENABLE_PERFORMANCE_COUNTERS - -#ifdef DEBUG_ENABLED_FAUXLAMG - #define DEBUG_MODE_FULL -#endif - -#include "\z\potato\addons\core\script_macros.hpp" \ No newline at end of file