From 91f4cf638c4951be818e3fa010bbc90714f37eb7 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Sun, 12 Jan 2025 16:20:40 +0100 Subject: [PATCH] Remove hearing hard dependency --- addons/compat_ef/CfgWeapons.hpp | 19 ------------------- .../compat_ef_hearing/CfgWeapons.hpp | 19 +++++++++++++++++++ addons/compat_ef/compat_ef_hearing/config.cpp | 19 +++++++++++++++++++ .../compat_ef_hearing/script_component.hpp | 3 +++ addons/compat_ef/config.cpp | 1 - 5 files changed, 41 insertions(+), 20 deletions(-) create mode 100644 addons/compat_ef/compat_ef_hearing/CfgWeapons.hpp create mode 100644 addons/compat_ef/compat_ef_hearing/config.cpp create mode 100644 addons/compat_ef/compat_ef_hearing/script_component.hpp diff --git a/addons/compat_ef/CfgWeapons.hpp b/addons/compat_ef/CfgWeapons.hpp index 1b2cd4c3fe5..33fa1c41d2d 100644 --- a/addons/compat_ef/CfgWeapons.hpp +++ b/addons/compat_ef/CfgWeapons.hpp @@ -7,25 +7,6 @@ class CfgWeapons { EGVAR(nightvision,border) = QPATHTOEF(nightvision,data\nvg_mask_binos_4096.paa); }; - // -- ace_hearing -- - class HelmetBase; - class EF_H_Protecta: HelmetBase { - HEARING_PROTECTION_PELTOR; - }; - class EF_H_MCH; // this does not have peltor - class EF_H_MCH_Basic: EF_H_MCH { - HEARING_PROTECTION_PELTOR; - }; - class EF_H_MCH_BasicNet_Des: EF_H_MCH { - HEARING_PROTECTION_PELTOR; - }; - class EF_H_MCH_Full: EF_H_MCH { - HEARING_PROTECTION_PELTOR; - }; - class EF_H_MCH_FullCamo_Des: EF_H_MCH { - HEARING_PROTECTION_PELTOR; - }; - // -- ace_overpressure -- class autocannon_30mm; class EF_autocannon_50mm_AAV9: autocannon_30mm { diff --git a/addons/compat_ef/compat_ef_hearing/CfgWeapons.hpp b/addons/compat_ef/compat_ef_hearing/CfgWeapons.hpp new file mode 100644 index 00000000000..ece1f54c252 --- /dev/null +++ b/addons/compat_ef/compat_ef_hearing/CfgWeapons.hpp @@ -0,0 +1,19 @@ +class CfgWeapons { + class HelmetBase; + class EF_H_Protecta: HelmetBase { + HEARING_PROTECTION_PELTOR; + }; + class EF_H_MCH; // this does not have peltor + class EF_H_MCH_Basic: EF_H_MCH { + HEARING_PROTECTION_PELTOR; + }; + class EF_H_MCH_BasicNet_Des: EF_H_MCH { + HEARING_PROTECTION_PELTOR; + }; + class EF_H_MCH_Full: EF_H_MCH { + HEARING_PROTECTION_PELTOR; + }; + class EF_H_MCH_FullCamo_Des: EF_H_MCH { + HEARING_PROTECTION_PELTOR; + }; +}; diff --git a/addons/compat_ef/compat_ef_hearing/config.cpp b/addons/compat_ef/compat_ef_hearing/config.cpp new file mode 100644 index 00000000000..c091a27c8fd --- /dev/null +++ b/addons/compat_ef/compat_ef_hearing/config.cpp @@ -0,0 +1,19 @@ +#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[] = {"EF_Weapons", "EF_Marines", "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_ef/compat_ef_hearing/script_component.hpp b/addons/compat_ef/compat_ef_hearing/script_component.hpp new file mode 100644 index 00000000000..8edb825af34 --- /dev/null +++ b/addons/compat_ef/compat_ef_hearing/script_component.hpp @@ -0,0 +1,3 @@ +#define SUBCOMPONENT hearing +#define SUBCOMPONENT_BEAUTIFIED Hearing +#include "..\script_component.hpp" diff --git a/addons/compat_ef/config.cpp b/addons/compat_ef/config.cpp index 9f701b7083f..0a8eea8c41c 100644 --- a/addons/compat_ef/config.cpp +++ b/addons/compat_ef/config.cpp @@ -1,5 +1,4 @@ #include "script_component.hpp" -#include "\z\ace\addons\hearing\script_macros_hearingProtection.hpp" class CfgPatches { class ADDON {