From a2be42ba57ed2f41403de46bdc2baa9f914d6605 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Tue, 13 Aug 2024 13:28:24 +0200 Subject: [PATCH] Realistic Names - Add optics & vehicles compats (#10201) Add optics & vehicles compats to realistic names --- addons/realisticnames/Attachments.hpp | 24 ---------- addons/realisticnames/CfgWeapons.hpp | 39 ---------------- .../compat_optics/CfgWeapons.hpp | 33 ++++++++++++++ .../realisticnames/compat_optics/config.cpp | 21 +++++++++ .../compat_optics/script_component.hpp | 3 ++ .../compat_vehicles/CfgWeapons.hpp | 45 +++++++++++++++++++ .../realisticnames/compat_vehicles/config.cpp | 21 +++++++++ .../compat_vehicles/script_component.hpp | 3 ++ 8 files changed, 126 insertions(+), 63 deletions(-) create mode 100644 addons/realisticnames/compat_optics/CfgWeapons.hpp create mode 100644 addons/realisticnames/compat_optics/config.cpp create mode 100644 addons/realisticnames/compat_optics/script_component.hpp create mode 100644 addons/realisticnames/compat_vehicles/CfgWeapons.hpp create mode 100644 addons/realisticnames/compat_vehicles/config.cpp create mode 100644 addons/realisticnames/compat_vehicles/script_component.hpp diff --git a/addons/realisticnames/Attachments.hpp b/addons/realisticnames/Attachments.hpp index a861bb4a04..84b9bcaebf 100644 --- a/addons/realisticnames/Attachments.hpp +++ b/addons/realisticnames/Attachments.hpp @@ -19,12 +19,6 @@ class optic_Hamr: ItemCore { class optic_Hamr_khk_F: optic_Hamr { displayName = CSTRING(optic_hamr_khk); }; -class ACE_optic_Hamr_2D: optic_Hamr { - displayName = CSTRING(optic_hamr_2d); -}; -class ACE_optic_Hamr_PIP: ACE_optic_Hamr_2D { - displayName = CSTRING(optic_hamr_pip); -}; class optic_Arco: ItemCore { displayName = CSTRING(optic_arco); @@ -35,12 +29,6 @@ class optic_Arco_blk_F: optic_Arco { class optic_Arco_ghex_F: optic_Arco { displayName = CSTRING(optic_arco_ghex); }; -class ACE_optic_Arco_2D: optic_Arco { - displayName = CSTRING(optic_arco_2d); -}; -class ACE_optic_Arco_PIP: ACE_optic_Arco_2D { - displayName = CSTRING(optic_arco_pip); -}; class optic_Arco_lush_F: optic_Arco { displayName = CSTRING(optic_arco_lush); }; @@ -76,12 +64,6 @@ class optic_LRPS_ghex_F: optic_LRPS { class optic_LRPS_tna_F: optic_LRPS { displayName = CSTRING(optic_lrps_tna); }; -class ACE_optic_LRPS_2D: optic_LRPS { - displayName = CSTRING(optic_lrps_2d); -}; -class ACE_optic_LRPS_PIP: ACE_optic_LRPS_2D { - displayName = CSTRING(optic_lrps_pip); -}; class optic_AMS_base; class optic_AMS: optic_AMS_base { @@ -149,12 +131,6 @@ class optic_Holosight_smg_khk_F: optic_Holosight_smg { class optic_MRCO: ItemCore { displayName = CSTRING(optic_MRCO); }; -class ACE_optic_MRCO_2D: optic_MRCO { - displayName = CSTRING(optic_MRCO_2d); -}; -class ACE_optic_MRCO_PIP: ACE_optic_MRCO_2D { - displayName = CSTRING(optic_MRCO_pip); -}; class optic_Yorris: ItemCore { displayName = CSTRING(optic_Yorris); diff --git a/addons/realisticnames/CfgWeapons.hpp b/addons/realisticnames/CfgWeapons.hpp index 5b0e33e98c..dfe5e6525e 100644 --- a/addons/realisticnames/CfgWeapons.hpp +++ b/addons/realisticnames/CfgWeapons.hpp @@ -532,11 +532,6 @@ class CfgWeapons { }; }; - class HMG_127_APC: HMG_127 {}; - class ACE_HMG_127_KORD: HMG_127_APC { - displayName = "6P49 Kord"; - }; - class HMG_01: HMG_127 { displayName = "XM312"; }; @@ -605,10 +600,6 @@ class CfgWeapons { class player: player {}; }; - class ACE_cannon_120mm_GT12: cannon_120mm { - displayName = "GT12"; - }; - class cannon_105mm: CannonCore { displayName = "M68"; class player: Mode_SemiAuto { @@ -628,22 +619,6 @@ class CfgWeapons { class LMG_coax: LMG_RCWS { displayName = "PKT"; }; - class LMG_coax_ext: LMG_coax {}; - class ACE_LMG_coax_ext_MAG58: LMG_coax_ext { - displayName = "MAG 58M"; - }; - class ACE_LMG_coax_MAG58_mem3: LMG_coax { - displayName = "MAG 58M"; - }; - class ACE_LMG_coax_L94A1_mem3: LMG_coax { - displayName = "L94A1"; - }; - class ACE_LMG_coax_ext_MG3: LMG_coax_ext { - displayName = "Rheinmetall MG3"; - }; - class ACE_LMG_coax_DenelMG4: LMG_coax { - displayName = "Denel MG4"; - }; // more autocannons class autocannon_Base_F; @@ -694,20 +669,6 @@ class CfgWeapons { displayName = "2A42"; }; - class cannon_20mm: autocannon_Base_F { - class AP: autocannon_Base_F {}; - class HE: autocannon_Base_F {}; - }; - class ACE_cannon_20mm_Rh202: cannon_20mm { - displayName = "MK20 Rh 202"; - class AP: AP { - displayName = "MK20 Rh 202"; - }; - class HE: HE { - displayName = "MK20 Rh 202"; - }; - }; - // APEX/Tanoa // Type 115 diff --git a/addons/realisticnames/compat_optics/CfgWeapons.hpp b/addons/realisticnames/compat_optics/CfgWeapons.hpp new file mode 100644 index 0000000000..6ffd6484b2 --- /dev/null +++ b/addons/realisticnames/compat_optics/CfgWeapons.hpp @@ -0,0 +1,33 @@ +class CfgWeapons { + class optic_Hamr; + class ACE_optic_Hamr_2D: optic_Hamr { + displayName = CSTRING(optic_hamr_2d); + }; + class ACE_optic_Hamr_PIP: ACE_optic_Hamr_2D { + displayName = CSTRING(optic_hamr_pip); + }; + + class optic_Arco; + class ACE_optic_Arco_2D: optic_Arco { + displayName = CSTRING(optic_arco_2d); + }; + class ACE_optic_Arco_PIP: ACE_optic_Arco_2D { + displayName = CSTRING(optic_arco_pip); + }; + + class optic_LRPS; + class ACE_optic_LRPS_2D: optic_LRPS { + displayName = CSTRING(optic_lrps_2d); + }; + class ACE_optic_LRPS_PIP: ACE_optic_LRPS_2D { + displayName = CSTRING(optic_lrps_pip); + }; + + class optic_MRCO; + class ACE_optic_MRCO_2D: optic_MRCO { + displayName = CSTRING(optic_MRCO_2d); + }; + class ACE_optic_MRCO_PIP: ACE_optic_MRCO_2D { + displayName = CSTRING(optic_MRCO_pip); + }; +}; diff --git a/addons/realisticnames/compat_optics/config.cpp b/addons/realisticnames/compat_optics/config.cpp new file mode 100644 index 0000000000..32d2795dd9 --- /dev/null +++ b/addons/realisticnames/compat_optics/config.cpp @@ -0,0 +1,21 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {QUOTE(ADDON), "ace_optics"}; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + + // this prevents any patched class from requiring this addon + addonRootClass = "A3_Characters_F"; + }; +}; + +#include "CfgWeapons.hpp" diff --git a/addons/realisticnames/compat_optics/script_component.hpp b/addons/realisticnames/compat_optics/script_component.hpp new file mode 100644 index 0000000000..b90538fc4e --- /dev/null +++ b/addons/realisticnames/compat_optics/script_component.hpp @@ -0,0 +1,3 @@ +#define SUBCOMPONENT optics +#define SUBCOMPONENT_BEAUTIFIED Optics +#include "..\script_component.hpp" diff --git a/addons/realisticnames/compat_vehicles/CfgWeapons.hpp b/addons/realisticnames/compat_vehicles/CfgWeapons.hpp new file mode 100644 index 0000000000..c49ae26bcb --- /dev/null +++ b/addons/realisticnames/compat_vehicles/CfgWeapons.hpp @@ -0,0 +1,45 @@ +class CfgWeapons { + class HMG_127_APC; + class ACE_HMG_127_KORD: HMG_127_APC { + displayName = "6P49 Kord"; + }; + + class cannon_120mm; + class ACE_cannon_120mm_GT12: cannon_120mm { + displayName = "GT12"; + }; + + class LMG_coax_ext; + class ACE_LMG_coax_ext_MG3: LMG_coax_ext { + displayName = "Rheinmetall MG3"; + }; + class ACE_LMG_coax_ext_MAG58: LMG_coax_ext { + displayName = "MAG 58M"; + }; + + class LMG_coax; + class ACE_LMG_coax_MAG58_mem3: LMG_coax { + displayName = "MAG 58M"; + }; + class ACE_LMG_coax_L94A1_mem3: LMG_coax { + displayName = "L94A1"; + }; + class ACE_LMG_coax_DenelMG4: LMG_coax { + displayName = "Denel MG4"; + }; + + class autocannon_Base_F; + class cannon_20mm: autocannon_Base_F { + class AP: autocannon_Base_F {}; + class HE: autocannon_Base_F {}; + }; + class ACE_cannon_20mm_Rh202: cannon_20mm { + displayName = "MK20 Rh 202"; + class AP: AP { + displayName = "MK20 Rh 202"; + }; + class HE: HE { + displayName = "MK20 Rh 202"; + }; + }; +}; diff --git a/addons/realisticnames/compat_vehicles/config.cpp b/addons/realisticnames/compat_vehicles/config.cpp new file mode 100644 index 0000000000..846c92a0ee --- /dev/null +++ b/addons/realisticnames/compat_vehicles/config.cpp @@ -0,0 +1,21 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {QUOTE(ADDON), "ace_vehicles"}; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + + // this prevents any patched class from requiring this addon + addonRootClass = "A3_Characters_F"; + }; +}; + +#include "CfgWeapons.hpp" diff --git a/addons/realisticnames/compat_vehicles/script_component.hpp b/addons/realisticnames/compat_vehicles/script_component.hpp new file mode 100644 index 0000000000..17370c415f --- /dev/null +++ b/addons/realisticnames/compat_vehicles/script_component.hpp @@ -0,0 +1,3 @@ +#define SUBCOMPONENT vehicles +#define SUBCOMPONENT_BEAUTIFIED Vehicles +#include "..\script_component.hpp"