First module appearing in 3den (not zeus yet). Created custom PREP macros for compiling functions similar to CBA/ACE.
This commit is contained in:
1 parent
2a7c28af5f
commit
c5755fb259
42 files changed
+1805
-7
No files matched your search
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
Author: Clarky
|
||||
Usage:
|
||||
[this] call CLRK_fnc_initSupplyDepotInteractions;
|
||||
|
||||
Intended to run locally on each client.
|
||||
|
||||
*/
|
||||
|
||||
params ["_depot"];
|
||||
|
||||
if (isNull _depot) exitWith {hint "Object ain't exist";};
|
||||
if !(_depot getVariable ["isOreDepot", false]) exitWith {hint "Object ain't ore depot";};
|
||||
|
||||
// Prevent duplicate actions if script runs again
|
||||
if (_depot getVariable ["oreInteractionsAdded", false]) exitWith {};
|
||||
|
||||
_depot setVariable ["oreInteractionsAdded", true];
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// INIT STATUS ACTION
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
_depot addAction [
|
||||
"<t color='#b96331'>Check Ore Status</t>",
|
||||
|
||||
{
|
||||
params ["_target", "_caller"];
|
||||
|
||||
private _current =
|
||||
_target getVariable ["currentOre", 0];
|
||||
|
||||
private _max =
|
||||
_target getVariable ["maxOre", 300];
|
||||
|
||||
[
|
||||
"CLRK_ShowMessage",
|
||||
[
|
||||
3,
|
||||
1,
|
||||
format
|
||||
[
|
||||
"ORE DEPOT STORAGE<br />Ore: %1 / %2",
|
||||
_current,
|
||||
_max
|
||||
]
|
||||
],
|
||||
_caller
|
||||
] call CBA_fnc_targetEvent;
|
||||
},
|
||||
nil,
|
||||
1,
|
||||
true,
|
||||
false,
|
||||
"",
|
||||
"true",
|
||||
6
|
||||
];
|
||||
Reference in new issue
Block a user