wip, fbcb2_assets, init, util
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
milsim_baseObjects = allMissionObjects "ModuleRespawnPosition_F";
|
||||
publicVariable "milsim_baseObjects";
|
||||
|
||||
// init asset stores at bases
|
||||
[true] call milsim_fbcb2_assets_fnc_updateAssetsByBase;
|
||||
// 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;
|
||||
|
||||
["milsim_logText", {
|
||||
params [["_strArray", [""], [[]]]];
|
||||
{
|
||||
diag_log text _x;
|
||||
} forEach _strArray;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
missionNamespace setVariable ["milsim_complete", true];
|
||||
diag_log text "[MILSIM] (initServer) milsim_complete: version 2.3";
|
||||
|
||||
publicVariable "milsim_complete";
|
||||
26
framework/init/functions/fn_initServer.sqf
Normal file
26
framework/init/functions/fn_initServer.sqf
Normal file
@@ -0,0 +1,26 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
milsim_baseObjects = allMissionObjects "ModuleRespawnPosition_F";
|
||||
publicVariable "milsim_baseObjects";
|
||||
|
||||
// Initializes the Dynamic Groups framework and groups
|
||||
["Initialize", [true]] call BIS_fnc_dynamicGroups;
|
||||
|
||||
["milsim_logText", {
|
||||
params [["_strArray", [""], [[]]]];
|
||||
{
|
||||
diag_log text _x;
|
||||
} forEach _strArray;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
missionNamespace setVariable [QGVARMAIN(complete), true];
|
||||
|
||||
[
|
||||
QUOTE(COMPONENT),
|
||||
format["%1: version %2", QGVARMAIN(complete), QUOTE(VERSION_STR)],
|
||||
[["version", QUOTE(VERSION_STR)]]
|
||||
] call EFUNC(util,log);
|
||||
|
||||
publicVariable "milsim_complete";
|
||||
3
framework/init/script_component.hpp
Normal file
3
framework/init/script_component.hpp
Normal file
@@ -0,0 +1,3 @@
|
||||
#define COMPONENT init
|
||||
#define COMPONENT_BEAUTIFIED Init
|
||||
#include "../script_mod.hpp"
|
||||
Reference in New Issue
Block a user