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:
Clarky committed 2026-08-08 17:42:15 +10:00
commit 75b737230e
32 files changed
+2049

No files matched your search

+91
View File
@@ -0,0 +1,91 @@
/*
* Author: Clarky
* Usage:
* [this] call CLF_fnc_initBaseHQInteractions;
*  
* Intended to run locally on each client.
*
*/
params ["_hq"];
_hq addAction [
"<t color='#55cbda'>Check Fortify Budget</t>",
{
params ["_target", "_caller"];
hint format ["Current Fortify Budget: %1", [side _caller] call ace_fortify_fnc_getBudget];
[] spawn {
sleep 3;
hintSilent "";
}
},
nil,
1,
true,
false,
"",
"true", // Figure out a way to lock this to player side checks (macros?)
6
];
_hq addAction [
"<t color='#da55ce'>Add Fortify Budget - $100</t>",
{
params ["_target", "_caller"];
// Check current materiel available at this base
private _currentMateriel = [_target, _caller] call CLF_fnc_materielCheck;
if (_currentMateriel > 100) then {
[
"CLF_MaterielConsume",
[
_target,
100,
_caller
]
] call CBA_fnc_serverEvent;
[
[
"CLF_FortifyBudgetAdd",
side _caller,
100
]
] call CBA_fnc_serverEvent;
} else {
[
"CLF_ShowMessage",
[
1,
0,
"Not enough materiel."
],
_player
] call CBA_fnc_targetEvent;
};
},
nil,
1,
true,
false,
"",
"true", // Figure out a way to lock this to player side checks (macros?)
6
];
/*
if (_depots isEqualTo []) exitWith {
[
"CLF_ShowMessage",
[
1,
0,
"No connected supply depots found."
],
_player
] call CBA_fnc_targetEvent;
// Return false;
false;
};
*/