diff --git a/addons/garage/XEH_postInit.sqf b/addons/garage/XEH_postInit.sqf index 84f2529..09242f7 100644 --- a/addons/garage/XEH_postInit.sqf +++ b/addons/garage/XEH_postInit.sqf @@ -1 +1,48 @@ -#include "script_component.hpp" \ No newline at end of file +#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); \ No newline at end of file diff --git a/icon_128_ca.paa b/icon_128_ca.paa index 3853600..6f982a6 100644 Binary files a/icon_128_ca.paa and b/icon_128_ca.paa differ diff --git a/icon_128_highlight_ca.paa b/icon_128_highlight_ca.paa index 70c69cf..db3b65e 100644 Binary files a/icon_128_highlight_ca.paa and b/icon_128_highlight_ca.paa differ diff --git a/icon_64_ca.paa b/icon_64_ca.paa index 493c58d..2451db9 100644 Binary files a/icon_64_ca.paa and b/icon_64_ca.paa differ diff --git a/mod.cpp b/mod.cpp index 874df33..598d62f 100644 --- a/mod.cpp +++ b/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"; \ No newline at end of file +actionName = "Website"; +dlcColor[] = {0.45, 0.47, 0.41, 1}; \ No newline at end of file diff --git a/title_ca.paa b/title_ca.paa new file mode 100644 index 0000000..25434ca Binary files /dev/null and b/title_ca.paa differ diff --git a/title_co.paa b/title_co.paa deleted file mode 100644 index 98456d4..0000000 Binary files a/title_co.paa and /dev/null differ