adds starting assets and assets at mission end to RPT

This commit is contained in:
2024-02-02 15:13:45 -08:00
parent b67888f4f1
commit 8d93bb5743
2 changed files with 92 additions and 8 deletions

View File

@@ -8,8 +8,19 @@ publicVariable "milsim_baseObjects";
// init asset stores at bases
[true] call milsim_fbcb2_assets_fnc_updateAssetsByBase;
// run update every 5 minutes
[{[false] call milsim_fbcb2_assets_fnc_updateAssetsByBase;}, 60*5] call CBA_fnc_addPerFrameHandler;
// starting 5 minutes after postInit, update asset stores every 5 minutes
[{
[
{[false] call milsim_fbcb2_assets_fnc_updateAssetsByBase;},
60*5
] call CBA_fnc_addPerFrameHandler;
}, 60*5] call CBA_fnc_waitAndExecute;
// add end mission EH
addMissionEventHandler ["MPEnded", {
// log the "current" asset counts to RPT
[false, true] call milsim_fbcb2_assets_fnc_updateAssetsByBase;
}];
// Initializes the Dynamic Groups framework and groups
["Initialize", [true]] call BIS_fnc_dynamicGroups;