Skip to content

Commit

Permalink
Compat WS - Realistic Names (#9419)
Browse files Browse the repository at this point in the history
* Compat WS - Realistic Names

* use cba subcstring

* cleanup python

* Update script_macros_common.hpp

---------

Co-authored-by: BrettMayson <[email protected]>
Co-authored-by: PabstMirror <[email protected]>
  • Loading branch information
3 people authored Sep 23, 2023
1 parent da60a1b commit ab6dd01
Show file tree
Hide file tree
Showing 7 changed files with 256 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .hemtt/project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,11 @@ workshop = [
dlc = [
"S.O.G. Prairie Fire",
]

[hemtt.launch.ws]
workshop = [
"450814997", # CBA_A3's Workshop ID
]
dlc = [
"Western Sahara",
]
122 changes: 122 additions & 0 deletions addons/compat_ws/compat_ws_realisticnames/CfgWeapons.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
class CfgWeapons {
// AA12
class sgun_aa40_base_lxWS;
class sgun_aa40_lxWS: sgun_aa40_base_lxWS {
displayName = SUBCSTRING(AA40_Name);
};
class sgun_aa40_tan_lxWS: sgun_aa40_base_lxWS {
displayName = SUBCSTRING(AA40_Tan_Name);
};
class sgun_aa40_snake_lxWS: sgun_aa40_base_lxWS {
displayName = SUBCSTRING(AA40_Snake_Name);
};

// Galil ARM
class arifle_Galat_base_lxWS;
class arifle_Galat_lxWS: arifle_Galat_base_lxWS {
displayName = SUBCSTRING(Galat_Name);
};
class arifle_Galat_worn_lxWS: arifle_Galat_lxWS {
displayName = SUBCSTRING(Galat_Old_Name);
};

// GLX 160
class glaunch_GLX_base_lxWS;
class glaunch_GLX_lxWS: glaunch_GLX_base_lxWS {
displayName = SUBCSTRING(GLX_Name);
};
class glaunch_GLX_snake_lxWS: glaunch_GLX_base_lxWS {
displayName = SUBCSTRING(GLX_Snake_Name);
};
class glaunch_GLX_hex_lxWS: glaunch_GLX_base_lxWS {
displayName = SUBCSTRING(GLX_Hex_Name);
};
class glaunch_GLX_ghex_lxWS: glaunch_GLX_base_lxWS {
displayName = SUBCSTRING(GLX_GreenHex_Name);
};
class glaunch_GLX_camo_lxWS: glaunch_GLX_base_lxWS {
displayName = SUBCSTRING(GLX_Camo_Name);
};
class glaunch_GLX_tan_lxWS: glaunch_GLX_base_lxWS {
displayName = SUBCSTRING(GLX_Tan_Name);
};

// Mk14 Mod 1 EBR
class srifle_EBR_F;
class srifle_EBR_blk_lxWS: srifle_EBR_F {
displayName = SUBCSTRING(EBR_Black_Name);
};
class srifle_EBR_snake_lxWS: srifle_EBR_F {
displayName = SUBCSTRING(EBR_Snake_Name);
};

// Vektor SS-77
class LMG_S77_base_lxWS;
class LMG_S77_lxWS: LMG_S77_base_lxWS {
displayName = SUBCSTRING(S77_Name);
};
class LMG_S77_AAF_lxWS: LMG_S77_base_lxWS {
displayName = SUBCSTRING(S77_AAF_Name);
};
class LMG_S77_Hex_lxWS: LMG_S77_base_lxWS {
displayName = SUBCSTRING(S77_Hex_Name);
};
class LMG_S77_GHex_lxWS: LMG_S77_base_lxWS {
displayName = SUBCSTRING(S77_GreenHex_Name);
};
class LMG_S77_Desert_lxWS: LMG_S77_base_lxWS {
displayName = SUBCSTRING(S77_Desert_Name);
};

// Vektor SS-77 (Compact)
class LMG_S77_Compact_base_lxWS;
class LMG_S77_Compact_lxWS: LMG_S77_Compact_base_lxWS {
displayName = SUBCSTRING(S77_Compact_Name);
};
class LMG_S77_Compact_Snakeskin_lxWS: LMG_S77_Compact_base_lxWS {
displayName = SUBCSTRING(S77_Compact_Snake_Name);
};

// FN FAL (Wood) - Closest match is the 50.00
class DMR_06_base_F;
class arifle_SLR_lxWS: DMR_06_base_F {
displayName = SUBCSTRING(SLR_Wood_Name);
};
class arifle_SLR_GL_lxWS: arifle_SLR_lxWS {
displayName = SUBCSTRING(SLR_GL_Wood_Name);
};

// FN FAL
class arifle_SLR_V_lxWS: arifle_SLR_lxWS {
displayName = SUBCSTRING(SLR_Name);
};
class arifle_SLR_V_GL_lxWS: arifle_SLR_V_lxWS {
displayName = SUBCSTRING(SLR_GL_Name);
};
class arifle_SLR_D_lxWS: arifle_SLR_lxWS {
displayName = SUBCSTRING(SLR_Desert_Name);
};
class arifle_SLR_V_camo_lxWS: arifle_SLR_V_lxWS {
displayName = SUBCSTRING(SLR_Camo_Name);
};

// Vektor R4/R5
class arifle_Velko_base_lxWS;
class arifle_Velko_lxWS: arifle_Velko_base_lxWS {
displayName = SUBCSTRING(Velko_R4_Name);
};
class arifle_VelkoR5_lxWS: arifle_Velko_base_lxWS {
displayName = SUBCSTRING(Velko_R5_Name);
};
class arifle_VelkoR5_GL_lxWS: arifle_VelkoR5_lxWS {
displayName = SUBCSTRING(Velko_R5_GL_Name);
};
class arifle_VelkoR5_snake_lxWS: arifle_VelkoR5_lxWS {
displayName = SUBCSTRING(Velko_R5_Snake_Name);
};
class arifle_VelkoR5_GL_snake_lxWS: arifle_VelkoR5_GL_lxWS {
displayName = SUBCSTRING(Velko_R5_GL_Snake_Name);
};

// XMS has not been added as it's a make believe hybrid of the XM8/VHS-K2: XM8+VHS = XMS
};
21 changes: 21 additions & 0 deletions addons/compat_ws/compat_ws_realisticnames/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include "script_component.hpp"

class CfgPatches {
class SUBADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"data_f_lxWS_Loadorder",
"ace_realisticnames"
};
skipWhenMissingDependencies = 1;
author = ECSTRING(common,ACETeam);
authors[] = {"Mike"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};

#include "CfgWeapons.hpp"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#define SUBCOMPONENT realisticnames
#define SUBCOMPONENT_BEAUTIFIED Realistic Names
#include "..\script_component.hpp"
98 changes: 98 additions & 0 deletions addons/compat_ws/compat_ws_realisticnames/stringtable.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Compat_WS_RealisticNames">
<Key ID="STR_ACE_Compat_WS_RealisticNames_AA40_Name">
<English>AA12</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_AA40_Tan_Name">
<English>AA12 (Sand)</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_AA40_Snake_Name">
<English>AA12 (Snake)</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_Galat_Name">
<English>Galil ARM</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_Galat_Old_Name">
<English>Galil ARM (Old)</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_GLX_Name">
<English>GLX 160</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_GLX_Snake_Name">
<English>GLX 160 (Snake)</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_GLX_Hex_Name">
<English>GLX 160 (Hex)</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_GLX_GreenHex_Name">
<English>GLX 160 (Green Hex)</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_GLX_Camo_Name">
<English>GLX 160 (Camo)</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_GLX_Tan_Name">
<English>GLX 160 (Sand)</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_EBR_Black_Name">
<English>Mk14 Mod 1 EBR (Black)</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_EBR_Snake_Name">
<English>Mk14 Mod 1 EBR (Snake)</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_S77_Name">
<English>Vektor SS-77</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_S77_AAF_Name">
<English>Vektor SS-77 (Camo)</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_S77_Hex_Name">
<English>Vektor SS-77 (Hex)</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_S77_GreenHex_Name">
<English>Vektor SS-77 (Green Hex)</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_S77_Desert_Name">
<English>Vektor SS-77 (Desert)</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_S77_Compact_Name">
<English>Vektor SS-77 Compact</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_S77_Compact_Snake_Name">
<English>Vektor SS-77 Compact (Snake)</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_SLR_Wood_Name">
<English>FN FAL 50.00 (Wood)</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_SLR_GL_Wood_Name">
<English>FN FAL 50.00 GL (Wood)</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_SLR_Name">
<English>FN FAL 50.00</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_SLR_GL_Name">
<English>FN FAL 50.00 GL</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_SLR_Desert_Name">
<English>FN FAL 50.00 (Desert)</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_SLR_Camo_Name">
<English>FN FAL 50.00 (Jungle)</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_Velko_R4_Name">
<English>Vektor R4</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_Velko_R5_Name">
<English>Vektor R5 Carbine</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_Velko_R5_GL_Name">
<English>Vektor R5 Carbine GL</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_Velko_R5_Snake_Name">
<English>Vektor R5 Carbine (Snake)</English>
</Key>
<Key ID="STR_ACE_Compat_WS_RealisticNames_Velko_R5_GL_Snake_Name">
<English>Vektor R5 Carbine GL (Snake)</English>
</Key>
</Package>
</Project>
2 changes: 2 additions & 0 deletions include/x/cba/addons/main/script_macros_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1275,9 +1275,11 @@ Macro: xSTRING()
#define ELSTRING(var1,var2) QUOTE(TRIPLES(STR,DOUBLES(PREFIX,var1),var2))
#define CSTRING(var1) QUOTE(TRIPLES($STR,ADDON,var1))
#define ECSTRING(var1,var2) QUOTE(TRIPLES($STR,DOUBLES(PREFIX,var1),var2))
#define SUBCSTRING(var1) QUOTE(TRIPLES($STR,SUBADDON,var1))

#define LLSTRING(var1) localize QUOTE(TRIPLES(STR,ADDON,var1))
#define LELSTRING(var1,var2) localize QUOTE(TRIPLES(STR,DOUBLES(PREFIX,var1),var2))
#define LSUBLSTRING(var1) localize QUOTE(TRIPLES(STR,SUBADDON,var1))
#endif


Expand Down
3 changes: 2 additions & 1 deletion tools/stringtable_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ def check_stringtable(filepath):
print(" ERROR: Package name attribute '{}' is all lowercase, should be in titlecase.".format(package_name))
errors += 1

if package_name.lower() != os.path.basename(os.path.dirname(filepath)):
component_folder = os.path.basename(os.path.dirname(filepath))
if package_name.lower() != component_folder:
print(" ERROR: Package name attribute '{}' does not match the component folder name.".format(package_name))
errors += 1

Expand Down

0 comments on commit ab6dd01

Please sign in to comment.