Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
// Returns an array of weapons classes present on unit:
// [0: has_cannon, 1: has_autocannon, 2: has_mg, 3: has_at_rocket,
// 4: has_he_rocket, 5: has_gmg, 6: has_hmg, 7: has_autocannon_aa,
// 8: has_aa_rocket]
// Params:
// 0: unit
list_weapons = {
private["_unit", "_cannon", "_autocannon", "_mg", "_at_rocket", "_he_rocket",
"_gmg", "_hmg", "_autocannon_aa", "_titan_rocket", "_aa_rocket_mag",
"_at_rocket_mag", "_aa_rocket", "_has_weapons", "_all_weapons", "_i", "_wep",
"_y"];
_unit = _this select 0;
_has_weapons = [false, false, false, false, false, false, false, false, false];
_i = 0;
_wep = [];
// Slammer, Slammer UP, Varsuk, Kuma, IS2, Sherman, PIV, StuG, T34/76, T34/85, SU85, Tiger, KingTiger, Pak40, Zis3; Mammoth, Burnes Challenger and Abrams
_cannon = ["cannon_120mm", "cannon_105mm", "cannon_125mm", "cannon_120mm_long", "LIB_D25T", "LIB_M3_L40", "LIB_KwK40_L48", "LIB_KwK42_L70", "LIB_KwK43_L71", "LIB_KwK36_L56", "LIB_StuK40_L48", "LIB_D_5S", "LIB_F34", "LIB_ZIS_S_53", "LIB_Pak40", "LIB_ZIS3","Twin_188mmx", "CHAL_125_MAINGUN", "MEU_125_MAINGUN","Twin_188mmx", "rhs_weap_2a46m", "rhs_weap_2a46m_5", "rhs_weap_2a46m_4", "rhs_weap_2a46m_2", "rhs_weap_m256", "rhsusf_weap_M250", "BWA3_L55", "CUP_Vcannon_M256_M1Abrams", "CUP_Vcannon_M68_veh", "CUP_Vacannon_D5_T34", "CUP_Vacannon_D10", "CUP_Vcannon_2A46_Txx"];
// Marshall, Kamysh, Mora, Gorgon, Wipeout
_autocannon = ["autocannon_40mm_CTWS", "autocannon_30mm_CTWS",
"autocannon_30mm", "BWA3_MK30", "CUP_Vacannon_AZP23_veh", "CUP_Vcannon_L30A1_veh", "CUP_Vacannon_2A28", "CUP_Vacannon_2A42_veh", "CUP_Vacannon_2A14_veh", "CUP_Vacannon_2A72_FCS", "CUP_Vacannon_2A70_veh", "CUP_Vacannon_M242_veh", "CUP_Vacannon_CTWS_veh", "CUP_Vacannon_M168_M163VADS"];
// present on tanks, APCs
_mg = ["LMG_M200", "LMG_coax", "LIB_DT29", "LIB_MG34","X66_MG", "CHAL_COAX_M240", "MEU_COAX_M240", "rhs_weap_m240_abrams_coax", "rhs_weap_pkt", rhs_weap_fcs, "rhs_weap_nsvt_t72", "rhs_weap_nsvt_t80", "rhs_weap_m240_abrams", "rhs_weap_m284", "BWA3_MG3_vehicle", "BWA3_MG5_vehicle", "CUP_Vlmg_L94A1_Coax", "CUP_Vgmg_MK19_veh", "CUP_Vhmg_PKT_veh_Noeject_FCS", "CUP_Vhmg_PKT_BMP_L_Noeject", "CUP_Vhmg_PKT_BMP_R_Noeject", "CUP_Vlmg_M240_veh_laser", "Laserdesignator_mounted", "CUP_Vhmg_M2_veh", "CUP_Vlmg_M240_Challenger2_Loader", "CUP_Vhmg_M2_M1Abrams_Commander", "CUP_Vlmg_M240_M1Abrams_Coax", "CUP_Vlmg_M240_M1Abrams_Loader", "CUP_Vhmg_M85_M60_Commander", "CUP_Vhmg_M2_veh", "CUP_Vhmg_PKT_T34", "CUP_Vhmg_SGMT", "CUP_Vhmg_DSHKM_veh", "CUP_Vhmg_PKT_veh_Noeject_FCS"];
// Blackfoot, Kajman, Orca, PCML, Alamut, Titan compact, Wipeout, Buzzard, Panzershreck, RPG6
_at_rocket = ["missiles_DAGR", "missiles_SCALPEL", "launch_NLAW_F",
"launch_RPG32_F", "launch_Titan_short_F", "launch_B_Titan_short_F",
"launch_O_Titan_short_F", "launch_I_Titan_short_F",
"Missile_AGM_02_Plane_CAS_01_F", "Rocket_04_AP_Plane_CAS_01_F",
"Missile_AGM_01_Plane_CAS_02_F", "Rocket_03_AP_Plane_CAS_02_F", "LIB_RPzB", "lib_rpg6", "230mmMammothTusk", "rhs_weap_902a", "rhs_weap_902b", "CUP_Vmlauncher_AT3_veh", "CUP_Vmlauncher_AT5_single_veh", "CUP_Vmlauncher_TOW_veh", "CUP_Vmlauncher_Stinger_vehicle_veh", "CUP_Vhmg_KORD_T72CZ"];
// Kajman, Hellcat, Pawnee, Katyushka
_he_rocket = ["rockets_Skyfire", "missiles_DAR", "Rocket_03_HE_Plane_CAS_02_F",
"Rocket_04_HE_Plane_CAS_01_F", "LIB_BM13"];
// Panther, Marid, Hunter GMG, Ifrit GMG, Strider GMG, Static GMG, Blackfoot,
// Wipeout, Kajman, Buzzard, Neophrone
// gatling cannons added because of similar damage, flak38, Flakvierling,
_gmg = ["GMG_40mm", "GMG_20mm", "gatling_20mm", "Gatling_30mm_Plane_CAS_01_F",
"gatling_30mm", "Twin_Cannon_20mm", "Cannon_30mm_Plane_CAS_02_F", "LIB_FlaK_38", "LIB_FlaK_38_X4", "LIB_61k"];
// Panther, Marid, Hunter HMG, Ifrit HMG, Strider HMG, Offroad armed
// Static HMG, Varsuk, mg42,
_hmg = ["HMG_127_APC", "HMG_127", "HMG_M2", "HMG_01", "HMG_NSVT", "lib_mg42"];
// Cheetah, Tigris
_autocannon_aa = ["autocannon_35mm"];
// Cheetah, Tigris, Kamysh, Gorgon, Static AT, Static AA
// can be loaded with either AT or AA missiles, need to check available mag
_titan_rocket = ["missiles_titan", "missiles_titan_static"];
_aa_rocket_mag = ["1Rnd_GAA_missiles", "4Rnd_Titan_long_missiles"];
_at_rocket_mag = ["2Rnd_GAT_missiles", "1Rnd_GAT_missiles","230mmMammothTusk"];
// Titan MPRL, Buzzard
_aa_rocket = ["launch_Titan_F", "launch_B_Titan_F", "launch_O_Titan_F",
"launch_I_Titan_F", "Missile_AA_04_Plane_CAS_01_F", "missiles_ASRAAM",
"missiles_Zephyr", "Missile_AA_03_Plane_CAS_02_F"];
_all_weapons = [_cannon, _autocannon, _mg, _at_rocket, _he_rocket, _gmg, _hmg,
_autocannon_aa, _aa_rocket];
_wep = _wep + (weapons _unit) + (_unit weaponsTurret [0,0]) +
(_unit weaponsTurret [-1]);
{
_y = _x;
{
if (_x in _y) then {
_has_weapons set [_i, true];
};
} foreach _wep;
_i = _i + 1;
} foreach _all_weapons;
{
_y = _x;
if (_y in _titan_rocket) then {
{
if (_x in _aa_rocket_mag) then {
_has_weapons set [8, true];
};
if (_x in _at_rocket_mag) then {
_has_weapons set [3, true];
};
} foreach (magazines _unit);
};
} foreach _wep;
_has_weapons
};