
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.
6.7 MiB
6.7 MiB