From d8900d6ddb459fda175af23847e5dec5af0fbeef Mon Sep 17 00:00:00 2001 From: OverlordZorn Date: Mon, 6 Jan 2025 01:21:10 +0100 Subject: [PATCH] more compats --- .../compat_sog_wardrobe/CfgWardrobe.hpp | 13 +- .../compat_sog_wardrobe/Facewear.hpp | 103 +++++++++++ .../compat_sog_wardrobe/Helmets.hpp | 171 ++++++++++++++++++ .../compat_sog_wardrobe/Pilothelmets.hpp | 63 ------- .../Uniforms.hpp | 67 ++++++- .../compat_sog_wardrobe_uniform_fix/readme.md | 5 + addons/wardrobe/Baseclass.hpp | 13 +- addons/wardrobe/config.cpp | 3 +- addons/wardrobe/stringtable.xml | 12 ++ 9 files changed, 382 insertions(+), 68 deletions(-) create mode 100644 addons/compat_sog/compat_sog_wardrobe/Facewear.hpp create mode 100644 addons/compat_sog/compat_sog_wardrobe/Helmets.hpp delete mode 100644 addons/compat_sog/compat_sog_wardrobe/Pilothelmets.hpp diff --git a/addons/compat_sog/compat_sog_wardrobe/CfgWardrobe.hpp b/addons/compat_sog/compat_sog_wardrobe/CfgWardrobe.hpp index 1516da1e51a..07abc3fea55 100644 --- a/addons/compat_sog/compat_sog_wardrobe/CfgWardrobe.hpp +++ b/addons/compat_sog/compat_sog_wardrobe/CfgWardrobe.hpp @@ -1,3 +1,5 @@ + + class EGVAR(wardrobe,base); class EGVAR(wardrobe,base_H_visor_up); @@ -6,14 +8,23 @@ class EGVAR(wardrobe,base_H_visor_down); class EGVAR(wardrobe,base_U_sleeves_up); class EGVAR(wardrobe,base_U_sleeves_down); +class EGVAR(wardrobe,base_H_goggles_on); +class EGVAR(wardrobe,base_H_goggles_off); + + + class CfgWeapons { // Base Classes class vn_b_headgear_base; class vn_o_headgear_base; - #include "Pilothelmets.hpp" + #include "Helmets.hpp" #include "Booniehats.hpp" #include "Uniforms_B.hpp" #include "Uniforms_O.hpp" }; + +class CfgGlasses { + #include "Facewear.hpp" +}; diff --git a/addons/compat_sog/compat_sog_wardrobe/Facewear.hpp b/addons/compat_sog/compat_sog_wardrobe/Facewear.hpp new file mode 100644 index 00000000000..a99810ffa00 --- /dev/null +++ b/addons/compat_sog/compat_sog_wardrobe/Facewear.hpp @@ -0,0 +1,103 @@ +// Common Base +class vn_glasses_base; + + +// Scarf +class vn_b_acc_rag_01: vn_glasses_base { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "vn_b_acc_rag_02" }; + }; +}; +class vn_b_acc_rag_02: vn_b_acc_rag_01 { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "vn_b_acc_rag_01" }; + }; +}; + + +// Towel +class vn_b_acc_towel_01: vn_b_acc_rag_02 { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "vn_b_acc_towel_02" }; + }; +}; +class vn_b_acc_towel_02: vn_b_acc_towel_01 { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "vn_b_acc_towel_01" }; + }; +}; + + +// Pilot Air Mask +class vn_b_acc_ms22001_01: vn_glasses_base { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "vn_b_acc_ms22001_02" }; + alternativeDisplayName = ECSTRING(wardrobe,maskOn); + }; +}; +class vn_b_acc_ms22001_02: vn_b_acc_ms22001_01 { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "vn_b_acc_ms22001_01" }; + alternativeDisplayName = ECSTRING(wardrobe,maskOff); + }; +}; + +// Bandana + Aviators +class vn_b_aviator: vn_glasses_base { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "vn_b_bandana_a" }; + components[] = {"vn_b_aviator"}; + }; +}; + +class vn_o_bandana_b: vn_glasses_base { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "vn_b_bandana_a" }; + components[] = {"vn_o_bandana_b"}; + }; +}; + +class vn_b_bandana_a: vn_o_bandana_b { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "vn_b_aviator", "vn_o_bandana_b" }; + components[] = {"vn_b_aviator", "vn_o_bandana_b"}; + }; +}; + + + +// US Combat Goggles, used by vn_b_helmet_m1_20_01 & vn_b_helmet_m1_20_02 +class vn_b_acc_goggles_01: vn_glasses_base { + class ace_wardrobe: EGVAR(wardrobe,base) { + components[] = {"vn_b_acc_goggles_01"}; + }; +}; + +// VN Pilot Glasses + Mask +// Pilot Mask +class vn_o_acc_km32_01: vn_glasses_base { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "vn_o_acc_goggles_03" }; + components[] = {"vn_o_acc_km32_01"}; + }; +}; +// VN Crew Goggles +class vn_o_acc_goggles_01: vn_glasses_base { + class ace_wardrobe: EGVAR(wardrobe,base) { + components[] = {"vn_o_acc_goggles_01"}; + }; +}; +// Goggles +class vn_o_acc_goggles_02: vn_glasses_base { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "vn_o_acc_goggles_03" }; + components[] = {"vn_o_acc_goggles_02"}; + }; +}; +// Goggles with Mask +class vn_o_acc_goggles_03: vn_glasses_base { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "vn_o_acc_km32_01", "vn_o_acc_goggles_02" }; + components[] = { "vn_o_acc_km32_01", "vn_o_acc_goggles_02"}; + }; +}; \ No newline at end of file diff --git a/addons/compat_sog/compat_sog_wardrobe/Helmets.hpp b/addons/compat_sog/compat_sog_wardrobe/Helmets.hpp new file mode 100644 index 00000000000..bc5af5b4e8a --- /dev/null +++ b/addons/compat_sog/compat_sog_wardrobe/Helmets.hpp @@ -0,0 +1,171 @@ +// CfgWeapons + + +// Macros +#define CN01(side,var1,var2) vn_##side##_helmet_##var1##_01_##var2 +#define CN02(side,var1,var2) vn_##side##_helmet_##var1##_02_##var2 + + +#define HELMET_VARIANT(side,var1,var2)\ +class CN01(side,var1,var2): base_class_up {\ + class ace_wardrobe: EGVAR(wardrobe,base_H_visor_up) {\ + modifiableTo[] = { QUOTE(CN02(side,var1,var2)) };\ + };\ +};\ +class CN02(side,var1,var2): base_class_dn {\ + class ace_wardrobe: EGVAR(wardrobe,base_H_visor_down) {\ + modifiableTo[] = { QUOTE(CN01(side,var1,var2)) };\ + };\ +}; + + +// Base classes in CfgWeapons.hpp + +// Parent Version aph6 & svh4 +#define base_class_up vn_b_headgear_base +#define base_class_dn vn_b_headgear_base +HELMET_VARIANT(b,aph6,01) +HELMET_VARIANT(b,svh4,01) + +// Child Version aph6 +#undef base_class_up +#undef base_class_dn +#define base_class_up CN01(b,aph6,01) +#define base_class_dn CN02(b,aph6,01) + +HELMET_VARIANT(b,aph6,02) +HELMET_VARIANT(b,aph6,03) +HELMET_VARIANT(b,aph6,04) +HELMET_VARIANT(b,aph6,05) + +// Child Version svh4 +#undef base_class_up +#undef base_class_dn +#define base_class_up CN01(b,svh4,01) +#define base_class_dn CN02(b,svh4,01) + +HELMET_VARIANT(b,svh4,02) +HELMET_VARIANT(b,svh4,03) +HELMET_VARIANT(b,svh4,04) +HELMET_VARIANT(b,svh4,05) +HELMET_VARIANT(b,svh4,06) + +// Special Case zsh3 +class vn_o_helmet_zsh3_01: vn_o_headgear_base { + class ace_wardrobe: EGVAR(wardrobe,base_H_visor_up) { + modifiableTo[] = { "vn_o_helmet_zsh3_02" }; + }; +}; +class vn_o_helmet_zsh3_02: vn_o_helmet_zsh3_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_visor_down) { + modifiableTo[] = { "vn_o_helmet_zsh3_01" }; + }; +}; + +// Helmets with/without Goggles +class vn_b_helmet_m1_01_01; +class vn_b_helmet_m1_14_01: vn_b_helmet_m1_01_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_off) { + modifiableTo[] = { "vn_b_helmet_m1_20_01" }; + }; +}; +class vn_b_helmet_m1_14_02: vn_b_helmet_m1_14_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_off) { + modifiableTo[] = { "vn_b_helmet_m1_20_02" }; + }; +}; + +class vn_b_helmet_m1_20_01 : vn_b_helmet_m1_14_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_on) { + modifiableTo[] = { "vn_b_helmet_m1_14_01" }; + components[] = {"vn_b_acc_goggles_01"}; + }; +}; +class vn_b_helmet_m1_20_02 : vn_b_helmet_m1_20_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_on) { + modifiableTo[] = { "vn_b_helmet_m1_14_02" }; + components[] = {"vn_b_acc_goggles_01"}; + }; +}; + + +//// VN Pilot Helmet +// With Goggles +class vn_o_helmet_shl61_01: vn_o_headgear_base { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_on) { + modifiableTo[] = { "vn_o_helmet_shl61_02" }; + components[] = {"vn_o_acc_goggles_02"}; + }; +}; +// Without Goggles +class vn_o_helmet_shl61_02: vn_o_helmet_shl61_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_off) { + modifiableTo[] = { "vn_o_helmet_shl61_01" }; + }; +}; + + +// US Vic Crew Helmets +class vn_b_helmet_t56_01_01: vn_b_headgear_base { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_off) { + modifiableTo[] = { "vn_b_helmet_t56_02_01" }; + }; +}; +class vn_b_helmet_t56_02_01: vn_b_helmet_t56_01_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_on) { + modifiableTo[] = { "vn_b_helmet_t56_01_01" }; + components[] = {"vn_b_acc_goggles_01"}; + }; +}; + +class vn_b_helmet_t56_01_02: vn_b_helmet_t56_01_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_off) { + modifiableTo[] = { "vn_b_helmet_t56_02_02" }; + }; +}; +class vn_b_helmet_t56_02_02: vn_b_helmet_t56_02_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_on) { + modifiableTo[] = { "vn_b_helmet_t56_01_02" }; + components[] = {"vn_b_acc_goggles_01"}; + }; +}; + +class vn_b_helmet_t56_01_03: vn_b_helmet_t56_01_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_off) { + modifiableTo[] = { "vn_b_helmet_t56_02_03" }; + }; +}; +class vn_b_helmet_t56_02_03: vn_b_helmet_t56_02_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_on) { + modifiableTo[] = { "vn_b_helmet_t56_01_03" }; + components[] = {"vn_b_acc_goggles_01"}; + }; +}; + + +// VN Vic Crew Helmet // 1 with goggles +// vn_o_acc_goggles_01 +class vn_o_helmet_tsh3_01: vn_o_headgear_base { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_on) { + modifiableTo[] = { "vn_o_helmet_tsh3_02" }; + components[] = {"vn_o_acc_goggles_01"}; + }; +}; +class vn_o_helmet_tsh3_02: vn_o_helmet_tsh3_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_off) { + modifiableTo[] = { "vn_o_helmet_tsh3_01" }; + }; +}; + +// VN Pith Helmet with Crew Goggles +class vn_o_helmet_nva_01: vn_o_headgear_base { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_off) { + modifiableTo[] = { "vn_o_helmet_nva_05" }; + }; +}; +class vn_o_helmet_nva_05: vn_o_helmet_nva_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_on) { + modifiableTo[] = { "vn_o_helmet_nva_01" }; + components[] = {"vn_o_acc_goggles_02"}; + }; +}; diff --git a/addons/compat_sog/compat_sog_wardrobe/Pilothelmets.hpp b/addons/compat_sog/compat_sog_wardrobe/Pilothelmets.hpp deleted file mode 100644 index d31d288e4b7..00000000000 --- a/addons/compat_sog/compat_sog_wardrobe/Pilothelmets.hpp +++ /dev/null @@ -1,63 +0,0 @@ -// CfgWeapons - - -// Macros -#define CN01(side,var1,var2) vn_##side##_helmet_##var1##_01_##var2 -#define CN02(side,var1,var2) vn_##side##_helmet_##var1##_02_##var2 - - -#define HELMET_VARIANT(side,var1,var2)\ -class CN01(side,var1,var2): base_class_up {\ - class ace_wardrobe: EGVAR(wardrobe,base_H_visor_up) {\ - modifiableTo[] = { QUOTE(CN02(side,var1,var2)) };\ - };\ -};\ -class CN02(side,var1,var2): base_class_dn {\ - class ace_wardrobe: EGVAR(wardrobe,base_H_visor_down) {\ - modifiableTo[] = { QUOTE(CN01(side,var1,var2)) };\ - };\ -}; - - -// Base classes in CfgWeapons.hpp - -// Parent Version aph6 & svh4 -#define base_class_up vn_b_headgear_base -#define base_class_dn vn_b_headgear_base -HELMET_VARIANT(b,aph6,01) -HELMET_VARIANT(b,svh4,01) - -// Child Version aph6 -#undef base_class_up -#undef base_class_dn -#define base_class_up CN01(b,aph6,01) -#define base_class_dn CN02(b,aph6,01) - -HELMET_VARIANT(b,aph6,02) -HELMET_VARIANT(b,aph6,03) -HELMET_VARIANT(b,aph6,04) -HELMET_VARIANT(b,aph6,05) - -// Child Version svh4 -#undef base_class_up -#undef base_class_dn -#define base_class_up CN01(b,svh4,01) -#define base_class_dn CN02(b,svh4,01) - -HELMET_VARIANT(b,svh4,02) -HELMET_VARIANT(b,svh4,03) -HELMET_VARIANT(b,svh4,04) -HELMET_VARIANT(b,svh4,05) -HELMET_VARIANT(b,svh4,06) - -// Special Case zsh3 -class vn_o_helmet_zsh3_01: vn_o_headgear_base { - class ace_wardrobe: EGVAR(wardrobe,base_H_visor_up) { - modifiableTo[] = { "vn_o_helmet_zsh3_02" }; - }; -}; -class vn_o_helmet_zsh3_02: vn_o_helmet_zsh3_01 { - class ace_wardrobe: EGVAR(wardrobe,base_H_visor_down) { - modifiableTo[] = { "vn_o_helmet_zsh3_01" }; - }; -}; diff --git a/addons/compat_sog/compat_sog_wardrobe_uniform_fix/Uniforms.hpp b/addons/compat_sog/compat_sog_wardrobe_uniform_fix/Uniforms.hpp index 10bc6521da1..c62a7c6f743 100644 --- a/addons/compat_sog/compat_sog_wardrobe_uniform_fix/Uniforms.hpp +++ b/addons/compat_sog/compat_sog_wardrobe_uniform_fix/Uniforms.hpp @@ -8,6 +8,11 @@ class className: vn_b_uniform_base {\ };\ }; +#define MASS(var)\ +class ItemInfo: ItemInfo {\ + mass = var;\ +}; + class CfgWeapons { class vn_b_uniform_base; @@ -21,4 +26,64 @@ class CfgWeapons { S_70(vn_b_uniform_macv_04_16) S_70(vn_b_uniform_macv_04_17) S_70(vn_b_uniform_macv_04_18) -}; \ No newline at end of file + + + //// US Headgear + // Helmets with Combat Goggles + class vn_b_helmet_m1_14_01; + + class vn_b_helmet_m1_20_01: vn_b_helmet_m1_14_01 { + MASS(12) + }; + class vn_b_helmet_m1_20_02: vn_b_helmet_m1_20_01 { + MASS(12) + }; + + // Crew Helmets with Goggles + class vn_b_helmet_t56_01_01; + class vn_b_helmet_t56_02_01: vn_b_helmet_t56_01_01 { + MASS(12) + }; + + class vn_b_helmet_t56_02_02: vn_b_helmet_t56_02_01 { + MASS(12) + }; + + class vn_b_helmet_t56_02_03: vn_b_helmet_t56_02_01 { + MASS(12) + }; + + //// NVA Headgear + // NVA Gear usually has the Goggles Version be the parent version of the non-goggle version, meaning we have to "reset" the children to their previous mass. + class vn_o_headgear_base; + // NVA Pilot Helmet with Goggles + class vn_o_helmet_shl61_01: vn_o_headgear_base { + MASS(12) + }; + class vn_o_helmet_shl61_02: vn_o_helmet_shl61_01 { + MASS(10) + }; + + // NVA Crew Helmet with Goggles + class vn_o_helmet_tsh3_01: vn_o_headgear_base { + MASS(12) + }; + class vn_o_helmet_tsh3_02: vn_o_helmet_tsh3_01 { + MASS(10) + }; + + // NVA Pith helmet with Crew Goggles + class vn_o_helmet_nva_01; + class vn_o_helmet_nva_05: vn_o_helmet_nva_01 { + MASS(12) + }; +}; + + +class CfgGlasses { + // VN Pilot Goggles + Mask + class vn_glasses_base; + class vn_o_acc_goggles_03: vn_glasses_base { + mass = 4; + }; +}; diff --git a/addons/compat_sog/compat_sog_wardrobe_uniform_fix/readme.md b/addons/compat_sog/compat_sog_wardrobe_uniform_fix/readme.md index 5a1967bfd3a..9eadffa1447 100644 --- a/addons/compat_sog/compat_sog_wardrobe_uniform_fix/readme.md +++ b/addons/compat_sog/compat_sog_wardrobe_uniform_fix/readme.md @@ -3,3 +3,8 @@ The problem is, that the rolled up version are both 1 lb (0.453 kg) lighter and If we would ignore this, the player would run into situations where they would lose items by simply rolling up their sleeves. To counter this, I increased the maxLoad of those items by 1 lb to be aligned with their counterpart. + + +Addition: +This also adjusts helmets with combat goggles due to a weight discrepancy. + diff --git a/addons/wardrobe/Baseclass.hpp b/addons/wardrobe/Baseclass.hpp index d968aa0e4b3..70cbb9feb75 100644 --- a/addons/wardrobe/Baseclass.hpp +++ b/addons/wardrobe/Baseclass.hpp @@ -38,7 +38,6 @@ class GVAR(base_U_gloves_off): GVAR(base) { alternativeDisplayName = CSTRING(glovesOff); }; - // Common Base Class for Uniforms who are open/closed in the front class GVAR(base_U_jacket_open): GVAR(base) { alternativeDisplayName = CSTRING(jacketOpen); @@ -47,7 +46,6 @@ class GVAR(base_U_jacket_closed): GVAR(base) { alternativeDisplayName = CSTRING(jacketClose); }; - // Common Base Class for Helmets with a Visor that can be flipped up or down class GVAR(base_H_visor_up): GVAR(base) { duration = 0.3; @@ -68,3 +66,14 @@ class GVAR(base_H_visor_down): GVAR(base) { alternativeDisplayName = CSTRING(visorDown); }; + +// Common Base Class for Headgear with goggles that can be used as a facewear item. +class GVAR(base_H_goggles_on): GVAR(base) { + gesture ="GestureWipeFace"; + alternativeDisplayName = CSTRING(gogglesOn); +}; + +class GVAR(base_H_goggles_off): GVAR(base) { + gesture ="GestureWipeFace"; + alternativeDisplayName = CSTRING(gogglesOff); +}; \ No newline at end of file diff --git a/addons/wardrobe/config.cpp b/addons/wardrobe/config.cpp index f275eb53fe7..cc109411521 100644 --- a/addons/wardrobe/config.cpp +++ b/addons/wardrobe/config.cpp @@ -11,7 +11,8 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; requiredAddons[] = { - "ace_interact_menu" + "ace_interact_menu", + "ace_goggles" }; skipWhenMissingDependencies = 1; diff --git a/addons/wardrobe/stringtable.xml b/addons/wardrobe/stringtable.xml index 84f23ebba4e..ceabd45898d 100644 --- a/addons/wardrobe/stringtable.xml +++ b/addons/wardrobe/stringtable.xml @@ -46,6 +46,18 @@ Visor up + + Put mask on + + + Take mask off + + + Put goggles on + + + Take goggles off +