Compare commits

...

2 Commits

Author SHA1 Message Date
Jacob Schmidt
1828673c6b Merge branch 'master' of https://gitea.innovativedevsolutions.org/IDSolutions/client
All checks were successful
Build / Build (push) Successful in 28s
2025-05-04 20:02:50 -05:00
Jacob Schmidt
643276d4ff feat: Implement garage system and update client branding
This commit introduces a garage system to the client and updates the client's branding assets.

The garage system allows players to store and retrieve vehicles. It includes the following features:

-   Event handling for garage requests, vehicle storage, and vehicle retrieval.
-   Communication with a web browser control to display garage data.
-   Data serialization and deserialization using JSON.

The client branding has been updated with new icons and a modified `mod.cpp` file. The changes include:

-   Updated icons for the client.
-   Modified `mod.cpp` to reflect the new branding, including the mod name, picture, and DLC color.
2025-05-04 20:02:46 -05:00
7 changed files with 53 additions and 4 deletions

View File

@ -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);

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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

Binary file not shown.

Binary file not shown.