Files
Clarksons_Logi_Framework/Addons/main/functions/init/fnc_initSupplyVehicle.sqf
T

35 lines
923 B
Plaintext

#include "..\..\script_component.hpp"
/*
* Author: Clarky
* Description:
* Initialises a Supply Vehicle. Intended to be called as a function by internal processes, or exposed as a module in Eden and Zeus
*
* Arguments:
* 0: Vehicle <OBJECT>
* 1: Max Load <INT>
* 2: Current Materiel <INT>
* 3: Current Ore <INT>
* 4: Transfer Rate <INT>
*
* Usage:
* [this, 500, 0, 0, 100] call CLRK_fnc_initSupplyVehicle
*
*/
params ["_vehicle", "_maxLoad", "_currentMateriel", "_currentOre", "_transferRate"];
if (!isServer) exitWith {};
_vehicle setVariable ["isSupplyVehicle", true, true];
_vehicle setVariable ["maxLoad", _maxLoad, true];
_vehicle setVariable ["currentMateriel", _currentMateriel, true];
_vehicle setVariable ["currentOre", _currentOre, true];
_vehicle setVariable ["transferRate", _transferRate, true];
[_vehicle] remoteExecCall [
"CLF_fnc_initSupplyVehicleInteractions",
0,
true
];