
All checks were successful
Build / Build (push) Successful in 28s
This commit refactors several client-side functions to improve code consistency and readability. - Standardizes function descriptions by removing redundant "Function: forge_client..." prefixes and "[Description]" sections, focusing on concise descriptions of the function's purpose. - Updates variable handling in arsenal functions to use GVAR and EGVARS for default values, improving consistency and reducing code duplication. - Removes the bank init function as it is no longer needed. - Adds a done variable to the preinit file.
35 lines
1.2 KiB
Plaintext
35 lines
1.2 KiB
Plaintext
#include "..\script_component.hpp"
|
|
|
|
/*
|
|
* Author: IDSolutions
|
|
* Initializes the service system
|
|
*
|
|
* Arguments:
|
|
* None
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [] call forge_client_service_fnc_initService;
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
private _worldCenter = getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition");
|
|
private _fuelPumpTypes = ["Land_fs_feed_F", "Land_FuelStation_Feed_F", "Land_FuelStation_01_pump_malevil_F", "Land_FuelStation_01_pump_F", "Land_FuelStation_03_pump_F", "Land_A_FuelStation_Feed", "Land_Benzina_schnell", "Land_Fuelstation_army", "Land_Ind_FuelStation_Feed_EP1", "Land_Fuelstation"];
|
|
private _fuelPumps = nearestTerrainObjects [_worldCenter, _fuelPumpTypes, 500000];
|
|
|
|
{
|
|
private _fuelPump = _x;
|
|
private _triggerPos = getPos _fuelPump;
|
|
private _trigger = createTrigger ["EmptyDetector", _triggerPos];
|
|
|
|
_trigger setTriggerArea [5, 5, 0, false];
|
|
_trigger setTriggerActivation ["ANYPLAYER", "PRESENT", true];
|
|
_trigger setTriggerStatements [
|
|
"{ _x isKindOf 'LandVehicle' && !isEngineOn _x } count thisList > 0",
|
|
"[thisList select 0] spawn forge_client_service_fnc_refuel;",
|
|
""
|
|
];
|
|
} forEach _fuelPumps; |