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,29 @@
|
||||
// temporary function - likely to be replaced in proper mod development context
|
||||
|
||||
params ["_hq", "_player"];
|
||||
|
||||
// Grab all Depots at the HQ
|
||||
private _baseDetails = _hq getVariable "baseDetails";
|
||||
private _depots = _baseDetails get "depots";
|
||||
if (_depots isEqualTo []) exitWith {
|
||||
[
|
||||
"CLF_ShowMessage",
|
||||
[
|
||||
1,
|
||||
0,
|
||||
"No connected supply depots found."
|
||||
],
|
||||
_player
|
||||
] call CBA_fnc_targetEvent;
|
||||
// Return false;
|
||||
false;
|
||||
};
|
||||
|
||||
// Check current materiel available at this base
|
||||
private _currentMateriel = 0;
|
||||
{
|
||||
_currentMateriel = _currentMateriel + (_x getVariable ["currentMateriel", 0]);
|
||||
} forEach _depots;
|
||||
|
||||
// Return result
|
||||
_currentMateriel;
|
||||
Reference in new issue
Block a user