feat: Add virtual garage functionality and bank UI event handling.
This commit is contained in:
parent
93b2383b2c
commit
c06d9f534a
@ -27,7 +27,7 @@ params ["_control", "_isConfirmDialog", "_message"];
|
||||
private _alert = fromJSON _message;
|
||||
private _event = _alert get "event";
|
||||
private _data = _alert get "data";
|
||||
private _display = displayChild findDisplay 46;
|
||||
// private _display = displayChild findDisplay 46;
|
||||
|
||||
private _uid = GVAR(BankClass) get "uid";
|
||||
private _account = GVAR(BankClass) get "account";
|
||||
|
||||
@ -26,7 +26,14 @@ private _locations = (missionConfigFile >> "FORGE_CfgGarages" >> "locations") ca
|
||||
true;
|
||||
} count _locations;
|
||||
|
||||
private _nearVehicles = FORGE_VehSpawnPos nearEntities [["Car", "Tank", "Air", "Ship"], 5];
|
||||
if (_nearVehicles isNotEqualTo []) exitWith {
|
||||
private _params = ["warning", "Virtual Garage", "Vehicle spawn position is blocked. Please move the vehicle before accessing the garage.", 3000];
|
||||
EGVAR(notifications,NotificationClass) call ["create", _params];
|
||||
};
|
||||
|
||||
BIS_fnc_garage_center = createVehicle ["Land_HelipadEmpty_F", FORGE_VehSpawnPos, [], 0, "NONE"];
|
||||
BIS_fnc_garage_centerType = getText (configFile >> "CfgVehicles" >> "B_Quadbike_01_F" >> "model");
|
||||
|
||||
[missionNamespace, "garageOpened", {
|
||||
params ["_display", "_toggleSpace"];
|
||||
@ -50,10 +57,6 @@ BIS_fnc_garage_center = createVehicle ["Land_HelipadEmpty_F", FORGE_VehSpawnPos,
|
||||
["ListAdd", [_display]] call BFUNC(garage);
|
||||
}] call BFUNC(addScriptedEventHandler);
|
||||
|
||||
BIS_fnc_garage_centerType = getText (configFile >> "CfgVehicles" >> "B_Quadbike_01_F" >> "model");
|
||||
|
||||
["Open", true] call BFUNC(garage);
|
||||
|
||||
[missionNamespace, "garageClosed", {
|
||||
private _nearestObjects = BIS_fnc_garage_center nearEntities [["Car","Tank","Air","Ship"], 15];
|
||||
|
||||
@ -84,3 +87,5 @@ BIS_fnc_garage_centerType = getText (configFile >> "CfgVehicles" >> "B_Quadbike_
|
||||
};
|
||||
};
|
||||
}] call BFUNC(addScriptedEventHandler);
|
||||
|
||||
["Open", true] call BFUNC(garage);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user