Skip to content

Commit

Permalink
ChDKZ tank fix #2 (Camo) (#2885)
Browse files Browse the repository at this point in the history
* config patch ChDKZ tanks

* Update RHS_AI_ChDKZ.sqf

* added signifier "rhs" to class names

* Update chdkz_rhs.hpp

* Restructure config_fixes to work better with multiple modsets

* Update RHS_AI_ChDKZ.sqf

adjusted usage of sabatour carbines

---------

Co-authored-by: John Jordan <[email protected]>
  • Loading branch information
ante185 and jaj22 authored Aug 27, 2023
1 parent ebd76dc commit cf1820b
Show file tree
Hide file tree
Showing 9 changed files with 116 additions and 11 deletions.
24 changes: 24 additions & 0 deletions A3A/addons/config_fixes/CUP/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include "..\script_component.hpp"

#if __has_include("\CUP\Vehicles\CUP_Vehicles_LoadOrder\config.bin")

class CfgPatches {
class PATCHNAME(CUP) {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"A3_Data_F_AoW_Loadorder","CUP_Vehicles_LoadOrder"};
author = AUTHOR;
authors[] = { AUTHORS };
authorUrl = "";
VERSION_CONFIG;
};
};

// Uncomment when needed
//#include "CfgMagazines.hpp"
//#include "CfgVehicles.hpp"
//#include "CfgWeapons.hpp"

#endif // __has_include("\CUP\Vehicles\CUP_Vehicles_LoadOrder\config.bin")
3 changes: 2 additions & 1 deletion A3A/addons/config_fixes/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
class CfgVehicles {
#include "CfgVehicles\chdkz_rhs.hpp"
};

};
4 changes: 4 additions & 0 deletions A3A/addons/config_fixes/RHS/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class CfgVehicles {
#include "chdkz_rhs.hpp"
};

24 changes: 24 additions & 0 deletions A3A/addons/config_fixes/RHS/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include "..\script_component.hpp"

#if __has_include("\rhsgref\addons\rhsgref_main\config.bin")

class CfgPatches {
class PATCHNAME(RHS) {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"A3_Data_F_AoW_Loadorder","rhsgref_main_loadorder"};
author = AUTHOR;
authors[] = { AUTHORS };
authorUrl = "";
VERSION_CONFIG;
};
};

// Uncomment when needed
//#include "CfgMagazines.hpp"
#include "CfgVehicles.hpp"
//#include "CfgWeapons.hpp"

#endif // __has_include("\rhsgref\addons\rhsgref_main\config.bin"
6 changes: 1 addition & 5 deletions A3A/addons/config_fixes/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ class CfgPatches {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
#if __has_include("\CUP\Weapons\CUP_Weapons_DynamicLoadout\mk82\CUP_mk82_pod.p3d")
requiredAddons[] = {"A3_Weapons_F", "CUP_Weapons_DynamicLoadout"};
#else
requiredAddons[] = {"A3_Weapons_F"};
#endif
requiredAddons[] = {"A3_Data_F_AoW_Loadorder"};
author = AUTHOR;
authors[] = { AUTHORS };
authorUrl = "";
Expand Down
1 change: 1 addition & 0 deletions A3A/addons/config_fixes/script_component.hpp
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#define COMPONENT config_fixes
#include "\x\A3A\addons\core\Includes\script_mod.hpp"
#define PATCHNAME(x) ADDON##_##x
10 changes: 5 additions & 5 deletions A3A/addons/core/Templates/Templates/RHS/RHS_AI_ChDKZ.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
["vehiclesLightAPCs", ["rhsgref_BRDM2_ins"]] call _fnc_saveToTemplate; //this line determines light APCs
["vehiclesAPCs", ["rhsgref_ins_btr60","rhsgref_ins_btr60","rhsgref_ins_btr70","rhsgref_ins_bmd2","rhsgref_ins_bmd1p","rhsgref_ins_bmd1"]] call _fnc_saveToTemplate;
["vehiclesIFVs", ["rhsgref_ins_bmp2k","rhsgref_ins_bmp2d","rhsgref_ins_bmp2e","rhsgref_ins_bmp2","rhsgref_ins_bmp1p","rhsgref_ins_bmp1k","rhsgref_ins_bmp1d","rhsgref_ins_bmp1"]] call _fnc_saveToTemplate; //this line determines IFVs
["vehiclesTanks", ["rhs_t72ba_tv","rhs_t72bb_tv","rhs_t72bc_tv"]] call _fnc_saveToTemplate;
["vehiclesTanks", ["a3a_rhs_chdkz_72a","a3a_rhs_chdkz_72a","a3a_rhs_chdkz_72b","a3a_rhs_chdkz_72c"]] call _fnc_saveToTemplate;
["vehiclesAA", ["rhsgref_ins_zsu234"]] call _fnc_saveToTemplate;


Expand Down Expand Up @@ -426,8 +426,8 @@ _militiaLoadoutData set ["carbines", [
]];

_militiaLoadoutData set ["saboteurCarbines", [
["rhs_weap_aks74u", "rhs_acc_pbs4", "", "", ["rhs_30Rnd_545x39_7U1_AK"], [], ""],
["rhs_weap_akms", "rhs_acc_pbs1", "rhs_acc_2dpZenit", "", ["rhs_30Rnd_762x39mm_U"], [], ""]
["rhs_weap_aks74u", "", "", "", ["rhs_30Rnd_545x39_7U1_AK"], [], ""],
["rhs_weap_akms", "", "rhs_acc_2dpZenit", "", ["rhs_30Rnd_762x39mm_U"], [], ""]
]];
_militiaLoadoutData set ["grenadeLaunchers", [
["rhs_weap_akm_gp25", "rhs_acc_dtkakm", "", "", ["rhs_30Rnd_762x39mm", "rhs_30Rnd_762x39mm_tracer"], ["rhs_VOG25", "rhs_VOG25", "rhs_VOG25P", "rhs_VG40OP_white"], ""],
Expand Down Expand Up @@ -592,7 +592,7 @@ private _explosivesExpertTemplate = {
["uniforms"] call _fnc_setUniform;
["aaBackpacks"] call _fnc_setBackpack;

[["saboteurCarbines", selectRandom ["rifles", "carbines"]] call _fnc_fallback] call _fnc_setPrimary;
[["saboteurCarbines", "carbines"] call _fnc_fallback] call _fnc_setPrimary;
["primary", 5] call _fnc_addMagazines;


Expand Down Expand Up @@ -625,7 +625,7 @@ private _engineerTemplate = {
["uniforms"] call _fnc_setUniform;
["aaBackpacks"] call _fnc_setBackpack;

[["saboteurCarbines", "carbines"] call _fnc_fallback] call _fnc_setPrimary;
["carbines"] call _fnc_setPrimary;
["primary", 5] call _fnc_addMagazines;

["sidearms"] call _fnc_setHandgun;
Expand Down
55 changes: 55 additions & 0 deletions a3a/addons/config_fixes/RHS/chdkz_rhs.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@

class rhsgref_ins_t72ba;
class rhsgref_ins_t72bb;
class rhsgref_ins_t72bc;

class a3a_rhs_chdkz_72a : rhsgref_ins_t72ba{

#if __A3_DEBUG__
scope = 2;
#else
scope = 1;
#endif
class EventHandlers
{
fired = "_this call (uinamespace getvariable 'BIS_fnc_effectFired');";
init = "";
killed = "_this call (uinamespace getvariable 'BIS_fnc_effectKilled');";
};
};
class a3a_rhs_chdkz_72b : rhsgref_ins_t72bb{
#if __A3_DEBUG__
scope = 2;
#else
scope = 1;
#endif
class EventHandlers
{
fired = "_this call (uinamespace getvariable 'BIS_fnc_effectFired');";
init = "";
killed = "_this call (uinamespace getvariable 'BIS_fnc_effectKilled');";
};
};
class a3a_rhs_chdkz_72c : rhsgref_ins_t72bc{
#if __A3_DEBUG__
scope = 2;
#else
scope = 1;
#endif
hiddenSelectionsTextures[] =
{
"rhsafrf\addons\rhs_t72_camo\data\rhs_t72b_01a_chdkz_co.paa",
"rhsafrf\addons\rhs_t72_camo\data\rhs_t72b_02a_chdkz_co.paa",
"rhsafrf\addons\rhs_t72\data\rhs_t72b_03_co.paa",
"rhsafrf\addons\rhs_t72\data\rhs_t72b_04_co.paa",
"rhsafrf\addons\rhs_t72\data\rhs_t72b_05_co.paa"
};
class EventHandlers
{
fired = "_this call (uinamespace getvariable 'BIS_fnc_effectFired');";
init = "";
killed = "_this call (uinamespace getvariable 'BIS_fnc_effectKilled');";
};
};


File renamed without changes.

0 comments on commit cf1820b

Please sign in to comment.