
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.
37 lines
969 B
Plaintext
37 lines
969 B
Plaintext
#include "..\script_component.hpp"
|
|
|
|
/*
|
|
* Author: IDSolutions
|
|
* Fetches the vehicles in the garage
|
|
*
|
|
* Arguments:
|
|
* None
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* None
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
private _display = findDisplay IDD_GARAGEDIALOG;
|
|
private _garageList = _display displayCtrl IDC_GARAGEVEHICLELIST;
|
|
private _storedVehicles = GETVAR(player,FORGE_Garage,[]);
|
|
|
|
lbClear _garageList;
|
|
|
|
{
|
|
// _x params ["_vehType", "_className", "_vehData"];
|
|
_x params ["_vehType", "_className"];
|
|
|
|
private _index = -1;
|
|
private _displayName = getText (configFile >> "CfgVehicles" >> _className >> "displayName");
|
|
private _picture = getText (configFile >> "CfgVehicles" >> _className >> "picture");
|
|
|
|
_index = _garageList lbAdd _displayName;
|
|
// _garageList lbSetData [_index, str [_vehType, _className, _vehData]];
|
|
_garageList lbSetData [_index, str [_vehType, _className]];
|
|
_garageList lbSetPicture [_index, _picture];
|
|
} forEach _storedVehicles; |