57 lines
1013 B
Plaintext
57 lines
1013 B
Plaintext
#include "..\..\script_component.hpp"
|
|
/*
|
|
* Author: Clarky
|
|
* Description:
|
|
* Initialises a FOB type base. Intended to be called as a function by internal processes, or exposed as a module in Eden and Zeus
|
|
*
|
|
* Arguments:
|
|
* 0: FOB <OBJECT>
|
|
* 1: Side <STR>
|
|
*
|
|
* Usage:
|
|
* [this, side] call CLRK_fnc_initHQ
|
|
*
|
|
*/
|
|
|
|
params ["_fob", "_side"];
|
|
|
|
if (!isServer) exitWith {};
|
|
|
|
waitUntil { !isNull _fob; };
|
|
|
|
_fob setVariable ["isFOB", true, true];
|
|
|
|
// Set object to invulnerable -- May be removed once base building is fully implemented.
|
|
[_fob, false] remoteExec ["allowDamage", 0, true];
|
|
|
|
/*
|
|
// Set BaseID
|
|
private _baseID = format [
|
|
"BASE_%1_%2",
|
|
diag_tickTime,
|
|
random[0,50,100]
|
|
];
|
|
|
|
_fob setVariable [
|
|
"baseID",
|
|
_baseID,
|
|
true
|
|
];*/
|
|
|
|
_fob setVariable [
|
|
"baseDetails",
|
|
createHashMapFromArray [
|
|
//["id", _baseID],
|
|
["hq", _fob],
|
|
["buildings", []],
|
|
["side", _side]
|
|
],
|
|
true
|
|
];
|
|
|
|
// Initialise base HQ interactions for all clients
|
|
[_fob] remoteExecCall [
|
|
"CLF_fnc_initFOBInteractions",
|
|
0,
|
|
true
|
|
]; |