Compare commits
2 Commits
3c3ee3f94f
...
1828673c6b
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1828673c6b | ||
![]() |
643276d4ff |
@ -1 +1,48 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
[QGVAR(handleEvents), {
|
||||
params ["_control", "_isConfirmDialog", "_message"];
|
||||
|
||||
diag_log format ["[FORGE: Garage] Received event: %1", _message];
|
||||
|
||||
_message = fromJSON _message;
|
||||
private _event = _message get "event";
|
||||
private _data = _message get "data";
|
||||
|
||||
private _vehicles = GETVAR(player,FORGE_Garage,[]);
|
||||
|
||||
switch (_event) do {
|
||||
case "REQUEST_GARAGE_DATA": {
|
||||
private _garageData = createHashMap;
|
||||
private _vehicleList = [];
|
||||
|
||||
{
|
||||
private _vehicle = _x;
|
||||
if (isNull _vehicle || { !alive _vehicle }) exitWith {};
|
||||
|
||||
private _vehicleInfo = createHashMapFromArray [
|
||||
["classname", typeOf _vehicle],
|
||||
["damage", damage _vehicle],
|
||||
["fuel", fuel _vehicle],
|
||||
["hitpoints", getAllHitPointsDamage _vehicle]
|
||||
];
|
||||
|
||||
_vehicleList pushBack _vehicleInfo;
|
||||
} forEach _vehicles;
|
||||
|
||||
_garageData set ["vehicles", _vehicleList];
|
||||
_control ctrlWebBrowserAction ["ExecJS", format ["handleGarageDataRequest(%1)", (toJSON _vehicleList)]];
|
||||
};
|
||||
case "STORE_VEHICLE": {
|
||||
// Logic to store vehicle in garage
|
||||
// This would typically involve saving the vehicle's state to a database or similar
|
||||
};
|
||||
case "RETRIEVE_VEHICLE": {
|
||||
// Logic to retrieve vehicle from garage
|
||||
// This would typically involve loading the vehicle's state from a database or similar
|
||||
};
|
||||
default {
|
||||
diag_log format ["[FORGE: Garage] Unknown event: %1", _event];
|
||||
};
|
||||
};
|
||||
}] call CFUNC(addEventHandler);
|
BIN
icon_128_ca.paa
BIN
icon_128_ca.paa
Binary file not shown.
Binary file not shown.
BIN
icon_64_ca.paa
BIN
icon_64_ca.paa
Binary file not shown.
6
mod.cpp
6
mod.cpp
@ -1,12 +1,14 @@
|
||||
dir = "@forge_client";
|
||||
name = "FORGE Client";
|
||||
author = "IDSolutions";
|
||||
picture = "title_co.paa";
|
||||
picture = "title_ca.paa";
|
||||
logoSmall = "icon_64_ca.paa";
|
||||
logo = "icon_128_ca.paa";
|
||||
logoOver = "icon_128_highlight_ca.paa";
|
||||
tooltip = "IDS";
|
||||
tooltipOwned = "IDS Owned";
|
||||
overview = "FORGE Client - Official Modification";
|
||||
description = "IDS Client - Version 1.0.0";
|
||||
description = "FORGE Client - Version 1.0.0";
|
||||
action = "https://innovativedevsolutions.org";
|
||||
actionName = "Website";
|
||||
dlcColor[] = {0.45, 0.47, 0.41, 1};
|
BIN
title_ca.paa
Normal file
BIN
title_ca.paa
Normal file
Binary file not shown.
BIN
title_co.paa
BIN
title_co.paa
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user