From 36f818c8f0259c33105a8d658477bc5a3c57ca5f Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Mon, 13 Jan 2025 13:10:47 -0800 Subject: [PATCH] Compat GM - Remove `ace_hearing` hard dependency (#10653) --- addons/compat_gm/CfgWeapons.hpp | 124 ----------------- .../compat_gm_hearing/CfgWeapons.hpp | 125 ++++++++++++++++++ addons/compat_gm/compat_gm_hearing/config.cpp | 23 ++++ .../compat_gm_hearing/script_component.hpp | 3 + addons/compat_gm/config.cpp | 3 - .../compat_spe_hearing/CfgWeapons.hpp | 1 - 6 files changed, 151 insertions(+), 128 deletions(-) create mode 100644 addons/compat_gm/compat_gm_hearing/CfgWeapons.hpp create mode 100644 addons/compat_gm/compat_gm_hearing/config.cpp create mode 100644 addons/compat_gm/compat_gm_hearing/script_component.hpp diff --git a/addons/compat_gm/CfgWeapons.hpp b/addons/compat_gm/CfgWeapons.hpp index d144c445900..0f3b8151ab6 100644 --- a/addons/compat_gm/CfgWeapons.hpp +++ b/addons/compat_gm/CfgWeapons.hpp @@ -54,128 +54,4 @@ class CfgWeapons { class gm_p2a1_base: gm_pistol_base { EGVAR(overheating,jamTypesAllowed)[] = {"Fire", "Dud"}; }; - - // HELMETS - class gm_ge_headgear_headset_crew_base; - class gm_ge_headgear_headset_crew_oli: gm_ge_headgear_headset_crew_base { - HEARING_PROTECTION_PELTOR; - }; - - class gm_ge_headgear_sph4_base; - class gm_ge_headgear_sph4_oli: gm_ge_headgear_sph4_base { - HEARING_PROTECTION_PELTOR; - }; - - class gm_pl_headgear_wz63_base; - class gm_pl_army_headgear_wz63_oli: gm_pl_headgear_wz63_base { - HEARING_PROTECTION_PELTOR; - }; - class gm_pl_army_headgear_wz63_net_oli: gm_pl_headgear_wz63_base { - HEARING_PROTECTION_PELTOR; - }; - - class gm_ge_headgear_crewhat_80_base; - class gm_ge_headgear_crewhat_80_blk: gm_ge_headgear_crewhat_80_base { - HEARING_PROTECTION_PELTOR; - }; - - class gm_gc_headgear_crewhat_80_base; - class gm_gc_army_headgear_crewhat_80_blk: gm_gc_headgear_crewhat_80_base { - HEARING_PROTECTION_PELTOR; - }; - - class gm_gc_headgear_zsh3_base; - class gm_gc_headgear_zsh3_wht: gm_gc_headgear_zsh3_base { - HEARING_PROTECTION_PELTOR; - }; - class gm_gc_headgear_zsh3_blu: gm_gc_headgear_zsh3_base { - HEARING_PROTECTION_PELTOR; - }; - class gm_gc_headgear_zsh3_orn: gm_gc_headgear_zsh3_base { - HEARING_PROTECTION_PELTOR; - }; - - class gm_ge_headgear_beret_crew_base; - class gm_ge_headgear_beret_crew_blk: gm_ge_headgear_beret_crew_base { - HEARING_PROTECTION_PELTOR; - }; - - class gm_ge_headgear_beret_crew_bdx; - class gm_ge_headgear_beret_crew_grn; - class gm_ge_headgear_beret_crew_red; - - class gm_ge_headgear_beret_crew_red_antiair: gm_ge_headgear_beret_crew_red { - HEARING_PROTECTION_PELTOR; - }; - class gm_ge_headgear_beret_crew_red_artillery: gm_ge_headgear_beret_crew_red { - HEARING_PROTECTION_PELTOR; - }; - class gm_ge_headgear_beret_crew_red_engineer: gm_ge_headgear_beret_crew_red { - HEARING_PROTECTION_PELTOR; - }; - class gm_ge_headgear_beret_crew_red_maintenance: gm_ge_headgear_beret_crew_red { - HEARING_PROTECTION_PELTOR; - }; - class gm_ge_headgear_beret_crew_grn_mechinf: gm_ge_headgear_beret_crew_grn { - HEARING_PROTECTION_PELTOR; - }; - class gm_ge_headgear_beret_crew_grn_infantry: gm_ge_headgear_beret_crew_grn { - HEARING_PROTECTION_PELTOR; - }; - class gm_ge_headgear_beret_crew_red_militarypolice: gm_ge_headgear_beret_crew_red { - HEARING_PROTECTION_PELTOR; - }; - class gm_ge_headgear_beret_crew_red_nbc: gm_ge_headgear_beret_crew_red { - HEARING_PROTECTION_PELTOR; - }; - class gm_ge_headgear_beret_crew_red_opcom: gm_ge_headgear_beret_crew_red { - HEARING_PROTECTION_PELTOR; - }; - class gm_ge_headgear_beret_crew_bdx_paratrooper: gm_ge_headgear_beret_crew_bdx { - HEARING_PROTECTION_PELTOR; - }; - class gm_ge_headgear_beret_crew_bdx_lrrp: gm_ge_headgear_beret_crew_bdx { - HEARING_PROTECTION_PELTOR; - }; - class gm_ge_headgear_beret_crew_red_supply: gm_ge_headgear_beret_crew_red { - HEARING_PROTECTION_PELTOR; - }; - class gm_ge_headgear_beret_crew_red_signals: gm_ge_headgear_beret_crew_red { - HEARING_PROTECTION_PELTOR; - }; - - class gm_ge_bgs_headgear_beret_crew_grn: gm_ge_headgear_beret_crew_grn { - HEARING_PROTECTION_PELTOR; - }; - class gm_ge_bgs_headgear_beret_crew_grn_sf: gm_ge_headgear_beret_crew_grn { - HEARING_PROTECTION_PELTOR; - }; - - class gm_ge_headgear_hat_beanie_base; - class gm_ge_headgear_hat_beanie_crew_blk: gm_ge_headgear_hat_beanie_base { - HEARING_PROTECTION_PELTOR; - }; - - class gm_xx_headgear_headwrap_01_base; - class gm_xx_headgear_headwrap_crew_01_oli: gm_xx_headgear_headwrap_01_base { - HEARING_PROTECTION_PELTOR; - }; - class gm_xx_headgear_headwrap_crew_01_m84: gm_xx_headgear_headwrap_01_base { - HEARING_PROTECTION_PELTOR; - }; - class gm_xx_headgear_headwrap_crew_01_grn: gm_xx_headgear_headwrap_01_base { - HEARING_PROTECTION_PELTOR; - }; - class gm_xx_headgear_headwrap_crew_01_smp: gm_xx_headgear_headwrap_01_base { - HEARING_PROTECTION_PELTOR; - }; - class gm_xx_headgear_headwrap_crew_01_blk: gm_xx_headgear_headwrap_01_base { - HEARING_PROTECTION_PELTOR; - }; - class gm_xx_headgear_headwrap_crew_01_flk: gm_xx_headgear_headwrap_01_base { - HEARING_PROTECTION_PELTOR; - }; - class gm_xx_headgear_headwrap_crew_01_trp: gm_xx_headgear_headwrap_01_base { - HEARING_PROTECTION_PELTOR; - }; }; diff --git a/addons/compat_gm/compat_gm_hearing/CfgWeapons.hpp b/addons/compat_gm/compat_gm_hearing/CfgWeapons.hpp new file mode 100644 index 00000000000..a15d9611010 --- /dev/null +++ b/addons/compat_gm/compat_gm_hearing/CfgWeapons.hpp @@ -0,0 +1,125 @@ +class CfgWeapons { + // HELMETS + class gm_ge_headgear_headset_crew_base; + class gm_ge_headgear_headset_crew_oli: gm_ge_headgear_headset_crew_base { + HEARING_PROTECTION_PELTOR; + }; + + class gm_ge_headgear_sph4_base; + class gm_ge_headgear_sph4_oli: gm_ge_headgear_sph4_base { + HEARING_PROTECTION_PELTOR; + }; + + class gm_pl_headgear_wz63_base; + class gm_pl_army_headgear_wz63_oli: gm_pl_headgear_wz63_base { + HEARING_PROTECTION_PELTOR; + }; + class gm_pl_army_headgear_wz63_net_oli: gm_pl_headgear_wz63_base { + HEARING_PROTECTION_PELTOR; + }; + + class gm_ge_headgear_crewhat_80_base; + class gm_ge_headgear_crewhat_80_blk: gm_ge_headgear_crewhat_80_base { + HEARING_PROTECTION_PELTOR; + }; + + class gm_gc_headgear_crewhat_80_base; + class gm_gc_army_headgear_crewhat_80_blk: gm_gc_headgear_crewhat_80_base { + HEARING_PROTECTION_PELTOR; + }; + + class gm_gc_headgear_zsh3_base; + class gm_gc_headgear_zsh3_wht: gm_gc_headgear_zsh3_base { + HEARING_PROTECTION_PELTOR; + }; + class gm_gc_headgear_zsh3_blu: gm_gc_headgear_zsh3_base { + HEARING_PROTECTION_PELTOR; + }; + class gm_gc_headgear_zsh3_orn: gm_gc_headgear_zsh3_base { + HEARING_PROTECTION_PELTOR; + }; + + class gm_ge_headgear_beret_crew_base; + class gm_ge_headgear_beret_crew_blk: gm_ge_headgear_beret_crew_base { + HEARING_PROTECTION_PELTOR; + }; + + class gm_ge_headgear_beret_crew_bdx; + class gm_ge_headgear_beret_crew_grn; + class gm_ge_headgear_beret_crew_red; + + class gm_ge_headgear_beret_crew_red_antiair: gm_ge_headgear_beret_crew_red { + HEARING_PROTECTION_PELTOR; + }; + class gm_ge_headgear_beret_crew_red_artillery: gm_ge_headgear_beret_crew_red { + HEARING_PROTECTION_PELTOR; + }; + class gm_ge_headgear_beret_crew_red_engineer: gm_ge_headgear_beret_crew_red { + HEARING_PROTECTION_PELTOR; + }; + class gm_ge_headgear_beret_crew_red_maintenance: gm_ge_headgear_beret_crew_red { + HEARING_PROTECTION_PELTOR; + }; + class gm_ge_headgear_beret_crew_grn_mechinf: gm_ge_headgear_beret_crew_grn { + HEARING_PROTECTION_PELTOR; + }; + class gm_ge_headgear_beret_crew_grn_infantry: gm_ge_headgear_beret_crew_grn { + HEARING_PROTECTION_PELTOR; + }; + class gm_ge_headgear_beret_crew_red_militarypolice: gm_ge_headgear_beret_crew_red { + HEARING_PROTECTION_PELTOR; + }; + class gm_ge_headgear_beret_crew_red_nbc: gm_ge_headgear_beret_crew_red { + HEARING_PROTECTION_PELTOR; + }; + class gm_ge_headgear_beret_crew_red_opcom: gm_ge_headgear_beret_crew_red { + HEARING_PROTECTION_PELTOR; + }; + class gm_ge_headgear_beret_crew_bdx_paratrooper: gm_ge_headgear_beret_crew_bdx { + HEARING_PROTECTION_PELTOR; + }; + class gm_ge_headgear_beret_crew_bdx_lrrp: gm_ge_headgear_beret_crew_bdx { + HEARING_PROTECTION_PELTOR; + }; + class gm_ge_headgear_beret_crew_red_supply: gm_ge_headgear_beret_crew_red { + HEARING_PROTECTION_PELTOR; + }; + class gm_ge_headgear_beret_crew_red_signals: gm_ge_headgear_beret_crew_red { + HEARING_PROTECTION_PELTOR; + }; + + class gm_ge_bgs_headgear_beret_crew_grn: gm_ge_headgear_beret_crew_grn { + HEARING_PROTECTION_PELTOR; + }; + class gm_ge_bgs_headgear_beret_crew_grn_sf: gm_ge_headgear_beret_crew_grn { + HEARING_PROTECTION_PELTOR; + }; + + class gm_ge_headgear_hat_beanie_base; + class gm_ge_headgear_hat_beanie_crew_blk: gm_ge_headgear_hat_beanie_base { + HEARING_PROTECTION_PELTOR; + }; + + class gm_xx_headgear_headwrap_01_base; + class gm_xx_headgear_headwrap_crew_01_oli: gm_xx_headgear_headwrap_01_base { + HEARING_PROTECTION_PELTOR; + }; + class gm_xx_headgear_headwrap_crew_01_m84: gm_xx_headgear_headwrap_01_base { + HEARING_PROTECTION_PELTOR; + }; + class gm_xx_headgear_headwrap_crew_01_grn: gm_xx_headgear_headwrap_01_base { + HEARING_PROTECTION_PELTOR; + }; + class gm_xx_headgear_headwrap_crew_01_smp: gm_xx_headgear_headwrap_01_base { + HEARING_PROTECTION_PELTOR; + }; + class gm_xx_headgear_headwrap_crew_01_blk: gm_xx_headgear_headwrap_01_base { + HEARING_PROTECTION_PELTOR; + }; + class gm_xx_headgear_headwrap_crew_01_flk: gm_xx_headgear_headwrap_01_base { + HEARING_PROTECTION_PELTOR; + }; + class gm_xx_headgear_headwrap_crew_01_trp: gm_xx_headgear_headwrap_01_base { + HEARING_PROTECTION_PELTOR; + }; +}; diff --git a/addons/compat_gm/compat_gm_hearing/config.cpp b/addons/compat_gm/compat_gm_hearing/config.cpp new file mode 100644 index 00000000000..64ae8adcf8a --- /dev/null +++ b/addons/compat_gm/compat_gm_hearing/config.cpp @@ -0,0 +1,23 @@ +#include "script_component.hpp" +#include "\z\ace\addons\hearing\script_macros_hearingProtection.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "gm_core", + "ace_hearing" + }; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + url = ECSTRING(main,URL); + VERSION_CONFIG; + + addonRootClass = QUOTE(ADDON); + }; +}; + +#include "CfgWeapons.hpp" diff --git a/addons/compat_gm/compat_gm_hearing/script_component.hpp b/addons/compat_gm/compat_gm_hearing/script_component.hpp new file mode 100644 index 00000000000..8edb825af34 --- /dev/null +++ b/addons/compat_gm/compat_gm_hearing/script_component.hpp @@ -0,0 +1,3 @@ +#define SUBCOMPONENT hearing +#define SUBCOMPONENT_BEAUTIFIED Hearing +#include "..\script_component.hpp" diff --git a/addons/compat_gm/config.cpp b/addons/compat_gm/config.cpp index 3f00812dc1a..63f43635d59 100644 --- a/addons/compat_gm/config.cpp +++ b/addons/compat_gm/config.cpp @@ -1,7 +1,4 @@ #include "script_component.hpp" -#include "\z\ace\addons\csw\script_config_macros_csw.hpp" -#include "\z\ace\addons\hearing\script_macros_hearingProtection.hpp" - class CfgPatches { class ADDON { diff --git a/addons/compat_spe/compat_spe_hearing/CfgWeapons.hpp b/addons/compat_spe/compat_spe_hearing/CfgWeapons.hpp index a1e1fcc3b99..e494a6121bb 100644 --- a/addons/compat_spe/compat_spe_hearing/CfgWeapons.hpp +++ b/addons/compat_spe/compat_spe_hearing/CfgWeapons.hpp @@ -141,5 +141,4 @@ class CfgWeapons { class H_SPE_GER_ST_Tanker_Cap: H_SPE_GER_Fieldcap { HEARING_PROTECTION_EARMUFF; }; - };