7 Commits

Author SHA1 Message Date
Jacob Schmidt
1d5225f279 feat: Implement binary serialization for RAM database and mission end save
All checks were successful
Build / Build (push) Successful in 29s
This commit introduces binary serialization for the RAM database to improve performance and adds a mission end event handler to ensure data is saved with a backup when the mission ends.

- Implemented binary serialization and deserialization for key-values, hash tables, and lists in `Utils.cs`. This replaces the previous text-based serialization, resulting in faster save and load times.
- Moved data writing and reading logic from `RAMDb.cs` to `Utils.cs` for better code organization and reusability.
- Modified `RAMDb.cs` to use the new binary serialization methods (`ExportToBinary` and `ImportFromBinary`).
- Added a mission end event handler in `XEH_preInit_server.sqf` to trigger a forced save with backup when the mission ends. This ensures that data is not lost in case of unexpected server shutdowns.
- Updated the extension binaries (`ArmaRAMDb_x64.dll` and `ArmaRAMDb_x64.so`) with the new serialization logic.
- Added a static `db` property to the `Main` class to allow access to the `RAMDb` instance from anywhere in the extension.
- Modified the `Save` and `Load` methods in `Main.cs` to use the new binary serialization methods.
- Updated the `Dispose` method in `RAMDb.cs` to ensure a final save and backup is performed when the object is disposed.
2025-05-03 19:34:15 -05:00
Jacob Schmidt
2fbf0d4ed4 feat: Add database loading and handle missing ARDB file
All checks were successful
Build / Build (push) Successful in 30s
This commit introduces database loading functionality and handles the scenario where the ARDB file is not found.

Key changes:

*   In `addons/db/functions/fnc_init.sqf`, the `load` function is called to initialize the database.
*   In `extension/src/RAMDb.cs`, a check is added to verify the existence of the ARDB file. If the file is not found, a new database will be created when data is saved, and an info log is generated.
*   Updated DLL and SO files.
2025-03-22 19:38:29 -05:00
Jacob Schmidt
3af3adeec6 feat: Updated file paths and build artifacts
All checks were successful
Build / Build (push) Successful in 30s
This commit updates file paths and build artifacts for the ArmaRAMDb extension.

Specifically, the following changes were made:

*   **Main.cs:**
    *   Defined `DEFAULT_ARDB_PATH` to store the default path for the ARDB file.
    *   Updated `ARDB_LOGFOLDER` to use `Path.DirectorySeparatorChar` for cross-platform compatibility.
    *   Used `DEFAULT_ARDB_PATH` when checking for the existence of the ARDB file.
*   **RAMDb.cs:**
    *   Removed the `DEFAULT_ARDB_PATH` constant.
    *   Modified the constructor to accept an optional `ardbPath` parameter and use `Main.DEFAULT_ARDB_PATH` as the default if none is provided.
*   **Build Artifacts:**
    *   Updated the `ArmaRAMDb_x64.dll` and `ArmaRAMDb_x64.so` files in the extension/bin/Release/net8.0/win-x64/publish and extension/bin/Release/net8.0/linux-x64/publish directories, as well as the root directory.
2025-03-22 13:40:21 -05:00
Jacob Schmidt
6e4bd093ee Update ArmaRAMDb with new features and improvements, including logging enhancements, support for ARDB file format, and various function updates. Added config.xml to project inclusion and modified function includes for better compatibility. Updated build files for both Windows and Linux platforms. 2025-03-21 23:01:39 -05:00
Jacob Schmidt
fac86fcda7 Update 03212025@1305 2025-03-21 13:04:47 -05:00
Jacob Schmidt
595540350a Major Update 01012025@1335 2025-01-01 13:37:36 -06:00
Jacob Schmidt
885cc267c5 Initial Repo Setup
All checks were successful
Build / Build (push) Successful in 1m41s
2024-11-10 14:33:22 -06:00