move to cfg, update createbox, create /defines
This commit is contained in:
@@ -49,17 +49,6 @@ class milsim
|
||||
class logPlayerInventory {};
|
||||
};
|
||||
|
||||
class resupply {
|
||||
class crateDefinitions {};
|
||||
class createAmmoBox {};
|
||||
class createBox {};
|
||||
class createCSWBox {};
|
||||
class createLaunchersBox {};
|
||||
class createMedicalBox {};
|
||||
class createMortarBox {};
|
||||
class createWeaponsBox {};
|
||||
}
|
||||
|
||||
class ambience {
|
||||
class flakInitVehicle {};
|
||||
class flakEH {};
|
||||
@@ -88,6 +77,20 @@ class milsim
|
||||
};
|
||||
};
|
||||
|
||||
class milsim_resupply {
|
||||
class functions {
|
||||
file = "functions\resupply";
|
||||
class createAmmoBox {};
|
||||
class createBox {};
|
||||
class createCSWBox {};
|
||||
class createLaunchersBox {};
|
||||
class createMedicalBox {};
|
||||
class createMortarBox {};
|
||||
class createWeaponsBox {};
|
||||
class getSupplyCratesCfg {};
|
||||
};
|
||||
};
|
||||
|
||||
class milsim_fbcb2_assets {
|
||||
class functions {
|
||||
file = "functions\fbcb2\assets";
|
||||
|
||||
@@ -5,24 +5,28 @@ if ( !hasInterface ) exitWith {};
|
||||
"Create Resupply Box",
|
||||
{
|
||||
params [["_pos", [0,0,0], [[]], 3], ["_target", objNull, [objNull]]];
|
||||
_keysSorted = keys milsim_resupply_crateDefinitions;
|
||||
_keysSorted sort true;
|
||||
_comboOptions = [];
|
||||
_comboOptions resize (count _keysSorted);
|
||||
for "_i" from 0 to (count _keysSorted) - 1 do {
|
||||
private _definition = milsim_resupply_crateDefinitions get (_keysSorted select _i);
|
||||
_comboOptions set [_i, [
|
||||
_definition getOrDefault ["displayName", "ERROR"], // display name
|
||||
_definition getOrDefault ["description", "No description"], // tooltip
|
||||
_definition getOrDefault ["icon", "No icon"] // icon
|
||||
]];
|
||||
// get parent definition
|
||||
private _supplyCratesCfg = call milsim_resupply_fnc_getSupplyCratesCfg;
|
||||
// get the subclass names
|
||||
private _boxTypesAvailable = _supplyCratesCfg call BIS_fnc_getCfgSubClasses;
|
||||
|
||||
_boxTypesAvailable sort true;
|
||||
_comboOptions = _boxTypesAvailable apply {
|
||||
[
|
||||
// display name
|
||||
[_supplyCratesCfg >> _x >> "displayName", "STRING", "ERROR"] call CBA_fnc_getConfigEntry,
|
||||
// tooltip
|
||||
[_supplyCratesCfg >> _x >> "tooltip", "STRING", "ERROR"] call CBA_fnc_getConfigEntry,
|
||||
// icon
|
||||
[_supplyCratesCfg >> _x >> "icon", "STRING", "ERROR"] call CBA_fnc_getConfigEntry
|
||||
]
|
||||
};
|
||||
|
||||
[
|
||||
"Resupply Box Options",
|
||||
[
|
||||
// [ "COMBO", "Box Type", [[1,2,3], [["Ammo"],["Weapons"],["Medical"]],0] ]
|
||||
["COMBO", "Box Type", [_keysSorted, _comboOptions, 0]]
|
||||
["COMBO", "Box Type", [_boxTypesAvailable, _comboOptions, 0]]
|
||||
],
|
||||
{
|
||||
|
||||
@@ -32,14 +36,14 @@ if ( !hasInterface ) exitWith {};
|
||||
_args params ["_pos", "_target", "_keysSorted"];
|
||||
|
||||
|
||||
private _box = [_target, _typeOptionSelected, _pos] call milsim_fnc_createBox;
|
||||
private _box = [_target, _typeOptionSelected, _pos] call milsim_resupply_fnc_createBox;
|
||||
if (isNull _box) exitWith {
|
||||
["Resupply Box", "WARNING: Failed to locate or create box!"] call BIS_fnc_curatorHint;
|
||||
};
|
||||
["Resupply Box", format["Created a %1 box", _typeOptionSelected]] call BIS_fnc_curatorHint;
|
||||
["Resupply Box", format["Created box from class %1", _typeOptionSelected]] call BIS_fnc_curatorHint;
|
||||
},
|
||||
{},
|
||||
[_pos, _target, _options]
|
||||
[_pos, _target]
|
||||
] call zen_dialog_fnc_create;
|
||||
}
|
||||
] call zen_custom_modules_fnc_register;
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
// Lists approved fixed-wing and rotary vehicle types that mission makers can use in their missions.
|
||||
|
||||
class ApprovedAssets {
|
||||
// Fixed-wing aircraft
|
||||
class USAF_A10 {callsign = "Ares";assetType = "FixedWing";};
|
||||
class RHSGREF_A29B_HIDF {callsign = "Odyssey";assetType = "FixedWing";};
|
||||
class USAF_C130J {callsign = "Hercules";assetType = "FixedWing";};
|
||||
// Rotary aircraft
|
||||
class RHS_MELB_MH6M {callsign = "Apollo";assetType = "Rotary";};
|
||||
class RHS_MELB_AH6M {callsign = "Artemis";assetType = "Rotary";};
|
||||
class RHS_MELB_H6M {callsign = "Icarus";assetType = "Rotary";};
|
||||
class RHS_CH_47F {callsign = "Achilles";assetType = "Rotary";};
|
||||
class ej_MH60MDAP4 {callsign = "Hades";assetType = "Rotary";};
|
||||
class RHS_UH60M {callsign = "Griffin";assetType = "Rotary";};
|
||||
class RHS_UH60M_MEV2 {callsign = "Dustoff";assetType = "Rotary";};
|
||||
class B_T_VTOL_01_INFANTRY_F {callsign = "Pegasus";assetType = "Rotary";};
|
||||
class B_T_VTOL_01_ARMED_F {callsign = "Spartan";assetType = "Rotary";};
|
||||
class RHS_AH64D {callsign = "Orion";assetType = "Rotary";};
|
||||
class RHS_AH1Z {callsign = "Athena";assetType = "Rotary";};
|
||||
class RHS_UH1Y {callsign = "Homer";assetType = "Rotary";};
|
||||
class rhsusf_CH53E_USMC {callsign = "Atlas";assetType = "Rotary";};
|
||||
};
|
||||
@@ -1,253 +0,0 @@
|
||||
// BattalionInfo.hpp
|
||||
// Defines the structure of the Battalion, allowing properties to be easily changed and updated
|
||||
// This file is included in description.ext
|
||||
|
||||
|
||||
// Define the callsigns for the Battalion
|
||||
#define COMMAND_CALLSIGN SPARTAN
|
||||
#define RRC_CALLSIGN TIGER
|
||||
#define MEDIC_CALLSIGN LIFELINE
|
||||
#define ALPHA_CALLSIGN BLACKJACK
|
||||
#define ECHO_CALLSIGN ZOOMER
|
||||
#define WPN_CALLSIGN BLACKFOOT
|
||||
|
||||
// Define the frequencies for the Battalion
|
||||
#define FREQ_BATTALION 45
|
||||
#define FREQ_BATTALION_MEDICAL_INTERCOM 91.1
|
||||
#define FREQ_ALL_MEDICAL_SR 121.5
|
||||
|
||||
#define FREQ_ALPHA_COMPANY 40
|
||||
|
||||
#define FREQ_PLATOON1_SR 100
|
||||
#define FREQ_PLATOON1_LR 41
|
||||
#define FREQ_PLATOON1_RTO 101
|
||||
|
||||
#define FREQ_PLATOON2_SR 200
|
||||
#define FREQ_PLATOON2_LR 42
|
||||
#define FREQ_PLATOON2_RTO 201
|
||||
|
||||
#define FREQ_ECHO_FLIGHT_INTERCOM 30
|
||||
#define FREQ_ECHO_FLIGHT_CAS 35
|
||||
#define FREQ_ECHO_FLIGHT_LOGISTICS 35.1
|
||||
|
||||
#define FREQ_ECHO_GROUND 80
|
||||
#define FREQ_ECHO_GROUND_LOGISTICS 81
|
||||
#define FREQ_ECHO_ARTY 82
|
||||
#define FREQ_ECHO_ARTY_INTERCOM 155
|
||||
|
||||
#define FREQ_CONVOY 50
|
||||
|
||||
// Define the text colors to appear in diary entries
|
||||
#define LVL1_TEXT_COLOR "#7c887e"
|
||||
#define LVL2_TEXT_COLOR "#bab79f"
|
||||
#define LVL3_TEXT_COLOR "#91967f"
|
||||
#define LVL4_TEXT_COLOR "#d3d2cd"
|
||||
|
||||
|
||||
// All elements and subclasses should have the following properties:
|
||||
// callsign: the callsign of the element
|
||||
// textColor: the color of the text for the element
|
||||
// frequencies: an array of frequencies for the element in the format:
|
||||
// {roleWithinElement, {primarySR, additionalSR}, {primaryLR, additionalLR}}
|
||||
|
||||
// Battalion-level elements under Command should have the following additional properties:
|
||||
// shortDescription: a short description of the element's place in the Battalion
|
||||
|
||||
|
||||
// System macros
|
||||
#define CALLSIGN_ELEMENT(callsign,element) callsign##element
|
||||
|
||||
|
||||
|
||||
class BattalionInfo {
|
||||
class Command {
|
||||
callsign = COMMAND_CALLSIGN;
|
||||
shortDescription = "Battalion Command";
|
||||
textColor = LVL1_TEXT_COLOR;
|
||||
// frequencies are in format:
|
||||
// {roleWithinElement, {primarySR, additionalSR}, {primaryLR, additionalLR}}
|
||||
frequencies[] = {
|
||||
{"Contact", {}, {FREQ_BATTALION}},
|
||||
{"Actual", {}, {FREQ_BATTALION}},
|
||||
{"Romeo", {}, {FREQ_BATTALION, FREQ_ECHO_FLIGHT_CAS}}
|
||||
};
|
||||
|
||||
|
||||
class RRC { // WIP
|
||||
callsign = RRC_CALLSIGN;
|
||||
shortDescription = "RRC";
|
||||
textColor = LVL2_TEXT_COLOR;
|
||||
frequencies[] = {
|
||||
{"Contact", {}, {FREQ_BATTALION}},
|
||||
{"Actual", {}, {FREQ_BATTALION, FREQ_ECHO_FLIGHT_CAS}}
|
||||
};
|
||||
};
|
||||
|
||||
class BattalionMedical { // WIP
|
||||
callsign = MEDIC_CALLSIGN;
|
||||
shortDescription = "Battalion Medical";
|
||||
textColor = LVL2_TEXT_COLOR;
|
||||
frequencies[] = {
|
||||
{"Contact", {FREQ_ALL_MEDICAL_SR}, {FREQ_BATTALION}},
|
||||
{"Actual", {FREQ_BATTALION_MEDICAL_INTERCOM, FREQ_ALL_MEDICAL_SR}, {FREQ_BATTALION, FREQ_ECHO_FLIGHT_LOGISTICS}},
|
||||
{"General", {FREQ_BATTALION_MEDICAL_INTERCOM, FREQ_ALL_MEDICAL_SR}, {}}
|
||||
};
|
||||
};
|
||||
|
||||
class WeaponsSquad { // WIP
|
||||
callsign = WPN_CALLSIGN;
|
||||
shortDescription = "Special Weapons Squad";
|
||||
textColor = LVL2_TEXT_COLOR;
|
||||
frequencies[] = {
|
||||
{"Contact", {}, {FREQ_BATTALION}}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
class AlphaCompany {
|
||||
callsign = ALPHA_CALLSIGN;
|
||||
shortDescription = "Alpha Company";
|
||||
textColor = LVL2_TEXT_COLOR;
|
||||
frequencies[] = {
|
||||
{"Contact", {}, {FREQ_ALPHA_COMPANY, FREQ_BATTALION}}
|
||||
};
|
||||
|
||||
class Platoon1 {
|
||||
callsign = CALLSIGN_ELEMENT(ALPHA_CALLSIGN, 1-6);
|
||||
textColor = LVL3_TEXT_COLOR;
|
||||
frequencies[] = {
|
||||
{"Actual", {FREQ_PLATOON1_SR, FREQ_PLATOON1_RTO}, {FREQ_PLATOON1_LR, FREQ_ALPHA_COMPANY}},
|
||||
{"Romeo", {}, {FREQ_BATTALION, FREQ_ECHO_FLIGHT_CAS, FREQ_ECHO_FLIGHT_LOGISTICS}}
|
||||
};
|
||||
class Squad1 {
|
||||
callsign = CALLSIGN_ELEMENT(ALPHA_CALLSIGN, 1-1);
|
||||
textColor = LVL4_TEXT_COLOR;
|
||||
frequencies[] = {
|
||||
{"Actual", {110, FREQ_PLATOON1_SR}, {FREQ_PLATOON1_LR}},
|
||||
{"Alpha Team", {111, 110}, {}},
|
||||
{"Bravo Team", {112, 110}, {}},
|
||||
{"Medic", {110, FREQ_ALL_MEDICAL_SR}, {}}
|
||||
};
|
||||
};
|
||||
class Squad2 {
|
||||
callsign = CALLSIGN_ELEMENT(ALPHA_CALLSIGN, 1-2);
|
||||
textColor = LVL4_TEXT_COLOR;
|
||||
frequencies[] = {
|
||||
{"Actual", {120, FREQ_PLATOON1_SR}, {FREQ_PLATOON1_LR}},
|
||||
{"Alpha Team", {121, 120}, {}},
|
||||
{"Bravo Team", {122, 120}, {}},
|
||||
{"Medic", {120, FREQ_ALL_MEDICAL_SR}, {}}
|
||||
};
|
||||
};
|
||||
class Squad3 {
|
||||
callsign = CALLSIGN_ELEMENT(ALPHA_CALLSIGN, 1-3);
|
||||
textColor = LVL4_TEXT_COLOR;
|
||||
frequencies[] = {
|
||||
{"Actual", {130, FREQ_PLATOON1_SR}, {FREQ_PLATOON1_LR}},
|
||||
{"Alpha Team", {131, 130}, {}},
|
||||
{"Bravo Team", {132, 130}, {}},
|
||||
{"Medic", {130, FREQ_ALL_MEDICAL_SR}, {}}
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Platoon2 {
|
||||
callsign = CALLSIGN_ELEMENT(ALPHA_CALLSIGN, 2-6);
|
||||
textColor = LVL3_TEXT_COLOR;
|
||||
frequencies[] = {
|
||||
{"Actual", {FREQ_PLATOON2_SR, FREQ_PLATOON2_RTO}, {FREQ_PLATOON2_LR, FREQ_ALPHA_COMPANY}}
|
||||
};
|
||||
class Squad1 {
|
||||
callsign = CALLSIGN_ELEMENT(ALPHA_CALLSIGN, 2-1);
|
||||
textColor = LVL4_TEXT_COLOR;
|
||||
frequencies[] = {
|
||||
{"Actual", {210, FREQ_PLATOON2_SR}, {FREQ_PLATOON2_LR}},
|
||||
{"Alpha Team", {211, 210}, {}},
|
||||
{"Bravo Team", {212, 210}, {}},
|
||||
{"Medic", {210, FREQ_ALL_MEDICAL_SR}, {}}
|
||||
};
|
||||
};
|
||||
class Squad2 {
|
||||
callsign = CALLSIGN_ELEMENT(ALPHA_CALLSIGN, 2-2);
|
||||
textColor = LVL4_TEXT_COLOR;
|
||||
frequencies[] = {
|
||||
{"Actual", {220, FREQ_PLATOON2_SR}, {FREQ_PLATOON2_LR}},
|
||||
{"Alpha Team", {221, 220}, {}},
|
||||
{"Bravo Team", {222, 220}, {}},
|
||||
{"Medic", {220, FREQ_ALL_MEDICAL_SR}, {}}
|
||||
};
|
||||
};
|
||||
class Squad3 {
|
||||
callsign = CALLSIGN_ELEMENT(ALPHA_CALLSIGN, 2-3);
|
||||
textColor = LVL4_TEXT_COLOR;
|
||||
frequencies[] = {
|
||||
{"Actual", {230, FREQ_PLATOON2_SR}, {FREQ_PLATOON2_LR}},
|
||||
{"Alpha Team", {231, 230}, {}},
|
||||
{"Bravo Team", {232, 230}, {}},
|
||||
{"Medic", {230, FREQ_ALL_MEDICAL_SR}, {}}
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class EchoCompany {
|
||||
callsign = ECHO_CALLSIGN;
|
||||
shortDescription = "Echo Company";
|
||||
textColor = LVL2_TEXT_COLOR;
|
||||
frequencies[] = {
|
||||
{"Contact", {}, {FREQ_BATTALION}},
|
||||
{"Actual", {}, {FREQ_BATTALION}}
|
||||
};
|
||||
|
||||
class Flight {
|
||||
callsign = CALLSIGN_ELEMENT(ECHO_CALLSIGN, FLIGHT);
|
||||
textColor = LVL3_TEXT_COLOR;
|
||||
frequencies[] = {
|
||||
{"Contact", {}, {FREQ_BATTALION}},
|
||||
{"Actual", {}, {FREQ_ECHO_FLIGHT_INTERCOM, FREQ_BATTALION}},
|
||||
{"CAS Support", {}, {FREQ_ECHO_FLIGHT_INTERCOM, FREQ_ECHO_FLIGHT_CAS}},
|
||||
{"Logistics", {}, {FREQ_ECHO_FLIGHT_INTERCOM, FREQ_ECHO_FLIGHT_LOGISTICS}}
|
||||
};
|
||||
};
|
||||
|
||||
class Ground {
|
||||
callsign = CALLSIGN_ELEMENT(ECHO_CALLSIGN, GROUND);
|
||||
textColor = LVL3_TEXT_COLOR;
|
||||
frequencies[] = {
|
||||
{"Contact", {}, {FREQ_BATTALION}},
|
||||
{"Actual", {}, {FREQ_ECHO_GROUND, FREQ_BATTALION}}
|
||||
};
|
||||
|
||||
class Logistics {
|
||||
callsign = CALLSIGN_ELEMENT(ECHO_CALLSIGN, LOGISTICS);
|
||||
textColor = LVL4_TEXT_COLOR;
|
||||
frequencies[] = {
|
||||
{"Contact", {}, {FREQ_ECHO_GROUND}},
|
||||
{"Actual", {}, {FREQ_ECHO_GROUND_LOGISTICS, FREQ_ECHO_GROUND}},
|
||||
{"General", {}, {FREQ_ECHO_GROUND_LOGISTICS}},
|
||||
{"Convoy", {}, {FREQ_CONVOY}}
|
||||
};
|
||||
};
|
||||
|
||||
class Attack {
|
||||
callsign = CALLSIGN_ELEMENT(ECHO_CALLSIGN, ATTACK);
|
||||
textColor = LVL4_TEXT_COLOR;
|
||||
frequencies[] = {
|
||||
{"Contact", {}, {FREQ_ECHO_GROUND, FREQ_ECHO_FLIGHT_CAS}},
|
||||
{"Actual", {}, {FREQ_ECHO_GROUND}},
|
||||
{"General", {}, {FREQ_ECHO_GROUND}},
|
||||
{"Convoy", {}, {FREQ_CONVOY}}
|
||||
};
|
||||
};
|
||||
|
||||
class Artillery {
|
||||
callsign = CALLSIGN_ELEMENT(ECHO_CALLSIGN, ARTILLERY);
|
||||
textColor = LVL4_TEXT_COLOR;
|
||||
frequencies[] = {
|
||||
{"General", {FREQ_ECHO_ARTY_INTERCOM}, {FREQ_ECHO_GROUND, FREQ_ECHO_ARTY}}
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -1,223 +0,0 @@
|
||||
// To access these from SQF:
|
||||
// to get an array of STRING with each subclass name:
|
||||
// (missionConfigFile >> "DisallowedEquipment") call BIS_fnc_getCfgSubClasses
|
||||
// To access a specific class' properties:
|
||||
// (missionConfigFile >> "DisallowedEquipment" >> "blacklisted" >> "label") call BIS_fnc_getCfgData;
|
||||
// (missionConfigFile >> "DisallowedEquipment" >> "blacklisted" >> "description") call BIS_fnc_getCfgData;
|
||||
// (missionConfigFile >> "DisallowedEquipment" >> "blacklisted" >> "items") call BIS_fnc_getCfgDataArray;
|
||||
|
||||
class DisallowedEquipment {
|
||||
class blacklisted {
|
||||
label = "BLACKLISTED WEAPON OR ITEM";
|
||||
description = "Items that NO member is allowed to use.";
|
||||
items[] = {
|
||||
"17BN_ANPVS14", // NVG AN/PVS-14
|
||||
"ej_PVS15D", // NVG AN/PVS-15
|
||||
"ej_VPS15", // NVG AN/PVS-15
|
||||
"LMG_Mk200_black_F", //Mk200 Series
|
||||
"LMG_Mk200_F", //Mk200 Series
|
||||
"rhs_weap_g36c", // G36 Series
|
||||
"rhs_weap_g36kv_ag36", // G36 Series
|
||||
"rhs_weap_g36kv", // G36 Series
|
||||
"rhs_weap_m14_d", // M14 Series
|
||||
"rhs_weap_m14_fiberglass", // M14 Series
|
||||
"rhs_weap_m14_rail_d", // M14 Series
|
||||
"rhs_weap_m14_rail_fiberglass", // M14 Series
|
||||
"rhs_weap_m14_rail_wd", // M14 Series
|
||||
"rhs_weap_m14_rail", // M14 Series
|
||||
"rhs_weap_m14_ris_d", // M14 Series
|
||||
"rhs_weap_m14_ris_fiberglass", // M14 Series
|
||||
"rhs_weap_m14_ris_wd", // M14 Series
|
||||
"rhs_weap_m14_ris", // M14 Series
|
||||
"rhs_weap_m14_socom_rail", // M14 Series
|
||||
"rhs_weap_m14_socom", // M14 Series
|
||||
"rhs_weap_m14_wd", // M14 Series
|
||||
"rhs_weap_m14_weap_m14ebrri", // M14 Series
|
||||
"rhs_weap_m14", // M14 Series
|
||||
"rhs_weap_m16a4_carryhandle_M203", // M16 Series
|
||||
"rhs_weap_m16a4_carryhandle", // M16 Series
|
||||
"rhs_weap_m16a4_imod_M203", // M16 Series
|
||||
"rhs_weap_m16a4_imod", // M16 Series
|
||||
"rhs_weap_m16a4", // M16 Series
|
||||
"rhs_weap_m27iar_grip", // M27 Series
|
||||
"rhs_weap_m27iar", // M27 Series
|
||||
"rhsusf_ANPVS_14", // NVG AN/PVS-14
|
||||
"rhsusf_ANPVS_15", // NVG AN/PVS-15
|
||||
"SMA_ACRREM", //Remington ACR 556+6.5
|
||||
"SMA_ACRREMAFG", //Remington ACR 556+6.5
|
||||
"SMA_ACRREMAFGblk", //Remington ACR 556+6.5
|
||||
"SMA_ACRREMAFGCQB", //Remington ACR 556+6.5
|
||||
"SMA_ACRREMAFGCQBblk", //Remington ACR 556+6.5
|
||||
"SMA_ACRREMblk", //Remington ACR 556+6.5
|
||||
"SMA_ACRREMCQBGL", //Remington ACR 556+6.5
|
||||
"SMA_ACRREMGL_B", //Remington ACR 556+6.5
|
||||
"SMA_ACRREMGL", //Remington ACR 556+6.5
|
||||
"SMA_ACRREMMOE", //Remington ACR 556+6.5
|
||||
"SMA_ACRREMMOEblk", //Remington ACR 556+6.5
|
||||
"SMA_ACRREMMOECQB", //Remington ACR 556+6.5
|
||||
"SMA_ACRREMMOECQBblk", //Remington ACR 556+6.5
|
||||
"srifle_DMR_06_camo_F", // M14 Series
|
||||
"srifle_DMR_06_hunter_F", // M14 Series
|
||||
"srifle_DMR_06_olive_F", // M14 Series
|
||||
"srifle_EBR_F", // Mk14 Series
|
||||
"Tier1_SIG_CMX_115_Virtus_300BLK_Black", // MCX 300 Blackout
|
||||
"Tier1_SIG_CMX_115_Virtus_300BLK_Desert", // MCX 300 Blackout
|
||||
"Tier1_SIG_CMX_115_Virtus_300BLK_FDE", // MCX 300 Blackout
|
||||
"Tier1_SIG_CMX_115_Virtus_300BLK", // MCX 300 Blackout
|
||||
"UK3CB_AG36_MLIC", // G36 Series
|
||||
"UK3CB_AG36_TAC_K", // G36 Series
|
||||
"UK3CB_AG36A1", // G36 Series
|
||||
"UK3CB_AG36E1", // G36 Series
|
||||
"UK3CB_AG36V", // G36 Series
|
||||
"UK3CB_FNFAL_FOREGRIP", // FN_FAL Series
|
||||
"UK3CB_FNFAL_FULL_RAILS", // FN_FAL Series
|
||||
"UK3CB_FNFAL_FULL", // FN_FAL Series
|
||||
"UK3CB_FNFAL_OSW_GL", // FN_FAL Series
|
||||
"UK3CB_FNFAL_OSW", // FN_FAL Series
|
||||
"UK3CB_FNFAL_PARA_RAILS", // FN_FAL Series
|
||||
"UK3CB_FNFAL_PARA", // FN_FAL Series
|
||||
"UK3CB_FNFAL_STG58", // FN_FAL Series
|
||||
"UK3CB_G36_KSK_K", // G36 Series
|
||||
"UK3CB_G36_KSK", // G36 Series
|
||||
"UK3CB_G36_LSW", // G36 Series
|
||||
"UK3CB_G36_MLIC_C", // G36 Series
|
||||
"UK3CB_G36_MLIC_K", // G36 Series
|
||||
"UK3CB_G36_MLIC", // G36 Series
|
||||
"UK3CB_G36_TAC_C", // G36 Series
|
||||
"UK3CB_G36_TAC", // G36 Series
|
||||
"UK3CB_G36A1_C", // G36 Series
|
||||
"UK3CB_G36A1_K", // G36 Series
|
||||
"UK3CB_G36A1", // G36 Series
|
||||
"UK3CB_G36E1_C", // G36 Series
|
||||
"UK3CB_G36E1_K", // G36 Series
|
||||
"UK3CB_G36E1", // G36 Series
|
||||
"UK3CB_G36V_C", // G36 Series
|
||||
"UK3CB_G36V_K", // G36 Series
|
||||
"UK3CB_G36V", // G36 Series
|
||||
"UK3CB_M14_Railed", // M14 Series
|
||||
"UK3CB_M14", // M14 Series
|
||||
"UK3CB_M14DMR_BLK", // M14 Series
|
||||
"UK3CB_M14DMR_Railed_BLK", // M14 Series
|
||||
"UK3CB_M14DMR_Railed", // M14 Series
|
||||
"UK3CB_M14DMR", // M14 Series
|
||||
"UK3CB_M16_Carbine", // M16 Series
|
||||
"UK3CB_M16A1_LSW", // M16 Series
|
||||
"UK3CB_M16A1", // M16 Series
|
||||
"UK3CB_M16A2_UGL", // M16 Series
|
||||
"UK3CB_M16A2", // M16 Series
|
||||
"UK3CB_M16A3", // M16 Series
|
||||
"USP_PVS_14", // NVG AN/PVS-14
|
||||
"USP_PVS_15" // NVG AN/PVS-15
|
||||
};
|
||||
};
|
||||
|
||||
class restrictedItems {
|
||||
label = "RESTRICTED ITEM";
|
||||
description = "Items that are allowed for specific USE Case (RRC / Marksman / etc.)";
|
||||
items[] = {
|
||||
"A3_GPNVG18_BLK_TI", // Thermal Quad
|
||||
"A3_GPNVG18_REC_BLK_TI", // Thermal Quad
|
||||
"A3_GPNVG18_REC_TI", // Thermal Quad
|
||||
"A3_GPNVG18_TI", // Thermal Quad
|
||||
"A3_GPNVG18b_BLK_TI", // Thermal Quad
|
||||
"A3_GPNVG18b_REC_BLK_TI", // Thermal Quad
|
||||
"A3_GPNVG18b_REC_TI", // Thermal Quad
|
||||
"A3_GPNVG18b_TI", // Thermal Quad
|
||||
"ACE_optic_LRPS_2D", //Nightforce Series Optic
|
||||
"ACE_optic_LRPS_PIP", //Nightforce Series Optic
|
||||
"NVGogglesB_blk_F", // ENVG
|
||||
"NVGogglesB_grn_F", // ENVG
|
||||
"NVGogglesB_gry_F", // ENVG
|
||||
"optic_lrps_ghex_F", //Nightforce Series Optic
|
||||
"optic_lrps_tna_F", //Nightforce Series Optic
|
||||
"optic_lrps", //Nightforce Series Optic
|
||||
"optic_Nightstalker", // Thermal Optic
|
||||
"optic_tws_mg", // Thermal Optic
|
||||
"optic_tws", // Thermal Optic
|
||||
"rhsusf_acc_anpas13gv1", // Thermal Optic
|
||||
"rhsusf_acc_anpvs27", // Thermal Optic
|
||||
"Tier1_ANPVS10_Tan", // Thermal Optic
|
||||
"Tier1_ATACR18_ADM_Black_Vanilla", //Nightforce Series Optic
|
||||
"Tier1_ATACR18_ADM_Black", //Nightforce Series Optic
|
||||
"Tier1_ATACR18_ADM_Desert_Vanilla", //Nightforce Series Optic
|
||||
"Tier1_ATACR18_ADM_Desert", //Nightforce Series Optic
|
||||
"Tier1_ATACR18_ADM_T1_Black_Vanilla", //Nightforce Series Optic
|
||||
"Tier1_ATACR18_ADM_T1_Black", //Nightforce Series Optic
|
||||
"Tier1_ATACR18_ADM_T1_Desert_Vanilla", //Nightforce Series Optic
|
||||
"Tier1_ATACR18_ADM_T1_Desert", //Nightforce Series Optic
|
||||
"Tier1_ATACR18_Geissele_Black_Vanilla", //Nightforce Series Optic
|
||||
"Tier1_ATACR18_Geissele_Black", //Nightforce Series Optic
|
||||
"Tier1_ATACR18_Geissele_Desert_Vanilla", //Nightforce Series Optic
|
||||
"Tier1_ATACR18_Geissele_Desert", //Nightforce Series Optic
|
||||
"Tier1_ATACR18_Geissele_Docter_Black_Vanilla", //Nightforce Series Optic
|
||||
"Tier1_ATACR18_Geissele_Docter_Black", //Nightforce Series Optic
|
||||
"Tier1_ATACR18_Geissele_Docter_Desert_Vanilla", //Nightforce Series Optic
|
||||
"Tier1_ATACR18_Geissele_Docter_Desert" //Nightforce Series Optic
|
||||
};
|
||||
};
|
||||
|
||||
class tabbedItems { // Items that are allowed for individuals with Ranger Tab
|
||||
label = "TABBED WEAPON";
|
||||
description = "Items that are allowed for individuals with Ranger Tab.";
|
||||
items[] = {
|
||||
"arifle_MX_black_F", // MX Series
|
||||
"arifle_MX_F", // MX Series
|
||||
"arifle_MX_GL_black_F", // MX 3GL Series
|
||||
"arifle_MX_GL_F", // MX 3GL Series
|
||||
"arifle_MX_GL_khk_F", // MX 3GL Series
|
||||
"arifle_MX_khk_F", // MX Series
|
||||
"arifle_MX_SW_black_F", // MX LSW Series
|
||||
"arifle_MX_SW_F", // MX LSW Series
|
||||
"arifle_MX_SW_khk_F", // MX LSW Series
|
||||
"arifle_MXC_black_F", // MXC Series
|
||||
"arifle_MXC_F", // MXC Series
|
||||
"arifle_MXC_khk_F", // MXC Series
|
||||
"arifle_MXM_black_F", // MXM Series
|
||||
"arifle_MXM_F", // MXM Series
|
||||
"arifle_MXM_khk_F", // MXM Series
|
||||
"arifle_SPAR_03_blk_F", // HK417 Series
|
||||
"arifle_SPAR_03_khk_F", // HK417 Series
|
||||
"arifle_SPAR_03_snd_F", // HK417 Series
|
||||
"rhs_weap_SCARH_CQC", // Scar H Series
|
||||
"rhs_weap_SCARH_FDE_CQC", // Scar H Series
|
||||
"rhs_weap_SCARH_FDE_LB", // Scar H Series
|
||||
"rhs_weap_SCARH_FDE_STD", // Scar H Series
|
||||
"rhs_weap_SCARH_LB", // Scar H Series
|
||||
"rhs_weap_SCARH_STD", // Scar H Series
|
||||
"rhs_weap_SCARH_USA_CQC", // Scar H Series
|
||||
"rhs_weap_SCARH_USA_LB", // Scar H Series
|
||||
"rhs_weap_SCARH_USA_STD", // Scar H Series
|
||||
"SMA_HK417_16in", // HK417 Series
|
||||
"SMA_HK417", // HK417 Series
|
||||
"SMA_HK417vfg", // HK417 Series
|
||||
"SMA_Mk17_16_black", // Scar H Series
|
||||
"SMA_Mk17_16_green", // Scar H Series
|
||||
"SMA_Mk17_16", // Scar H Series
|
||||
"SMA_Mk17_black", // Scar H Series
|
||||
"SMA_Mk17_EGML_black", // Scar H Series
|
||||
"SMA_Mk17_EGML_green", // Scar H Series
|
||||
"SMA_Mk17_EGML", // Scar H Series
|
||||
"SMA_Mk17_green", // Scar H Series
|
||||
"SMA_Mk17", // Scar H Series
|
||||
"Tier1_MK48_Mod0_Desert", // Mk48 Series
|
||||
"Tier1_MK48_Mod0_Para_Desert", // Mk48 Series
|
||||
"Tier1_MK48_Mod0_Para", // Mk48 Series
|
||||
"Tier1_MK48_Mod0", // Mk48 Series
|
||||
"Tier1_MK48_Mod1_Desert", // Mk48 Series
|
||||
"Tier1_MK48_Mod1", // Mk48 Series
|
||||
"Tier1_SR25_ec_tan", // SR-25 Series
|
||||
"Tier1_SR25_ec", // SR-25 Series
|
||||
"Tier1_SR25_tan", // SR-25 Series
|
||||
"Tier1_SR25" // SR-25 Series
|
||||
};
|
||||
};
|
||||
|
||||
class memeItems {
|
||||
label = "MEME ITEM";
|
||||
description = "Items that serve no purpose other than to MEME.";
|
||||
items[] = {
|
||||
"ACE_Banana",
|
||||
"UK3CB_Cocaine_Brick"
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -9,9 +9,6 @@ if (!isServer) then {
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
};
|
||||
|
||||
// define milsim_resupply_crateDefinitions
|
||||
call milsim_fnc_crateDefinitions;
|
||||
|
||||
["InitializePlayer", [player, true]] call BIS_fnc_dynamicGroups;
|
||||
|
||||
nil;
|
||||
@@ -1,8 +1,5 @@
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
// define milsim_resupply_crateDefinitions
|
||||
call milsim_fnc_crateDefinitions;
|
||||
|
||||
milsim_baseObjects = allMissionObjects "ModuleRespawnPosition_F";
|
||||
publicVariable "milsim_baseObjects";
|
||||
|
||||
|
||||
@@ -1,201 +0,0 @@
|
||||
milsim_resupply_crateDefinitions = createHashMapFromArray [
|
||||
["AMMO LIGHT", createHashMapFromArray [
|
||||
["className", "Box_Syndicate_Ammo_F"],
|
||||
["displayName", "Ammo Crate"],
|
||||
["description", "A crate containing general ammunition and equipment for an infantry squad."],
|
||||
["icon", "\A3\ui_f\data\igui\cfg\simpleTasks\types\rifle_ca.paa"],
|
||||
["items", createHashMapFromArray [
|
||||
["backpacks", []],
|
||||
["weapons", [
|
||||
["rhs_weap_M136",4],
|
||||
["rhs_weap_M136_hp",4],
|
||||
["rhs_weap_m72a7",2]
|
||||
]],
|
||||
["magazines", [
|
||||
["1Rnd_SmokePurple_Grenade_shell",12],
|
||||
["1Rnd_SmokeBlue_Grenade_shell",24],
|
||||
["1Rnd_SmokeOrange_Grenade_shell",12],
|
||||
["rhs_mag_M441_HE",25],
|
||||
["rhs_mag_M433_HEDP",15],
|
||||
["ACE_40mm_Flare_ir",12],
|
||||
["rhsusf_200Rnd_556x45_mixed_soft_pouch_coyote",25],
|
||||
["rhsusf_20Rnd_762x51_m993_Mag",25],
|
||||
["SmokeShell",12],
|
||||
["rhs_mag_m67",12],
|
||||
["1Rnd_Smoke_Grenade_shell",24],
|
||||
["1Rnd_SmokeRed_Grenade_shell",24],
|
||||
["1Rnd_SmokeGreen_Grenade_shell",24],
|
||||
["1Rnd_SmokeYellow_Grenade_shell",12],
|
||||
["Tier1_30Rnd_556x45_M856A1_EMag",25],
|
||||
["Tier1_30Rnd_556x45_Mk318Mod0_EMag",75],
|
||||
["ACE_30Rnd_65_Creedmor_mag",25],
|
||||
["SMA_30Rnd_762x35_BLK_EPR",25],
|
||||
["Tier1_30Rnd_762x35_300BLK_SMK_PMAG",25],
|
||||
["SMA_30Rnd_68x43_SPC_FMJ",25],
|
||||
["SMA_30Rnd_68x43_SPC_FMJ_Tracer",25],
|
||||
["SMA_20Rnd_762x51mm_M80A1_EPR",25],
|
||||
["SMA_20Rnd_762x51mm_M80A1_EPR_Tracer",25],
|
||||
["SMA_20Rnd_762x51mm_Mk316_Mod_0_Special_Long_Range",25],
|
||||
["SMA_20Rnd_762x51mm_Mk316_Mod_0_Special_Long_Range_Tracer",25],
|
||||
["Tier1_250Rnd_762x51_Belt_M993_AP",15],
|
||||
["ACE_20Rnd_762x51_Mag_Tracer",25],
|
||||
["ACE_20Rnd_762x51_M993_AP_Mag",25],
|
||||
["rhsusf_20Rnd_762x51_SR25_m993_Mag",25],
|
||||
["Tier1_20Rnd_762x51_M993_SR25_Mag",25],
|
||||
["Tier1_20Rnd_65x48_Creedmoor_SR25_Mag",25],
|
||||
["rhssaf_30rnd_556x45_EPR_G36", 25],
|
||||
["DemoCharge_Remote_Mag",16]
|
||||
]],
|
||||
["items", []]
|
||||
]
|
||||
]]],
|
||||
["AMMO HEAVY", createHashMapFromArray [
|
||||
["className", "Box_NATO_Wps_F"],
|
||||
["displayName", "Heavy Ammo Crate"],
|
||||
["description", "A crate containing mixed ammo for rifles, ARs, MAT, and HAT."],
|
||||
["icon", "\A3\ui_f\data\igui\cfg\simpleTasks\types\heli_ca.paa"],
|
||||
["items", createHashMapFromArray [
|
||||
["backpacks", []],
|
||||
["weapons", []],
|
||||
["magazines", [
|
||||
["MRAWS_HEAT_F",35],
|
||||
["MRAWS_HE_F",15],
|
||||
["Tier1_250Rnd_762x51_Belt_M993_AP",50],
|
||||
["Tier1_30Rnd_556x45_M856A1_EMag",25],
|
||||
["Tier1_30Rnd_556x45_Mk318Mod0_EMag",50],
|
||||
["Titan_AA",10],
|
||||
["Titan_AT",10],
|
||||
["200Rnd_65x39_cased_Box_Tracer_Red",50]
|
||||
]],
|
||||
["items", []]
|
||||
]
|
||||
]]],
|
||||
["AMMO MORTAR", createHashMapFromArray [
|
||||
["className", "Box_Syndicate_Wps_F"],
|
||||
["displayName", "Mortar Ammo Crate"],
|
||||
["description", "A crate containing mortar ammunition."],
|
||||
["icon", "\A3\ui_f\data\igui\cfg\simpleTasks\types\scout_ca.paa"],
|
||||
["items", createHashMapFromArray [
|
||||
["backpacks", []],
|
||||
["weapons", []],
|
||||
["magazines", [
|
||||
["ACE_1Rnd_82mm_Mo_HE",24],
|
||||
["ACE_1Rnd_82mm_Mo_Smoke",12],
|
||||
["ACE_1Rnd_82mm_Mo_Illum",12]
|
||||
]],
|
||||
["items", []]
|
||||
]
|
||||
]]],
|
||||
["MEDICAL", createHashMapFromArray [
|
||||
["className", "ACE_medicalSupplyCrate_advanced"],
|
||||
["displayName", "Medical Crate"],
|
||||
["description", "A crate containing medical supplies."],
|
||||
["icon", "\A3\ui_f\data\igui\cfg\simpleTasks\types\heal_ca.paa"],
|
||||
["items", createHashMapFromArray [
|
||||
["backpacks", []],
|
||||
["weapons", []],
|
||||
["magazines", []],
|
||||
["items", [
|
||||
["ACE_packingBandage",100],
|
||||
["ACE_elasticBandage",100],
|
||||
["ACE_tourniquet",48],
|
||||
["ACE_splint",48],
|
||||
["ACE_morphine",50],
|
||||
["ACE_epinephrine",50],
|
||||
["ACE_bloodIV",75],
|
||||
["ACE_bloodIV_500",50],
|
||||
["ACE_bloodIV_250",25],
|
||||
["ACE_quikclot",75],
|
||||
["ACE_personalAidKit", 5],
|
||||
["ACE_surgicalKit", 5]
|
||||
]]
|
||||
]
|
||||
]]],
|
||||
["LAUNCHERS", createHashMapFromArray [
|
||||
["className", "Box_NATO_WpsLaunch_F"],
|
||||
["displayName", "Launcher Crate"],
|
||||
["description", "A crate containing missile launchers and ammunition."],
|
||||
["icon", "\A3\ui_f\data\igui\cfg\simpleTasks\types\heli_ca.paa"],
|
||||
["items", createHashMapFromArray [
|
||||
["backpacks", [
|
||||
|
||||
]],
|
||||
["weapons", [
|
||||
["launch_B_Titan_short_F",2],
|
||||
["launch_NLAW_F",2],
|
||||
["rhs_weap_fim92",2]
|
||||
]],
|
||||
["magazines", [
|
||||
["Titan_AA",6],
|
||||
["Titan_AT",6]
|
||||
]],
|
||||
["items", [
|
||||
|
||||
]]
|
||||
]
|
||||
]]],
|
||||
["CSW", createHashMapFromArray [
|
||||
["className", "Box_NATO_Equip_F"],
|
||||
["displayName", "CSW Crate"],
|
||||
["description", "A crate containing backpacks that assemble into static weapons."],
|
||||
["icon", "\A3\ui_f\data\igui\cfg\simpleTasks\types\defend_ca.paa"],
|
||||
["items", createHashMapFromArray [
|
||||
["backpacks", [
|
||||
["RHS_M2_Gun_Bag",2],
|
||||
["RHS_M2_Tripod_Bag",2],
|
||||
["RHS_M2_MiniTripod_Bag",2],
|
||||
["rhs_Tow_Gun_Bag",2],
|
||||
["rhs_TOW_Tripod_Bag",2],
|
||||
["UK3CB_Static_M240_Elcan_Gun_Bag",2],
|
||||
["UK3CB_B_Static_M240_Elcan_Tripod_Low_Bag_US_D",2],
|
||||
["RHS_Mk19_Gun_Bag",2],
|
||||
["RHS_Mk19_Tripod_Bag",2]
|
||||
]],
|
||||
["weapons", []],
|
||||
["magazines", []],
|
||||
["items", []]
|
||||
]
|
||||
]]],
|
||||
["MORTAR MK6", createHashMapFromArray [
|
||||
["className", "Box_NATO_WpsSpecial_F"],
|
||||
["displayName", "Mortar MK6 Supply Crate"],
|
||||
["description", "A crate containing Mk6 mortar resupply (tubes) and tools."],
|
||||
["icon", "\A3\ui_f\data\igui\cfg\simpleTasks\types\scout_ca.paa"],
|
||||
["items", createHashMapFromArray [
|
||||
["backpacks", [
|
||||
["B_Mortar_01_support_F",3],
|
||||
["B_Mortar_01_weapon_F",6],
|
||||
["UK3CB_LSM_B_B_CARRYALL_RADIO_TIG_STRIPE_01",1]
|
||||
]],
|
||||
["weapons", [
|
||||
["ACE_Vector",2]
|
||||
]],
|
||||
["magazines", [
|
||||
["acex_intelitems_notepad",2]
|
||||
]],
|
||||
["items", [
|
||||
["ACE_artilleryTable",2],
|
||||
["ACE_RangeTable_82mm",2],
|
||||
["ACE_microDAGR",2],
|
||||
["ACE_MapTools",2]
|
||||
]]
|
||||
]
|
||||
]]],
|
||||
["MORTAR 60MM COMMANDO", createHashMapFromArray [
|
||||
["className", "Box_NATO_WpsSpecial_F"],
|
||||
["displayName", "Mortar 60mm Commando Supply Crate"],
|
||||
["description", "A crate containing COMMANDO 60mm mortar shells and some STANAGs."],
|
||||
["icon", "\A3\ui_f\data\igui\cfg\simpleTasks\types\scout_ca.paa"],
|
||||
["items", createHashMapFromArray [
|
||||
["backpacks", []],
|
||||
["weapons", []],
|
||||
["magazines", [
|
||||
["twc_2inch_he_1rnd",70],
|
||||
["twc_2inch_smoke_1rnd",15],
|
||||
["twc_2inch_illum_1rnd",15],
|
||||
["Tier1_30Rnd_556x45_Mk318Mod0_EMag",20]
|
||||
]],
|
||||
["items", []]
|
||||
]
|
||||
]]]
|
||||
];
|
||||
@@ -1,18 +1,19 @@
|
||||
/*
|
||||
* Author: Hizumi & IndigoFox
|
||||
*
|
||||
* Create Mortar resupply box for the 17th Battalion
|
||||
* Create Mortar resupply box for the 17th Battalion. Primarily called from milsim_fnc_addZenModules
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Vehicle - <OBJECT>
|
||||
* 1: Position - <ARRAY>
|
||||
* 1: Type - <STRING>
|
||||
* 2: Position - <ARRAY>
|
||||
*
|
||||
* Return Value:
|
||||
* Function executed <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [box] call milsim_fnc_createBox; // create mortar ammo box via init line of editor object
|
||||
* [objNull, pos] call milsim_fnc_createBox; // create mortar ammo box via zeus module
|
||||
* [box, "AmmoSquad"] call milsim_fnc_createBox; // create mortar ammo box via init line of editor object
|
||||
* [objNull, "AmmoHeavy", pos] call milsim_fnc_createBox; // create mortar ammo box via zeus module
|
||||
*
|
||||
* Public: Yes
|
||||
*
|
||||
@@ -34,68 +35,133 @@ params [
|
||||
["_pos", [0,0,0], [[]], 3]
|
||||
];
|
||||
|
||||
if (isNil "milsim_resupply_crateDefinitions") exitWith {
|
||||
format["Resupply Boxes: milsim_resupply_crateDefinitions is not defined, possibly a bad edit?"] remoteExec ["systemChat", 0];
|
||||
false;
|
||||
// get defs class
|
||||
private _supplyCratesCfg = call milsim_resupply_fnc_getSupplyCratesCfg;
|
||||
if (!isClass _supplyCratesCfg) exitWith {
|
||||
["Resupply Boxes: Failed to load crate definitions, possibly a bad edit?"] call BIS_fnc_error;
|
||||
objNull;
|
||||
};
|
||||
|
||||
// get the subclass names
|
||||
private _boxTypesAvailable = _supplyCratesCfg call BIS_fnc_getCfgSubClasses;
|
||||
|
||||
// if no type is provided, show the available types
|
||||
if (_type isEqualTo "") exitWith {
|
||||
format["Resupply Boxes: [_boxObject, _type, _pos] call milsim_fnc_createBox"] remoteExec ["systemChat", 0];
|
||||
format["Please use one of the following types for _type:"] remoteExec ["systemChat", 0];
|
||||
format["%1", (keys milsim_resupply_crateDefinitions)] remoteExec ["systemChat", 0];
|
||||
false;
|
||||
[
|
||||
"%1 | %2 %3",
|
||||
"Resupply Boxes: [_boxObject, _type, _pos] call milsim_fnc_createBox",
|
||||
"No type provided. Please use one of the following types for _type:",
|
||||
_boxTypesAvailable joinString ", "
|
||||
] call BIS_fnc_error;
|
||||
objNull;
|
||||
};
|
||||
|
||||
private _boxData = milsim_resupply_crateDefinitions getOrDefault [_type, createHashMap];
|
||||
if (count _boxData isEqualTo 0) exitWith {
|
||||
format["Resupply Boxes: [_boxObject, _type, _pos] call milsim_fnc_createBox"] remoteExec ["systemChat", 0];
|
||||
format["%1 is not a valid type for _type", _type] remoteExec ["systemChat", 0];
|
||||
format["Please use one of the following types for _type:"] remoteExec ["systemChat", 0];
|
||||
format["%1", (keys milsim_resupply_crateDefinitions)] remoteExec ["systemChat", 0];
|
||||
false;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// get the box definition class
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
private _boxDef = (_supplyCratesCfg >> _type);
|
||||
// validate it exists
|
||||
if (!isClass _boxDef) exitWith {
|
||||
[
|
||||
"%1 | %2 %3",
|
||||
"Resupply Boxes: [_boxObject, _type, _pos] call milsim_fnc_createBox",
|
||||
"Invalid type provided. Please use one of the following types for _type:",
|
||||
_boxTypesAvailable joinString ", "
|
||||
] call BIS_fnc_error;
|
||||
objNull;
|
||||
};
|
||||
|
||||
private _boxItems = _boxData getOrDefault ["items", createHashMap];
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Create box if one wasn't provided in parameters
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
if (isNull _box) then {
|
||||
_box = (_boxData get "className") createVehicle _pos;
|
||||
private _neededBoxType = getText(_boxDef >> "boxClass");
|
||||
if (_neededBoxType isEqualTo "") exitWith {
|
||||
[
|
||||
"Resupply Boxes: Failed to create box. No boxClass defined in the box definition."
|
||||
] call BIS_fnc_error;
|
||||
objNull;
|
||||
};
|
||||
_box = _neededBoxType createVehicle _pos;
|
||||
};
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Clear box
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
clearBackpackCargoGlobal _box;
|
||||
clearItemCargoGlobal _box;
|
||||
clearMagazineCargoGlobal _box;
|
||||
clearWeaponCargoGlobal _box;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Get [item, quantity] arrays from definition
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
private _backpacks = ([_boxDef >> "backpacks"] call BIS_fnc_getCfgDataArray);
|
||||
if (isNil "_backpacks") exitWith {
|
||||
[
|
||||
"Resupply Boxes: Failed to create box. No backpacks defined in the box definition."
|
||||
] call BIS_fnc_error;
|
||||
objNull;
|
||||
};
|
||||
|
||||
private _weapons = ([_boxDef >> "weapons"] call BIS_fnc_getCfgDataArray);
|
||||
if (isNil "_weapons") exitWith {
|
||||
[
|
||||
"Resupply Boxes: Failed to create box. No weapons defined in the box definition."
|
||||
] call BIS_fnc_error;
|
||||
objNull;
|
||||
};
|
||||
|
||||
private _magazines = ([_boxDef >> "magazines"] call BIS_fnc_getCfgDataArray);
|
||||
if (isNil "_magazines") exitWith {
|
||||
[
|
||||
"Resupply Boxes: Failed to create box. No magazines defined in the box definition."
|
||||
] call BIS_fnc_error;
|
||||
objNull;
|
||||
};
|
||||
|
||||
private _items = ([_boxDef >> "items"] call BIS_fnc_getCfgDataArray);
|
||||
if (isNil "_items") exitWith {
|
||||
[
|
||||
"Resupply Boxes: Failed to create box. No items defined in the box definition."
|
||||
] call BIS_fnc_error;
|
||||
objNull;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Add stuff to box
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
{
|
||||
_x params ["_class", "_qty"];
|
||||
|
||||
_box addBackpackCargoGlobal [_class, _qty]
|
||||
|
||||
} foreach (_boxItems getOrDefault ["backpacks", []]);
|
||||
} foreach _backpacks;
|
||||
|
||||
{
|
||||
_x params ["_class", "_qty"];
|
||||
|
||||
_box addItemCargoGlobal [_class, _qty]
|
||||
|
||||
} foreach (_boxItems getOrDefault ["items", []]);
|
||||
} foreach _items;
|
||||
|
||||
{
|
||||
_x params ["_class", "_qty"];
|
||||
|
||||
_box addMagazineCargoGlobal [_class, _qty]
|
||||
|
||||
} foreach (_boxItems getOrDefault ["magazines", []]);
|
||||
} foreach _magazines;
|
||||
|
||||
{
|
||||
_x params ["_class", "_qty"];
|
||||
|
||||
_box addWeaponCargoGlobal [_class, _qty]
|
||||
|
||||
} foreach (_boxItems getOrDefault ["weapons", []]);
|
||||
} foreach _weapons;
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Adjust ACE settings
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// set box size
|
||||
[_box,1] call ace_cargo_fnc_setSize;
|
||||
|
||||
// ignore weight restrictions for carry/drag
|
||||
_box setVariable ["ace_ignoreWeightCarry", true, true];
|
||||
|
||||
// Return the box
|
||||
_box;
|
||||
1
functions/resupply/fn_getSupplyCratesCfg.sqf
Normal file
1
functions/resupply/fn_getSupplyCratesCfg.sqf
Normal file
@@ -0,0 +1 @@
|
||||
(missionConfigFile >> "SupplyCrates");
|
||||
Reference in New Issue
Block a user