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.
This commit is contained in:
Jacob Schmidt 2025-03-22 19:38:29 -05:00
parent 832bdd7385
commit 2fbf0d4ed4
6 changed files with 6 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View File

@ -31,6 +31,8 @@ ramdb_db_buffer = 10240;
private _dll = "ArmaRAMDb" callExtension ["version", []]; private _dll = "ArmaRAMDb" callExtension ["version", []];
[] call FUNC(load);
diag_log text (format ["ArmaRAMDb: DLL Version %1 found", _dll]); diag_log text (format ["ArmaRAMDb: DLL Version %1 found", _dll]);
diag_log text "ArmaRAMDb: Functions loaded and Initializtion completed!"; diag_log text "ArmaRAMDb: Functions loaded and Initializtion completed!";
diag_log text (format ["ArmaRAMDb: Buffer size set to %1 Bytes", ramdb_db_buffer]); diag_log text (format ["ArmaRAMDb: Buffer size set to %1 Bytes", ramdb_db_buffer]);

View File

@ -89,6 +89,10 @@ namespace ArmaRAMDb
Main.Log("ARDB import complete", "debug"); Main.Log("ARDB import complete", "debug");
} }
else
{
Main.Log($"ARDB file not found at path: {_ardbPath}. A new database will be created when data is saved.", "info");
}
} }
catch (Exception ex) catch (Exception ex)
{ {