feat: Implement virtual garage system including class initialization and UI for managing player vehicle unlocks.
This commit is contained in:
parent
c06d9f534a
commit
2b895b7d1a
@ -25,6 +25,8 @@
|
|||||||
GVAR(VGarageClass) = createHashMapObject [[
|
GVAR(VGarageClass) = createHashMapObject [[
|
||||||
["#type", "IVGarageClass"],
|
["#type", "IVGarageClass"],
|
||||||
["#create", {
|
["#create", {
|
||||||
|
GVAR(isPreLoaded) = false;
|
||||||
|
|
||||||
_self set ["uid", (getPlayerUID player)];
|
_self set ["uid", (getPlayerUID player)];
|
||||||
_self set ["vGarage", createHashMap];
|
_self set ["vGarage", createHashMap];
|
||||||
_self set ["isLoaded", false];
|
_self set ["isLoaded", false];
|
||||||
|
|||||||
@ -26,15 +26,10 @@ private _locations = (missionConfigFile >> "FORGE_CfgGarages" >> "locations") ca
|
|||||||
true;
|
true;
|
||||||
} count _locations;
|
} 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_center = createVehicle ["Land_HelipadEmpty_F", FORGE_VehSpawnPos, [], 0, "NONE"];
|
||||||
BIS_fnc_garage_centerType = getText (configFile >> "CfgVehicles" >> "B_Quadbike_01_F" >> "model");
|
BIS_fnc_garage_centerType = getText (configFile >> "CfgVehicles" >> "B_Quadbike_01_F" >> "model");
|
||||||
|
|
||||||
|
if !(GVAR(isPreLoaded)) then {
|
||||||
[missionNamespace, "garageOpened", {
|
[missionNamespace, "garageOpened", {
|
||||||
params ["_display", "_toggleSpace"];
|
params ["_display", "_toggleSpace"];
|
||||||
|
|
||||||
@ -88,4 +83,13 @@ BIS_fnc_garage_centerType = getText (configFile >> "CfgVehicles" >> "B_Quadbike_
|
|||||||
};
|
};
|
||||||
}] call BFUNC(addScriptedEventHandler);
|
}] call BFUNC(addScriptedEventHandler);
|
||||||
|
|
||||||
|
GVAR(isPreLoaded) = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
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];
|
||||||
|
};
|
||||||
|
|
||||||
["Open", true] call BFUNC(garage);
|
["Open", true] call BFUNC(garage);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user