Skip to content

Commit

Permalink
Merge pull request #297 from Ansible2/master
Browse files Browse the repository at this point in the history
0.7.34
  • Loading branch information
Ansible2 authored Dec 10, 2020
2 parents 06a4e70 + 6701d7e commit d0096e8
Show file tree
Hide file tree
Showing 9 changed files with 104 additions and 25 deletions.
9 changes: 1 addition & 8 deletions Functions/Init Functions/fn_prepareUnitClasses.sqf
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
// set up MACRO vars that can be used between files and make changes easier
#include "..\..\Headers\Faction Headers\Define Factions.hpp"
#include "..\..\Headers\Faction Headers\Unit Tables\vanillaUnitTables.hpp"
#include "..\..\Headers\Faction Headers\Unit Tables\optreUnitTables.hpp"
#include "..\..\Headers\Faction Headers\Unit Tables\opcanUnitTables.hpp"
#include "..\..\Headers\Faction Headers\Unit Tables\RHS_AFRF Unit Tables.hpp"
#include "..\..\Headers\Faction Headers\Unit Tables\RHS_USAF Unit Tables.hpp"
#include "..\..\Headers\Faction Headers\Unit Tables\Z&DUnitTables.hpp"
#include "..\..\Headers\Faction Headers\Unit Tables\RHS_GREF Unit Tables.hpp"
#include "..\..\Headers\Faction Headers\Unit Tables\Project OPFOR Unit Tables.hpp"
#include "..\..\Headers\Faction Headers\Unit Tables\Master Unit Table.hpp"
/* ----------------------------------------------------------------------------
Function: BLWK_fnc_prepareUnitClasses
Expand Down
18 changes: 14 additions & 4 deletions Functions/Other/fn_addPlayerItems.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,37 @@ params [
["_player",player,[objNull]]
];

_player addVest "V_RangeMaster_Belt";

if (BLWK_playersStartWith_pistol) then {
_player addMagazine "16Rnd_9x21_Mag";
_player addMagazine "16Rnd_9x21_Mag";
_player addWeapon "hgun_P07_F";
};

if (BLWK_playersStartWith_map) then {
_player linkItem "ItemMap";
};

if (BLWK_playersStartWith_NVGs) then {
_player linkItem "Integrated_NVG_F";
};

if (BLWK_playersStartWith_compass) then {
_player linkItem "itemCompass";
};

if (BLWK_playersStartWith_radio) then {
if (isClass (configfile >> "CfgVehicles" >> "tfar_anprc152")) then {
_player linkItem "tf_anprc152";
} else {
_player linkItem "itemRadio";
if (isClass (configfile >> "CfgVehicles" >> "tfar_anprc152")) exitWith {
_player linkItem "tfar_anprc152";
};
if (isClass (configfile >> "CfgVehicles" >> "ACRE_PRC343")) exitWith {
_player linkItem "ACRE_PRC343";
};

_player linkItem "itemRadio";
};

if (BLWK_playersStartWith_mineDetector) then {
_player addItem "mineDetector";
};
4 changes: 4 additions & 0 deletions Functions/Other/fn_getFriendlyVehicleClass.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ private _numFriendlyClasses = count BLWK_friendly_vehicleClasses;
if (_numFriendlyClasses - 1 >= _typeId) then {
// check that custom class is actually configed
private _testClass = BLWK_friendly_vehicleClasses select _typeId;
if (_testClass isEqualType [] AND {!(_testClass isEqualTo [])}) then {
_testClass = _testClass select 0;
};

if (isClass (configFile >> "CfgVehicles" >> _testClass)) then {
_returnVehicleClass = _testClass;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,39 @@ private _lightArmourArray = [];
private _heavyArmourArray = [];
private _fn_checkLevelsClasses = {
params ["_levelsVehicleArray"];

private _fn_handleVehicleArray = {
params ["_array"];

private _return = "";
if !(_array isEqualTo []) then {
_return = selectRandom _array;
};

_return
};

private "_class";
{
// if the vehicle type is not empty
if !(_x isEqualTo "") then {
_class = _x;
if (_class isEqualType []) then {
_class = [_class] call _fn_handleVehicleArray;
};

if !(_class isEqualTo "") then {
// if the vehicle type is not empty
switch (_forEachIndex) do {
case 0:{
_lightCarsArray pushBack _x
_lightCarsArray pushBack _class
};
case 1:{
_heavyCarsArray pushBack _x
_heavyCarsArray pushBack _class
};
case 2:{
_lightArmourArray pushBack _x
_lightArmourArray pushBack _class
};
case 3:{
_heavyArmourArray pushBack _x
_heavyArmourArray pushBack _class
};
default {};
};
Expand Down
8 changes: 8 additions & 0 deletions Headers/Faction Headers/Unit Tables/Master Unit Table.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include "vanillaUnitTables.hpp"
#include "optreUnitTables.hpp"
#include "opcanUnitTables.hpp"
#include "RHS_AFRF Unit Tables.hpp"
#include "RHS_USAF Unit Tables.hpp"
#include "Z&DUnitTables.hpp"
#include "RHS_GREF Unit Tables.hpp"
#include "Project OPFOR Unit Tables.hpp"
20 changes: 18 additions & 2 deletions Headers/Faction Headers/Unit Tables/RHS_GREF Unit Tables.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@
"rhsgref_hidf_sniper",\
"rhsgref_hidf_squadleader",\
"rhsgref_hidf_teamleader",\
["rhsgref_hidf_m1025_m2","rhsgref_hidf_m1025_mk19","rhsgref_hidf_m113a3_m2","rhsgref_hidf_m113a3_mk19","rhs_uh1h_hidf","RHS_C130J","RHSGREF_A29B_HIDF","RHS_AH64D_wd"]\
[\
"rhsgref_hidf_m1025_m2",\
"rhsgref_hidf_m1025_mk19",\
"rhsgref_hidf_m113a3_m2",\
"rhsgref_hidf_m113a3_mk19",\
"rhs_uh1h_hidf","RHS_C130J",\
"RHSGREF_A29B_HIDF","RHS_AH64D_wd"\
]\
]

// CDF
Expand All @@ -28,7 +35,16 @@
"rhsgref_cdf_b_ngd_rifleman_lite",\
"rhsgref_cdf_b_ngd_rifleman_rpg75",\
"rhsgref_cdf_b_ngd_squadleader",\
["rhsgref_cdf_b_reg_uaz_dshkm","rhsgref_BRDM2_b","rhsgref_cdf_b_bmp2e","rhsgref_cdf_b_t72ba_tv","rhsgref_cdf_b_reg_Mi17Sh","RHS_AN2_B","rhsgref_cdf_b_su25","rhs_mi28n_vvsc"]\
[\
"rhsgref_cdf_b_reg_uaz_dshkm",\
"rhsgref_BRDM2_b",\
"rhsgref_cdf_b_bmp2e",\
"rhsgref_cdf_b_t72ba_tv",\
"rhsgref_cdf_b_reg_Mi17Sh",\
"RHS_AN2_B",\
"rhsgref_cdf_b_su25",\
"rhs_mi28n_vvsc"\
]\
]

#define RHS_GREF_CDF_PARA \
Expand Down
12 changes: 11 additions & 1 deletion Headers/Faction Headers/Unit Tables/optreUnitTables.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,17 @@
"OPTRE_UNSC_ODST_Soldier_Scout_AT", \
"OPTRE_UNSC_ODST_Soldier_Scout_Sniper", \
"OPTRE_UNSC_ODST_Soldier_TeamLeader", \
["OPTRE_M12_LRV","OPTRE_M12G1_LRV","OPTRE_M412_IFV_UNSC","","","","","",""]\
[\
"OPTRE_M12_LRV",\
"OPTRE_M12G1_LRV",\
"OPTRE_M412_IFV_UNSC",\
"",\
"",\
"",\
"",\
"",\
""\
]\
]

#define OPTRE_ARMY_SNOW_UNITS \
Expand Down
26 changes: 23 additions & 3 deletions Headers/Faction Headers/Unit Tables/vanillaUnitTables.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"B_MRAP_01_hmg_F",\ 1 // heavy car
"B_APC_Wheeled_01_cannon_F",\ 2 // light armour
"B_MBT_01_cannon_F",\ 3 // heavy armour
"B_Heli_Transport_01_F",\ 4 // transport aircraft (used for door gunner)
"B_Heli_Transport_01_F",\ 4 // transport Helicopter (used for door gunner)
"B_T_VTOL_01_vehicle_F",\ 5 // cargo aircraft (used to paradrop from and drop off arsenal)
"B_Plane_CAS_01_F",\ 6 // CAS plane
"B_Heli_Attack_01_dynamicLoadout_F",\ 7 // attack helicopter
Expand Down Expand Up @@ -67,7 +67,17 @@
"B_Patrol_Soldier_M_F", \
"B_Patrol_Soldier_AT_F", \
"B_Patrol_Soldier_TL_F", \
["B_LSV_01_armed_F","B_MRAP_01_hmg_F","B_APC_Wheeled_01_cannon_F","B_MBT_01_cannon_F","B_Heli_Transport_01_F","B_T_VTOL_01_vehicle_F","B_Plane_CAS_01_F","B_Heli_Attack_01_dynamicLoadout_F","B_T_VTOL_01_armed_F"]\
[\
"B_LSV_01_armed_F",\
"B_MRAP_01_hmg_F",\
"B_APC_Wheeled_01_cannon_F",\
"B_MBT_01_cannon_F",\
"B_Heli_Transport_01_F",\
"B_T_VTOL_01_vehicle_F",\
"B_Plane_CAS_01_F",\
"B_Heli_Attack_01_dynamicLoadout_F",\
"B_T_VTOL_01_armed_F"\
]\
]

#define NATO_PACIFIC_UNITS \
Expand Down Expand Up @@ -187,7 +197,17 @@
"O_recon_F", \
"O_recon_LAT_F", \
"O_recon_TL_F", \
["O_LSV_02_armed_F","O_MRAP_02_hmg_F","O_APC_Wheeled_02_rcws_v2_F","O_MBT_02_cannon_F","O_Heli_Light_02_unarmed_F","O_Heli_Transport_04_box_F","O_Plane_CAS_02_dynamicLoadout_F","O_Heli_Attack_02_dynamicLoadout_F",""]\
[\
"O_LSV_02_armed_F",\
"O_MRAP_02_hmg_F",\
"O_APC_Wheeled_02_rcws_v2_F",\
"O_MBT_02_cannon_F",\
"O_Heli_Light_02_unarmed_F",\
"O_Heli_Transport_04_box_F",\
"O_Plane_CAS_02_dynamicLoadout_F",\
"O_Heli_Attack_02_dynamicLoadout_F",\
""\
]\
]

#define CSAT_PACIFIC_UNITS \
Expand Down
2 changes: 1 addition & 1 deletion Headers/descriptionEXT/missionParams.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ class BLWK_playersStartWith_compass
};
class BLWK_playersStartWith_radio
{
title = "Start with a radio (TFAR Compatabile) (You must have one to get support radio messages)";
title = "Start with a radio (TFAR & ACRE Compatabile) (You must have one to get support radio messages)";
values[] = ZERO_OR_ONE;
texts[] = NO_OR_YES;
default = 1;
Expand Down

0 comments on commit d0096e8

Please sign in to comment.