Compare commits
28 Commits
3.1.0
...
801328dc6e
| Author | SHA1 | Date | |
|---|---|---|---|
| 801328dc6e | |||
| fbbc699197 | |||
|
9b7042cd7d
|
|||
|
d823ebeb26
|
|||
|
e9fc5cfe21
|
|||
|
dcb8d2d0d6
|
|||
|
ef4c5a63ad
|
|||
| 445cb5e75d | |||
| 09a800ab01 | |||
|
723aebcbf5
|
|||
|
|
6f5affd283 | ||
| dbe5473dad | |||
|
7630efeb4d
|
|||
|
12dd0fc83c
|
|||
|
|
3b06fe717b | ||
|
|
d9dfee0c7b | ||
| 1f1552bd53 | |||
| c912e730ac | |||
|
0301758e28
|
|||
|
|
85e9af6a73 | ||
|
|
32d8589733 | ||
|
|
bc9b20a89d | ||
| 61d3e2faf1 | |||
| 544039efbf | |||
|
15f7225a5f
|
|||
| a3da783d06 | |||
|
18435194a7
|
|||
|
9fc926619e
|
20
CHANGELOG.md
20
CHANGELOG.md
@@ -4,6 +4,26 @@ All notable changes to this project will be documented in this file.
|
|||||||
|
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project badly attempts [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project badly attempts [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [3.1.3] - 2024-01-10
|
||||||
|
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Merge triage-status-draw3d to fix draw overlay for medics
|
||||||
|
|
||||||
|
## [3.1.2] - 2024-01-04
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Add forgotten code file file for medical overlay
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Merge update-flag-exclusions branch to fix issues with vehicles not applying flag
|
||||||
|
|
||||||
|
## [3.1.1] - 2024-01-04
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Spelling Fixes
|
||||||
|
- Update class binding for vehicle flag interaction
|
||||||
|
|
||||||
## [3.1.0] - 2023-12-17
|
## [3.1.0] - 2023-12-17
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ class milsim
|
|||||||
class bindEventHandlers { postInit = 1; };
|
class bindEventHandlers { postInit = 1; };
|
||||||
class bindVehicleActions { postInit = 1; };
|
class bindVehicleActions { postInit = 1; };
|
||||||
class addClientStatsPFH {};
|
class addClientStatsPFH {};
|
||||||
|
class addMedicalOverlayPFH { postInit = 1; };
|
||||||
class calculateClientStats {};
|
class calculateClientStats {};
|
||||||
class initVehicleFlags { postInit = 1; };
|
class initVehicleFlags { postInit = 1; };
|
||||||
class bindEmptyGroupGarbageCleanup { postInit = 1; };
|
class bindEmptyGroupGarbageCleanup { postInit = 1; };
|
||||||
@@ -44,9 +45,14 @@ class milsim
|
|||||||
};
|
};
|
||||||
|
|
||||||
class resupply {
|
class resupply {
|
||||||
|
class crateDefinitions {};
|
||||||
class createAmmoBox {};
|
class createAmmoBox {};
|
||||||
class createWeaponsBox {};
|
class createBox {};
|
||||||
|
class createCSWBox {};
|
||||||
|
class createLaunchersBox {};
|
||||||
class createMedicalBox {};
|
class createMedicalBox {};
|
||||||
|
class createMortarBox {};
|
||||||
|
class createWeaponsBox {};
|
||||||
}
|
}
|
||||||
|
|
||||||
class ambience {
|
class ambience {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ _cpsPFH = [
|
|||||||
},
|
},
|
||||||
"milsim_client_cps_interval" call CBA_settings_fnc_get,
|
"milsim_client_cps_interval" call CBA_settings_fnc_get,
|
||||||
[],
|
[],
|
||||||
{ diag_log text format ["[MILSIM] (client) PFH loaded with interval %1 seconds", "milsim_client_cps_interval" call CBA_settings_fnc_get ], },
|
{ diag_log text format ["[MILSIM] (client) PFH loaded with interval %1 seconds", "milsim_client_cps_interval" call CBA_settings_fnc_get ] },
|
||||||
{ diag_log text format ["[MILSIM] (client) PFH unloaded"] },
|
{ diag_log text format ["[MILSIM] (client) PFH unloaded"] },
|
||||||
{ "milsim_client_cps_enable" call CBA_settings_fnc_get },
|
{ "milsim_client_cps_enable" call CBA_settings_fnc_get },
|
||||||
{ false },
|
{ false },
|
||||||
|
|||||||
99
functions/client/fn_addMedicalOverlayPFH.sqf
Normal file
99
functions/client/fn_addMedicalOverlayPFH.sqf
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
milsim_fnc_addMedicalOverlayPFH
|
||||||
|
|
||||||
|
Author: IndigoFox
|
||||||
|
|
||||||
|
Description:
|
||||||
|
Affects players with medical permissions. Will see a 3D colored dot over nearby (5-10m)
|
||||||
|
unconscious players who are not in a vehicle
|
||||||
|
which indicates their current ACE Triage Card status.
|
||||||
|
Designed to increase efficiency of CCPs.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Force setting if CBA doesn't work?
|
||||||
|
if (isNil "milsim_client_medState3D_enabled") then {
|
||||||
|
milsim_client_medState3D_enabled = true;
|
||||||
|
};
|
||||||
|
if (isNil "milsim_client_medState3D_drawRange") then {
|
||||||
|
milsim_client_medState3D_drawRange = 10;
|
||||||
|
};
|
||||||
|
|
||||||
|
// List of units to draw icons for
|
||||||
|
milsim_client_medState3D_drawTargets = [];
|
||||||
|
|
||||||
|
// ACE Triage colors, for consistency across UIs and functions
|
||||||
|
// #define TRIAGE_COLOR_NONE 0.5, 0.5, 0.5, 0.1
|
||||||
|
// #define TRIAGE_COLOR_MINIMAL 0, 0.5, 0, 0.9
|
||||||
|
// #define TRIAGE_COLOR_DELAYED 1, 0.84, 0, 0.9
|
||||||
|
// #define TRIAGE_COLOR_IMMEDIATE 1, 0, 0, 0.9
|
||||||
|
// #define TRIAGE_COLOR_DECEASED 0, 0, 0, 0.9
|
||||||
|
|
||||||
|
// ACE Triage colors, for consistency across UIs and functions
|
||||||
|
milsim_client_medState3D_colors = [
|
||||||
|
[0, 0.5, 0, 0.9], // TRIAGE_COLOR_MINIMAL
|
||||||
|
[1, 0.84, 0, 0.9], // TRIAGE_COLOR_DELAYED
|
||||||
|
[1, 0, 0, 0.9], // TRIAGE_COLOR_IMMEDIATE
|
||||||
|
[0.15, 0.15, 0.15, 0.9], // TRIAGE_COLOR_DECEASED
|
||||||
|
[0.5, 0.5, 0.5, 0] // TRIAGE_COLOR_NONE
|
||||||
|
];
|
||||||
|
|
||||||
|
// Per-frame handler to draw icons
|
||||||
|
// cleanup
|
||||||
|
if (!isNil "milsim_client_medState3D_pfh") then {
|
||||||
|
[milsim_client_medState3D_pfh] call CBA_fnc_removePerFrameHandler;
|
||||||
|
};
|
||||||
|
// add pfh
|
||||||
|
milsim_client_medState3D_pfh = [{
|
||||||
|
// if disabled, skip processing
|
||||||
|
if (!milsim_client_medState3D_enabled) exitWith {false};
|
||||||
|
// if no targets, skip processing
|
||||||
|
if (count milsim_client_medState3D_drawTargets == 0) exitWith {false};
|
||||||
|
if !([player] call ace_medical_treatment_fnc_isMedic) exitWith {false};
|
||||||
|
{
|
||||||
|
// distance within 10 meters
|
||||||
|
if (player distance _x > milsim_client_medState3D_drawRange) then {continue};
|
||||||
|
// check unit not null, not conscious, and not in a vehicle
|
||||||
|
if (
|
||||||
|
!(_x getVariable ["ACE_isUnconscious", false]) ||
|
||||||
|
!isNull (objectParent _x)
|
||||||
|
) then {continue};
|
||||||
|
|
||||||
|
// color based on triage level
|
||||||
|
private _triageLevel = _x getVariable ["ace_medical_triageLevel", -1];
|
||||||
|
if (_triageLevel == -1) then {continue};
|
||||||
|
private _color = milsim_client_medState3D_colors select (
|
||||||
|
(_x getVariable ["ace_medical_triageLevel", -1]) -1
|
||||||
|
);
|
||||||
|
// draw position, slightly above the prone unit
|
||||||
|
private _drawPos = (visiblePosition _x) vectorAdd [0, 0, 0.5];
|
||||||
|
// draw icon
|
||||||
|
drawIcon3D [
|
||||||
|
"\A3\ui_f\data\map\markers\military\dot_CA.paa", // icon texture
|
||||||
|
_color, // color
|
||||||
|
_drawPos, // position AGL
|
||||||
|
1, // width
|
||||||
|
1, // height
|
||||||
|
0 // angle
|
||||||
|
// further params optional, omitted
|
||||||
|
];
|
||||||
|
} forEach milsim_client_medState3D_drawTargets;
|
||||||
|
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||||
|
|
||||||
|
// subroutine to gather nearest 50 units every 5 seconds and store in milsim_client_medState3D_drawTargets
|
||||||
|
// cleanup
|
||||||
|
if (!isNil "milsim_client_medState3D_drawTargetsPfh") then {
|
||||||
|
[milsim_client_medState3D_drawTargetsPfh] call CBA_fnc_removePerFrameHandler;
|
||||||
|
};
|
||||||
|
// add pfh
|
||||||
|
milsim_client_medState3D_drawTargetsPfh = [{
|
||||||
|
milsim_client_medState3D_drawTargets = (
|
||||||
|
(allUnits + allDeadMen) select {
|
||||||
|
_x isKindOf "CAManBase" &&
|
||||||
|
player distance _x < 50 &&
|
||||||
|
!isNull _x &&
|
||||||
|
player isNotEqualTo _x
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}, 5, false] call CBA_fnc_addPerFrameHandler;
|
||||||
@@ -5,35 +5,40 @@ if ( !hasInterface ) exitWith {};
|
|||||||
"Create Resupply Box",
|
"Create Resupply Box",
|
||||||
{
|
{
|
||||||
params [["_pos", [0,0,0], [[]], 3], ["_target", objNull, [objNull]]];
|
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
|
||||||
|
]];
|
||||||
|
};
|
||||||
|
|
||||||
[
|
[
|
||||||
"Resupply Box Options",
|
"Resupply Box Options",
|
||||||
[
|
[
|
||||||
[ "COMBO", "Box Type", [[1,2,3], [["Ammo"],["Weapons"],["Medical"]],0] ]
|
// [ "COMBO", "Box Type", [[1,2,3], [["Ammo"],["Weapons"],["Medical"]],0] ]
|
||||||
|
["COMBO", "Box Type", [_keysSorted, _comboOptions, 0]]
|
||||||
],
|
],
|
||||||
{
|
{
|
||||||
|
|
||||||
params ["_dialog", "_args"];
|
params ["_dialog", "_args"];
|
||||||
|
|
||||||
_dialog params ["_type"];
|
_dialog params ["_typeOptionSelected"];
|
||||||
_args params ["_pos", "_target"];
|
_args params ["_pos", "_target", "_keysSorted"];
|
||||||
|
|
||||||
switch (_type) do {
|
|
||||||
case 1: {
|
if ([_target, _typeOptionSelected, _pos] call milsim_fnc_createBox) then {
|
||||||
[_target, _pos] call milsim_fnc_createAmmoBox;
|
["Resupply Box", format["Created a %1 box", _typeOptionSelected]] call BIS_fnc_curatorHint;
|
||||||
};
|
|
||||||
case 2: {
|
|
||||||
[_target, _pos] call milsim_fnc_createWeaponsBox;
|
|
||||||
};
|
|
||||||
case 3: {
|
|
||||||
[_target, _pos] call milsim_fnc_createMedicalBox;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
[_pos, _target]
|
[_pos, _target, _options]
|
||||||
] call zen_dialog_fnc_create;
|
] call zen_dialog_fnc_create;
|
||||||
|
|
||||||
}
|
}
|
||||||
] call zen_custom_modules_fnc_register;
|
] call zen_custom_modules_fnc_register;
|
||||||
|
|
||||||
|
|||||||
@@ -80,15 +80,46 @@ milsim_vehicleflag_options = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
private _appliedParentClasses = [
|
||||||
|
"LandVehicle",
|
||||||
|
"Helicopter"
|
||||||
|
];
|
||||||
|
|
||||||
["AllVehicles", "InitPost", {
|
private _modelsWithoutFlagProxies = [
|
||||||
|
"TF373_SOAR_MH47G_Base", // MH-47G Chinook
|
||||||
|
"RHS_MELB_base", // MELB AH-6M/MH-6M/H-6M Little Bird
|
||||||
|
"USAF_C17", // C17 Globemaster III
|
||||||
|
"USAF_C130J", // C130J Super Hercules
|
||||||
|
"USAF_AC130U", // AC130 Spooky II
|
||||||
|
"ej_UH60M_base", // UH-60M Black Hawk + DAP variants
|
||||||
|
"rhsusf_fmtv_base" // M1083A1P2 variants + SOV SOCOM variants
|
||||||
|
];
|
||||||
|
|
||||||
|
{
|
||||||
|
private _parentClass = _x;
|
||||||
|
[_parentClass, "InitPost", {
|
||||||
private _flagActionID = "SetVehicleFlag";
|
private _flagActionID = "SetVehicleFlag";
|
||||||
private _flagMasterAction = [
|
private _flagMasterAction = [
|
||||||
_flagActionID, // id
|
_flagActionID, // id
|
||||||
"Set Vehicle Flag", // displayed title
|
"Set Vehicle Flag", // displayed title
|
||||||
"\A3\ui_f\data\map\markers\flags\nato_ca.paa", // flag icon
|
"\A3\ui_f\data\map\markers\flags\nato_ca.paa", // flag icon
|
||||||
{true}, // statement
|
{true}, // statement
|
||||||
{true}, // condition
|
{
|
||||||
|
params ["_target", "_player", "_params"];
|
||||||
|
private _modelsWithoutFlagProxies = _params select 1;
|
||||||
|
|
||||||
|
// check if hierarchy includes any of the models without flag proxies
|
||||||
|
private _excluded = false;
|
||||||
|
{
|
||||||
|
if (_excluded) exitWith {false};
|
||||||
|
_excluded = _target isKindOf _x;
|
||||||
|
} forEach _modelsWithoutFlagProxies;
|
||||||
|
if (_excluded) exitWith {false};
|
||||||
|
|
||||||
|
|
||||||
|
// check if vehicle is alive
|
||||||
|
alive _target;
|
||||||
|
}, // condition
|
||||||
{
|
{
|
||||||
params ["_target", "_player", "_params"];
|
params ["_target", "_player", "_params"];
|
||||||
private _flagActionID = _params#0;
|
private _flagActionID = _params#0;
|
||||||
@@ -149,7 +180,7 @@ milsim_vehicleflag_options = [
|
|||||||
|
|
||||||
_actions;
|
_actions;
|
||||||
}, // child code
|
}, // child code
|
||||||
[_flagActionID], // params
|
[_flagActionID, _modelsWithoutFlagProxies], // params
|
||||||
nil, // position
|
nil, // position
|
||||||
4, // distance
|
4, // distance
|
||||||
[false, false, false, false, false], // other params
|
[false, false, false, false, false], // other params
|
||||||
@@ -174,7 +205,10 @@ milsim_vehicleflag_options = [
|
|||||||
params ["_target", "_player", "_params"];
|
params ["_target", "_player", "_params"];
|
||||||
_target forceFlagTexture "";
|
_target forceFlagTexture "";
|
||||||
}, // statement
|
}, // statement
|
||||||
{true}, // condition
|
{
|
||||||
|
params ["_target", "_player", "_params"];
|
||||||
|
alive _target && getForcedFlagTexture _target != "";
|
||||||
|
}, // condition
|
||||||
nil // child code
|
nil // child code
|
||||||
] call ace_interact_menu_fnc_createAction;
|
] call ace_interact_menu_fnc_createAction;
|
||||||
|
|
||||||
@@ -186,5 +220,6 @@ milsim_vehicleflag_options = [
|
|||||||
] call ace_interact_menu_fnc_addActionToObject;
|
] call ace_interact_menu_fnc_addActionToObject;
|
||||||
|
|
||||||
}, true, [], true] call CBA_fnc_addClassEventHandler;
|
}, true, [], true] call CBA_fnc_addClassEventHandler;
|
||||||
|
} forEach _appliedParentClasses;
|
||||||
|
|
||||||
nil;
|
nil;
|
||||||
@@ -2,19 +2,19 @@
|
|||||||
_text = "
|
_text = "
|
||||||
<font size='24' color='#ff0000'>=======------ Mission Data Set ------=======</font>
|
<font size='24' color='#ff0000'>=======------ Mission Data Set ------=======</font>
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
<font color='#00FF00' size='16'>RIPTIDE</font><br/>
|
<font color='#00FF00' size='16'>SPARTAN</font><br/>
|
||||||
Command
|
Command
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
<font color='#00FF00' size='16'>ONI</font><br/>
|
<font color='#00FF00' size='16'>BLACKJACK</font><br/>
|
||||||
Alpha Platoon
|
Alpha Platoon
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
<font color='#00FF00' size='16'>GOLIATH</font><br/>
|
<font color='#00FF00' size='16'>ZOOMER</font><br/>
|
||||||
Echo
|
Echo
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
<font color='#00FF00' size='16'>TIGER</font><br/>
|
<font color='#00FF00' size='16'>TIGER</font><br/>
|
||||||
RRC
|
RRC
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
<font color='#00FF00' size='16'>BLACKFOOT/font><br/>
|
<font color='#00FF00' size='16'>BLACKFOOT</font><br/>
|
||||||
Weapons Squad
|
Weapons Squad
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
";
|
";
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
if ( !hasInterface ) exitWith {};
|
if ( !hasInterface ) exitWith {};
|
||||||
|
|
||||||
|
// define milsim_resupply_crateDefinitions
|
||||||
|
call milsim_fnc_crateDefinitions;
|
||||||
|
|
||||||
["InitializePlayer", [player, true]] call BIS_fnc_dynamicGroups;
|
["InitializePlayer", [player, true]] call BIS_fnc_dynamicGroups;
|
||||||
|
|
||||||
nil;
|
nil;
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
if (!isServer) exitWith {};
|
if (!isServer) exitWith {};
|
||||||
|
|
||||||
|
// define milsim_resupply_crateDefinitions
|
||||||
|
call milsim_fnc_crateDefinitions;
|
||||||
|
|
||||||
_fixedAssets = [
|
_fixedAssets = [
|
||||||
["Ares", "USAF_A10", 0],
|
["Ares", "USAF_A10", 0],
|
||||||
["Odyssey", "RHSGREF_A29B_HIDF", 0],
|
["Odyssey", "RHSGREF_A29B_HIDF", 0],
|
||||||
@@ -50,6 +53,8 @@ missionNamespace setVariable ["milsim_var_rotaryAssets", _rotaryAssets];
|
|||||||
publicVariable "milsim_var_fixedAssets";
|
publicVariable "milsim_var_fixedAssets";
|
||||||
publicVariable "milsim_var_rotaryAssets";
|
publicVariable "milsim_var_rotaryAssets";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Initializes the Dynamic Groups framework and groups
|
// Initializes the Dynamic Groups framework and groups
|
||||||
["Initialize", [true]] call BIS_fnc_dynamicGroups;
|
["Initialize", [true]] call BIS_fnc_dynamicGroups;
|
||||||
|
|
||||||
|
|||||||
201
functions/resupply/fn_crateDefinitions.sqf
Normal file
201
functions/resupply/fn_crateDefinitions.sqf
Normal file
@@ -0,0 +1,201 @@
|
|||||||
|
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,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Author: Hizumi
|
* Author: Hizumi
|
||||||
*
|
*
|
||||||
* Create Ammo resupply box for the 17th Batallion
|
* Create Ammo resupply box for the 17th Battalion
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Vehicle - <OBJECT>
|
* 0: Vehicle - <OBJECT>
|
||||||
@@ -12,9 +12,19 @@
|
|||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [box] call milsim_fnc_createAmmoBox; // create ammo box via init line of editor object
|
* [box] call milsim_fnc_createAmmoBox; // create ammo box via init line of editor object
|
||||||
* [objNull, pos] call milsim_fnc_createAmmoBox // create ammo box via zeus module
|
* [objNull, pos] call milsim_fnc_createAmmoBox; // create ammo box via zeus module
|
||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
|
*
|
||||||
|
* Note: For gathering:
|
||||||
|
formatText ["%1", [
|
||||||
|
["containerClassname", typeOf cursorObject],
|
||||||
|
["backpack", (backpackCargo cursorObject) call BIS_fnc_consolidateArray],
|
||||||
|
["item", (itemCargo cursorObject) call BIS_fnc_consolidateArray],
|
||||||
|
["magazine", (magazineCargo cursorObject) call BIS_fnc_consolidateArray],
|
||||||
|
["magazineAmmo", magazinesAmmoCargo cursorObject],
|
||||||
|
["weapon", (weaponCargo cursorObject) call BIS_fnc_consolidateArray]
|
||||||
|
]];
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -23,89 +33,4 @@ params [
|
|||||||
["_pos", [0,0,0], [[]], 3]
|
["_pos", [0,0,0], [[]], 3]
|
||||||
];
|
];
|
||||||
|
|
||||||
if (isNull _box) then {
|
[_box, "AMMO LIGHT", _pos] call milsim_fnc_createBox;
|
||||||
_box = "Box_Syndicate_Ammo_F" createVehicle _pos;
|
|
||||||
};
|
|
||||||
|
|
||||||
clearBackpackCargoGlobal _box;
|
|
||||||
clearItemCargoGlobal _box;
|
|
||||||
clearMagazineCargoGlobal _box;
|
|
||||||
clearWeaponCargoGlobal _box;
|
|
||||||
|
|
||||||
_packs = [];
|
|
||||||
|
|
||||||
_items = [];
|
|
||||||
|
|
||||||
_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]
|
|
||||||
];
|
|
||||||
|
|
||||||
_weapons = [
|
|
||||||
["rhs_weap_M136",4],
|
|
||||||
["rhs_weap_M136_hp",4],
|
|
||||||
["rhs_weap_m72a7",2]
|
|
||||||
];
|
|
||||||
|
|
||||||
{
|
|
||||||
_x params ["_class", "_qty"];
|
|
||||||
|
|
||||||
_box addBackpackCargoGlobal [_class, _qty]
|
|
||||||
|
|
||||||
} foreach _packs;
|
|
||||||
|
|
||||||
{
|
|
||||||
_x params ["_class", "_qty"];
|
|
||||||
|
|
||||||
_box addItemCargoGlobal [_class, _qty]
|
|
||||||
|
|
||||||
} foreach _items;
|
|
||||||
|
|
||||||
{
|
|
||||||
_x params ["_class", "_qty"];
|
|
||||||
|
|
||||||
_box addMagazineCargoGlobal [_class, _qty]
|
|
||||||
|
|
||||||
} foreach _magazines;
|
|
||||||
|
|
||||||
{
|
|
||||||
_x params ["_class", "_qty"];
|
|
||||||
|
|
||||||
_box addWeaponCargoGlobal [_class, _qty]
|
|
||||||
|
|
||||||
} foreach _weapons;
|
|
||||||
|
|
||||||
[_box,1] call ace_cargo_fnc_setSize;
|
|
||||||
|
|
||||||
true;
|
|
||||||
99
functions/resupply/fn_createBox.sqf
Normal file
99
functions/resupply/fn_createBox.sqf
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
/*
|
||||||
|
* Author: Hizumi & IndigoFox
|
||||||
|
*
|
||||||
|
* Create Mortar resupply box for the 17th Battalion
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Vehicle - <OBJECT>
|
||||||
|
* 1: 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
|
||||||
|
*
|
||||||
|
* Public: Yes
|
||||||
|
*
|
||||||
|
* Note: For gathering:
|
||||||
|
formatText ["%1", [
|
||||||
|
["containerClassname", typeOf cursorObject],
|
||||||
|
["backpack", (backpackCargo cursorObject) call BIS_fnc_consolidateArray],
|
||||||
|
["item", (itemCargo cursorObject) call BIS_fnc_consolidateArray],
|
||||||
|
["magazine", (magazineCargo cursorObject) call BIS_fnc_consolidateArray],
|
||||||
|
["magazineAmmo", magazinesAmmoCargo cursorObject],
|
||||||
|
["weapon", (weaponCargo cursorObject) call BIS_fnc_consolidateArray]
|
||||||
|
]];
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
params [
|
||||||
|
["_box", objNull, [objNull]],
|
||||||
|
["_type", "", [""]],
|
||||||
|
["_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;
|
||||||
|
};
|
||||||
|
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
|
||||||
|
private _boxItems = _boxData getOrDefault ["items", createHashMap];
|
||||||
|
|
||||||
|
if (isNull _box) then {
|
||||||
|
_box = (_boxData get "className") createVehicle _pos;
|
||||||
|
};
|
||||||
|
|
||||||
|
clearBackpackCargoGlobal _box;
|
||||||
|
clearItemCargoGlobal _box;
|
||||||
|
clearMagazineCargoGlobal _box;
|
||||||
|
clearWeaponCargoGlobal _box;
|
||||||
|
|
||||||
|
{
|
||||||
|
_x params ["_class", "_qty"];
|
||||||
|
|
||||||
|
_box addBackpackCargoGlobal [_class, _qty]
|
||||||
|
|
||||||
|
} foreach (_boxItems getOrDefault ["backpacks", []]);
|
||||||
|
|
||||||
|
{
|
||||||
|
_x params ["_class", "_qty"];
|
||||||
|
|
||||||
|
_box addItemCargoGlobal [_class, _qty]
|
||||||
|
|
||||||
|
} foreach (_boxItems getOrDefault ["items", []]);
|
||||||
|
|
||||||
|
{
|
||||||
|
_x params ["_class", "_qty"];
|
||||||
|
|
||||||
|
_box addMagazineCargoGlobal [_class, _qty]
|
||||||
|
|
||||||
|
} foreach (_boxItems getOrDefault ["magazines", []]);
|
||||||
|
|
||||||
|
{
|
||||||
|
_x params ["_class", "_qty"];
|
||||||
|
|
||||||
|
_box addWeaponCargoGlobal [_class, _qty]
|
||||||
|
|
||||||
|
} foreach (_boxItems getOrDefault ["weapons", []]);
|
||||||
|
|
||||||
|
[_box,1] call ace_cargo_fnc_setSize;
|
||||||
|
|
||||||
|
true;
|
||||||
36
functions/resupply/fn_createCSWBox.sqf
Normal file
36
functions/resupply/fn_createCSWBox.sqf
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* Author: Hizumi & IndigoFox
|
||||||
|
*
|
||||||
|
* Create Ammo resupply box for the 17th Battalion
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Vehicle - <OBJECT>
|
||||||
|
* 1: Position - <ARRAY>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* Function executed <BOOL>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [box] call milsim_fnc_createCSWBox; // create ammo box via init line of editor object
|
||||||
|
* [objNull, pos] call milsim_fnc_createCSWBox; // create ammo box via zeus module
|
||||||
|
*
|
||||||
|
* Public: Yes
|
||||||
|
*
|
||||||
|
* Note: For gathering:
|
||||||
|
formatText ["%1", [
|
||||||
|
["containerClassname", typeOf cursorObject],
|
||||||
|
["backpack", (backpackCargo cursorObject) call BIS_fnc_consolidateArray],
|
||||||
|
["item", (itemCargo cursorObject) call BIS_fnc_consolidateArray],
|
||||||
|
["magazine", (magazineCargo cursorObject) call BIS_fnc_consolidateArray],
|
||||||
|
["magazineAmmo", magazinesAmmoCargo cursorObject],
|
||||||
|
["weapon", (weaponCargo cursorObject) call BIS_fnc_consolidateArray]
|
||||||
|
]];
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
params [
|
||||||
|
["_box", objNull, [objNull]],
|
||||||
|
["_pos", [0,0,0], [[]], 3]
|
||||||
|
];
|
||||||
|
|
||||||
|
[_box, "CSW", _pos] call milsim_fnc_createBox;
|
||||||
36
functions/resupply/fn_createLaunchersBox.sqf
Normal file
36
functions/resupply/fn_createLaunchersBox.sqf
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* Author: Hizumi & IndigoFox
|
||||||
|
*
|
||||||
|
* Create Ammo resupply box for the 17th Battalion
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Vehicle - <OBJECT>
|
||||||
|
* 1: Position - <ARRAY>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* Function executed <BOOL>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [box] call milsim_fnc_createLaunchersBox; // create ammo box via init line of editor object
|
||||||
|
* [objNull, pos] call milsim_fnc_createLaunchersBox; // create ammo box via zeus module
|
||||||
|
*
|
||||||
|
* Public: Yes
|
||||||
|
*
|
||||||
|
* Note: For gathering:
|
||||||
|
formatText ["%1", [
|
||||||
|
["containerClassname", typeOf cursorObject],
|
||||||
|
["backpack", (backpackCargo cursorObject) call BIS_fnc_consolidateArray],
|
||||||
|
["item", (itemCargo cursorObject) call BIS_fnc_consolidateArray],
|
||||||
|
["magazine", (magazineCargo cursorObject) call BIS_fnc_consolidateArray],
|
||||||
|
["magazineAmmo", magazinesAmmoCargo cursorObject],
|
||||||
|
["weapon", (weaponCargo cursorObject) call BIS_fnc_consolidateArray]
|
||||||
|
]];
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
params [
|
||||||
|
["_box", objNull, [objNull]],
|
||||||
|
["_pos", [0,0,0], [[]], 3]
|
||||||
|
];
|
||||||
|
|
||||||
|
[_box, "LAUNCHERS", _pos] call milsim_fnc_createBox;
|
||||||
@@ -23,64 +23,4 @@ params [
|
|||||||
["_pos", [0,0,0], [[]], 3]
|
["_pos", [0,0,0], [[]], 3]
|
||||||
];
|
];
|
||||||
|
|
||||||
if (isNull _box) then {
|
[_box, "MEDICAL", _pos] call milsim_fnc_createBox;
|
||||||
_box = "ACE_medicalSupplyCrate_advanced" createVehicle _pos;
|
|
||||||
};
|
|
||||||
|
|
||||||
clearBackpackCargoGlobal _box;
|
|
||||||
clearItemCargoGlobal _box;
|
|
||||||
clearMagazineCargoGlobal _box;
|
|
||||||
clearWeaponCargoGlobal _box;
|
|
||||||
|
|
||||||
_packs = [];
|
|
||||||
|
|
||||||
_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]
|
|
||||||
];
|
|
||||||
|
|
||||||
_magazines = [];
|
|
||||||
|
|
||||||
_weapons = [];
|
|
||||||
|
|
||||||
{
|
|
||||||
_x params ["_class", "_qty"];
|
|
||||||
|
|
||||||
_box addBackpackCargoGlobal [_class, _qty]
|
|
||||||
|
|
||||||
} foreach _packs;
|
|
||||||
|
|
||||||
{
|
|
||||||
_x params ["_class", "_qty"];
|
|
||||||
|
|
||||||
_box addItemCargoGlobal [_class, _qty]
|
|
||||||
|
|
||||||
} foreach _items;
|
|
||||||
|
|
||||||
{
|
|
||||||
_x params ["_class", "_qty"];
|
|
||||||
|
|
||||||
_box addMagazineCargoGlobal [_class, _qty]
|
|
||||||
|
|
||||||
} foreach _magazines;
|
|
||||||
|
|
||||||
{
|
|
||||||
_x params ["_class", "_qty"];
|
|
||||||
|
|
||||||
_box addWeaponCargoGlobal [_class, _qty]
|
|
||||||
|
|
||||||
} foreach _weapons;
|
|
||||||
|
|
||||||
[_box,1] call ace_cargo_fnc_setSize;
|
|
||||||
|
|
||||||
true;
|
|
||||||
36
functions/resupply/fn_createMortarBox.sqf
Normal file
36
functions/resupply/fn_createMortarBox.sqf
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* Author: Hizumi & IndigoFox
|
||||||
|
*
|
||||||
|
* Create Mortar resupply box for the 17th Battalion
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Vehicle - <OBJECT>
|
||||||
|
* 1: Position - <ARRAY>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* Function executed <BOOL>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [box] call milsim_fnc_createMortarBox; // create mortar ammo box via init line of editor object
|
||||||
|
* [objNull, pos] call milsim_fnc_createMortarBox; // create mortar ammo box via zeus module
|
||||||
|
*
|
||||||
|
* Public: Yes
|
||||||
|
*
|
||||||
|
* Note: For gathering:
|
||||||
|
formatText ["%1", [
|
||||||
|
["containerClassname", typeOf cursorObject],
|
||||||
|
["backpack", (backpackCargo cursorObject) call BIS_fnc_consolidateArray],
|
||||||
|
["item", (itemCargo cursorObject) call BIS_fnc_consolidateArray],
|
||||||
|
["magazine", (magazineCargo cursorObject) call BIS_fnc_consolidateArray],
|
||||||
|
["magazineAmmo", magazinesAmmoCargo cursorObject],
|
||||||
|
["weapon", (weaponCargo cursorObject) call BIS_fnc_consolidateArray]
|
||||||
|
]];
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
params [
|
||||||
|
["_box", objNull, [objNull]],
|
||||||
|
["_pos", [0,0,0], [[]], 3]
|
||||||
|
];
|
||||||
|
|
||||||
|
[_box, "AMMO MORTAR", _pos] call milsim_fnc_createBox;
|
||||||
@@ -12,9 +12,19 @@
|
|||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [box] call milsim_fnc_createWeaponsBox; // create ammo box via init line of editor object
|
* [box] call milsim_fnc_createWeaponsBox; // create ammo box via init line of editor object
|
||||||
* [objNull, pos] call milsim_fnc_createWeaponsBox // create ammo box via zeus module
|
* [objNull, pos] call milsim_fnc_createWeaponsBox; // create ammo box via zeus module
|
||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
|
*
|
||||||
|
* Note: For gathering:
|
||||||
|
formatText ["%1", [
|
||||||
|
["containerClassname", typeOf cursorObject],
|
||||||
|
["backpack", (backpackCargo cursorObject) call BIS_fnc_consolidateArray],
|
||||||
|
["item", (itemCargo cursorObject) call BIS_fnc_consolidateArray],
|
||||||
|
["magazine", (magazineCargo cursorObject) call BIS_fnc_consolidateArray],
|
||||||
|
["magazineAmmo", magazinesAmmoCargo cursorObject],
|
||||||
|
["weapon", (weaponCargo cursorObject) call BIS_fnc_consolidateArray]
|
||||||
|
]];
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -23,60 +33,4 @@ params [
|
|||||||
["_pos", [0,0,0], [[]], 3]
|
["_pos", [0,0,0], [[]], 3]
|
||||||
];
|
];
|
||||||
|
|
||||||
if (isNull _box) then {
|
[_box, "AMMO HEAVY", _pos] call milsim_fnc_createBox;
|
||||||
_box = "Box_NATO_Wps_F" createVehicle _pos;
|
|
||||||
};
|
|
||||||
|
|
||||||
clearBackpackCargoGlobal _box;
|
|
||||||
clearItemCargoGlobal _box;
|
|
||||||
clearMagazineCargoGlobal _box;
|
|
||||||
clearWeaponCargoGlobal _box;
|
|
||||||
|
|
||||||
_packs = [];
|
|
||||||
|
|
||||||
_items = [];
|
|
||||||
|
|
||||||
_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]
|
|
||||||
];
|
|
||||||
|
|
||||||
_weapons = [];
|
|
||||||
|
|
||||||
{
|
|
||||||
_x params ["_class", "_qty"];
|
|
||||||
|
|
||||||
_box addBackpackCargoGlobal [_class, _qty]
|
|
||||||
|
|
||||||
} foreach _packs;
|
|
||||||
|
|
||||||
{
|
|
||||||
_x params ["_class", "_qty"];
|
|
||||||
|
|
||||||
_box addItemCargoGlobal [_class, _qty]
|
|
||||||
|
|
||||||
} foreach _items;
|
|
||||||
|
|
||||||
{
|
|
||||||
_x params ["_class", "_qty"];
|
|
||||||
|
|
||||||
_box addMagazineCargoGlobal [_class, _qty]
|
|
||||||
|
|
||||||
} foreach _magazines;
|
|
||||||
|
|
||||||
{
|
|
||||||
_x params ["_class", "_qty"];
|
|
||||||
|
|
||||||
_box addWeaponCargoGlobal [_class, _qty]
|
|
||||||
|
|
||||||
} foreach _weapons;
|
|
||||||
|
|
||||||
[_box,1] call ace_cargo_fnc_setSize;
|
|
||||||
|
|
||||||
true;
|
|
||||||
@@ -3,7 +3,7 @@ params [
|
|||||||
["_player", objNull, [objNull]]
|
["_player", objNull, [objNull]]
|
||||||
];
|
];
|
||||||
|
|
||||||
if (!isPlayer _player) exitWith { diag_log("exitWith inventotry")};
|
if (!isPlayer _player) exitWith { diag_log("exitWith logPlayerInventory")};
|
||||||
|
|
||||||
_items = [];
|
_items = [];
|
||||||
_items append uniformItems _player;
|
_items append uniformItems _player;
|
||||||
@@ -13,6 +13,9 @@ _items pushback hmd _player;
|
|||||||
_items pushback binocular _player;
|
_items pushback binocular _player;
|
||||||
_items append primaryWeaponItems _player;
|
_items append primaryWeaponItems _player;
|
||||||
|
|
||||||
|
_noncompliant = [];
|
||||||
|
_unlisted = [];
|
||||||
|
|
||||||
{
|
{
|
||||||
_item = _x;
|
_item = _x;
|
||||||
_modes = getArray(configfile >> "CfgWeapons" >> _item >> "visionMode");
|
_modes = getArray(configfile >> "CfgWeapons" >> _item >> "visionMode");
|
||||||
@@ -26,15 +29,28 @@ _items append primaryWeaponItems _player;
|
|||||||
_restrictedItemList = ["A3_GPNVG18b_REC_TI","A3_GPNVG18_REC_TI","A3_GPNVG18b_TI","A3_GPNVG18_TI","A3_GPNVG18b_REC_BLK_TI","A3_GPNVG18_REC_BLK_TI","A3_GPNVG18b_BLK_TI","A3_GPNVG18_BLK_TI","NVGogglesB_gry_F","NVGogglesB_grn_F","NVGogglesB_blk_F","optic_Nightstalker","rhsusf_acc_anpas13gv1","Tier1_ANPVS10_Tan","rhsusf_acc_anpvs27","optic_tws_mg","optic_tws"];
|
_restrictedItemList = ["A3_GPNVG18b_REC_TI","A3_GPNVG18_REC_TI","A3_GPNVG18b_TI","A3_GPNVG18_TI","A3_GPNVG18b_REC_BLK_TI","A3_GPNVG18_REC_BLK_TI","A3_GPNVG18b_BLK_TI","A3_GPNVG18_BLK_TI","NVGogglesB_gry_F","NVGogglesB_grn_F","NVGogglesB_blk_F","optic_Nightstalker","rhsusf_acc_anpas13gv1","Tier1_ANPVS10_Tan","rhsusf_acc_anpvs27","optic_tws_mg","optic_tws"];
|
||||||
|
|
||||||
if ( _x in _restrictedItemList ) then {
|
if ( _x in _restrictedItemList ) then {
|
||||||
diag_log text format["[MILSIM] (logPlayerInventory): %1 has a restricted inventory item: %2", name _player, getText( configfile >> "CfgWeapons" >> _item >> "displayName" )];
|
_noncompliant pushBackUnique _item;
|
||||||
} else if ((count _modes) isNotEqualTo 0) then {
|
};
|
||||||
|
|
||||||
|
if ((count _modes) isNotEqualTo 0) then {
|
||||||
_modes = _modes apply { toLower _x };
|
_modes = _modes apply { toLower _x };
|
||||||
if ( "ti" in _modes ) then {
|
if ( "ti" in _modes ) then {
|
||||||
diag_log text format["[MILSIM] (logPlayerInventory): %1 has an unlisted thermal item: %2", name _player, getText( configfile >> "CfgWeapons" >> _item >> "displayName" )];
|
_unlisted pushBackUnique _item;
|
||||||
};
|
};
|
||||||
} else {
|
};
|
||||||
diag_log text format["[MILSIM] (logPlayerInventory): %1 inventory in compliance", name _player];
|
|
||||||
}
|
|
||||||
} forEach _items;
|
} forEach _items;
|
||||||
|
|
||||||
|
{
|
||||||
|
diag_log text format["[MILSIM] (logPlayerInventory): %1 has a restricted inventory item: %2", name _player, getText( configfile >> "CfgWeapons" >> _x >> "displayName" )];
|
||||||
|
} forEach _noncompliant;
|
||||||
|
|
||||||
|
{
|
||||||
|
diag_log text format["[MILSIM] (logPlayerInventory): %1 has an unlisted thermal item: %2", name _player, getText( configfile >> "CfgWeapons" >> _x >> "displayName" )];
|
||||||
|
} forEach _unlisted;
|
||||||
|
|
||||||
|
if (((count _noncompliant) isEqualTo 0) && ((count _unlisted) isEqualTo 0)) then {
|
||||||
|
diag_log text format["[MILSIM] (logPlayerInventory): %1 inventory in compliance", name _player];
|
||||||
|
};
|
||||||
|
|
||||||
nil
|
nil
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
"milsim_sideChat",
|
"milsim_sideChat",
|
||||||
"CHECKBOX",
|
"CHECKBOX",
|
||||||
"Side Chat Text Enabled",
|
"Side Chat Text Enabled",
|
||||||
["17th Battallion", "Side Chat"],
|
["17th Battalion", "Side Chat"],
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{
|
{
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
"milsim_server_cps_enable",
|
"milsim_server_cps_enable",
|
||||||
"CHECKBOX",
|
"CHECKBOX",
|
||||||
"CPS Metrics Enabled",
|
"CPS Metrics Enabled",
|
||||||
["17th Battallion", "Server Metrics"],
|
["17th Battalion", "Server Metrics"],
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
{
|
{
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
"milsim_server_cps_interval",
|
"milsim_server_cps_interval",
|
||||||
"TIME",
|
"TIME",
|
||||||
"Metrics Interval",
|
"Metrics Interval",
|
||||||
["17th Battallion", "Server Metrics"],
|
["17th Battalion", "Server Metrics"],
|
||||||
[60,300,120],
|
[60,300,120],
|
||||||
true,
|
true,
|
||||||
{
|
{
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
"milsim_client_cps_enable",
|
"milsim_client_cps_enable",
|
||||||
"CHECKBOX",
|
"CHECKBOX",
|
||||||
"CPS Metrics Enabled",
|
"CPS Metrics Enabled",
|
||||||
["17th Battallion", "Client Metrics"],
|
["17th Battalion", "Client Metrics"],
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
{
|
{
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
"milsim_client_cps_interval",
|
"milsim_client_cps_interval",
|
||||||
"TIME",
|
"TIME",
|
||||||
"CPS Metrics Interval",
|
"CPS Metrics Interval",
|
||||||
["17th Battallion", "Client Metrics"],
|
["17th Battalion", "Client Metrics"],
|
||||||
[60,300,120],
|
[60,300,120],
|
||||||
true,
|
true,
|
||||||
{
|
{
|
||||||
@@ -104,6 +104,26 @@
|
|||||||
}
|
}
|
||||||
] call CBA_fnc_addSetting;
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
|
//---------------------
|
||||||
|
// Medical Overlay
|
||||||
|
//---------------------
|
||||||
|
|
||||||
|
[
|
||||||
|
"milsim_client_medState3D_enabled", // variable
|
||||||
|
"CHECKBOX", // type
|
||||||
|
["Enable 3D Triage Card State", "Draws a colored dot over units within 10m indicating current ACE Triage State"], // title
|
||||||
|
["17th Battalion", "Medical"], // category
|
||||||
|
true // default value
|
||||||
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
|
[
|
||||||
|
"milsim_client_medState3D_drawRange", // variable
|
||||||
|
"LIST", // type
|
||||||
|
["Range To Draw Icons", "Determines range at which dots are visible"], // title
|
||||||
|
["17th Battalion", "Medical"], // category
|
||||||
|
[[2, 4, 6, 8, 10], ["2", "4", "6", "8", "10"], 4] // option values, option labels, default index
|
||||||
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
|
|
||||||
diag_log text "[MILSIM] (settings) Custom CBA settings initialized";
|
diag_log text "[MILSIM] (settings) Custom CBA settings initialized";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user