WIP: add asset diary pages

This commit is contained in:
2024-02-02 01:06:43 -08:00
parent 1e4a5a79a8
commit 3f5c6c5a59
19 changed files with 682 additions and 56 deletions

View File

@@ -2,58 +2,14 @@ if (!isServer) exitWith {};
// define milsim_resupply_crateDefinitions
call milsim_fnc_crateDefinitions;
_fixedAssets = [
["Ares", "USAF_A10", 0],
["Odyssey", "RHSGREF_A29B_HIDF", 0],
["Hercules", "USAF_C130J", 0]
];
_rotaryAssets = [
["Apollo", "RHS_MELB_MH6M", 0],
["Artemis", "RHS_MELB_AH6M", 0],
["Icarus", "RHS_MELB_H6M", 0],
["Achilles", "RHS_CH_47F", 0],
["Hades", "ej_MH60MDAP4", 0],
["Griffin", "RHS_UH60M", 0],
["Dustoff", "RHS_UH60M_MEV2", 0],
["Pegasus", "B_T_VTOL_01_INFANTRY_F", 0],
["Spartan", "B_T_VTOL_01_ARMED_F", 0],
["Orion", "RHS_AH64D", 0],
["Athena", "RHS_AH1Z", 0],
["Homer", "RHS_UH1Y", 0],
["Atlas", "rhsusf_CH53E_USMC", 0]
];
_homes = allMissionObjects "ModuleRespawnPosition_F";
{
_home = _x;
{
_a = _home nearEntities [ _x select 1, 750];
_x set [2, (_x select 2) + count _a];
} forEach _fixedAssets;
} forEach _homes;
missionNamespace setVariable ["milsim_var_fixedAssets", _fixedAssets];
{
_home = _x;
{
_a = _home nearEntities [ _x select 1, 750];
_x set [2, (_x select 2) + count _a];
} forEach _rotaryAssets;
} forEach _homes;
missionNamespace setVariable ["milsim_var_rotaryAssets", _rotaryAssets];
publicVariable "milsim_var_fixedAssets";
publicVariable "milsim_var_rotaryAssets";
milsim_baseObjects = allMissionObjects "ModuleRespawnPosition_F";
publicVariable "milsim_baseObjects";
// init asset stores at bases
[true] call milsim_fbcb2_assets_fnc_updateAssetsByBase;
// run update every 5 minutes
[{call milsim_fbcb2_assets_fnc_updateAssetsByBase;}, 60*5] call CBA_fnc_addPerFrameHandler;
// Initializes the Dynamic Groups framework and groups
["Initialize", [true]] call BIS_fnc_dynamicGroups;