52 lines
1.5 KiB
Plaintext
52 lines
1.5 KiB
Plaintext
/*
|
|
Author: Clarky
|
|
Usage:
|
|
[_class, _cost, _buildTime, _specialisation] call CLF_fnc_factoryConfirmSelection;
|
|
|
|
Intended to be called locally using the CONFIRM button in the VehicleFactory dialog
|
|
|
|
Purpose:
|
|
Confirms whether or not the build of a vehicle can commence
|
|
*/
|
|
|
|
//params ["_class", "_cost", "_buildTime", "_specialisation", "_specialisationData"];
|
|
|
|
// Fetch the display and listbox to find the selected row so we can reference its data
|
|
private _display = findDisplay 9999;
|
|
private _listBox = _display displayCtrl 1500;
|
|
private _row = lnbCurSelRow _listBox;
|
|
|
|
if (_row < 0) exitWith {hint "No vehicle was selected.";};
|
|
if (isNull player) exitWith {hint "ERR: No player found"};
|
|
|
|
if !(([player] call ace_common_fnc_isEngineer) || (missionNamespace getVariable "allCanUseLogistics")) exitWith {
|
|
[
|
|
"CLF_ShowMessage",
|
|
[
|
|
1,
|
|
1,
|
|
"No engineer privileges found."
|
|
],
|
|
player
|
|
] call CBA_fnc_targetEvent;
|
|
};
|
|
|
|
// Fetch vehicle data from the selected row and compile it so we can access it and pass it through to the build function
|
|
private _vehicleData =
|
|
call compile (_listBox lnbData [_row,0]);
|
|
|
|
_vehicleData params [
|
|
"_class",
|
|
"_cost",
|
|
"_buildTime",
|
|
"_specialisation",
|
|
"_specialisationData"
|
|
];
|
|
|
|
[player, _class, _cost, _buildTime, _specialisation, _specialisationData] spawn CLF_fnc_factoryBuild;
|
|
|
|
//hint str (_listBox lnbData [_row,0]);
|
|
|
|
//private _camera = "camera" camCreate getPosATL player;
|
|
//_camera cameraEffect ["internal", "back"];
|
|
//showCinemaBorder false; |