Initial upload. Not currently functional as a mod. Includes some slightly refactored source code as well as the original mission this was debuted in zipped up as reference + example of usage.
This commit is contained in:
commit
75b737230e
32 files changed
+2049
No files matched your search
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
Author: Clarky
|
||||
Usage:
|
||||
[this, side] call CLF_fnc_initBaseHQ;
|
||||
|
||||
Intended to run on the server, which calls a CBA event handler that runs a client-level script for adding relevant interactions
|
||||
|
||||
Purpose:
|
||||
Initialises a logistics base HQ. Adds the new base to the global base hashmap. Runs a child function to intialise clientside actions.
|
||||
|
||||
*/
|
||||
|
||||
params ["_hq", "_side"];
|
||||
|
||||
waitUntil { !isNull _hq; };
|
||||
|
||||
_hq setVariable ["isBaseHQ", true, true];
|
||||
// _hq setVariable [];
|
||||
|
||||
// Set BaseID
|
||||
private _baseID = format [
|
||||
"BASE_%1",
|
||||
diag_tickTime
|
||||
];
|
||||
|
||||
_hq setVariable [
|
||||
"baseID",
|
||||
_baseID,
|
||||
true
|
||||
];
|
||||
|
||||
_hq setVariable [
|
||||
"baseDetails",
|
||||
createHashMapFromArray [
|
||||
["id", _baseID],
|
||||
["hq", _hq],
|
||||
["buildings", []],
|
||||
["depots", []],
|
||||
["side", _side]
|
||||
]
|
||||
];
|
||||
|
||||
/*
|
||||
// Fetch global mission Base Hashmap
|
||||
private _bases = missionNamespace getVariable "LogisticsBases";
|
||||
|
||||
// Add new Base to global hashmap
|
||||
_bases set [
|
||||
_baseID,
|
||||
createHashMapFromArray [
|
||||
["id", _baseID],
|
||||
["hq", _hq],
|
||||
["buildings", []],
|
||||
["depots", []],
|
||||
["side", _side]
|
||||
]
|
||||
];
|
||||
|
||||
missionNamespace setVariable ["LogisticsBases", _bases, true];
|
||||
*/
|
||||
|
||||
// Initialise base HQ interactions for all clients
|
||||
[_hq] remoteExecCall [
|
||||
"CLF_fnc_initBaseHQInteractions",
|
||||
0,
|
||||
true
|
||||
];
|
||||
Reference in new issue
Block a user