First module appearing in 3den (not zeus yet). Created custom PREP macros for compiling functions similar to CBA/ACE.

This commit is contained in:
Clarky committed 2026-08-28 18:14:49 +10:00
1 parent 2a7c28af5f
commit c5755fb259
42 files changed
+1805 -7

No files matched your search

@@ -0,0 +1,43 @@
/*
* Author: Clarky
* Description:
* Initialises an Engineering Bay. Intended to be called as a function by internal processes, or exposed as a module in Eden and Zeus
*
* Arguments:
* 0: Linked HQ <OBJECT>
* 1: Engineering Bay <OBJECT>
*
* Usage:
* [_hq, this] call CLRK_fnc_initEngineeringBay
*
*/
params [["_hq", "", ["", objNull]], "_engineering"];
if (!isServer) exitWith {};
_engineering setVariable ["isEngineeringBay", true, true];
// Wait to run the initialisaion for mission start -- Prevents base push until HQ object is initialised
if (_hq isNotEqualTo "") then {
[
{
params ["_engineering", "_hq"];
_engineering setVariable ["hq", _hq, true];
private _baseDetails = _hq getVariable "baseDetails";
private _buildings = _baseDetails get "buildings";
_buildings pushBack _engineering;
},
[_engineering, _hq],
2
] call CBA_fnc_waitAndExecute;
};
// Set object to invulnerable -- May be removed once base building is fully implemented.
[_engineering, false] remoteExec ["allowDamage", 0, true];
[_engineering] remoteExecCall [
"CLF_fnc_initEngineeringBayInteractions",
0,
true
];