added in-game logger

This commit is contained in:
Sebastian Bularca
2026-04-05 12:32:42 +02:00
parent 1ec734d033
commit fa15608f3a
43 changed files with 3019 additions and 8 deletions

View File

@@ -1,4 +1,5 @@
using Jovian.SaveSystem;
using Jovian.InGameLogging;
using Nox.Core;
using System;
using ZLinq;
@@ -11,7 +12,8 @@ namespace Nox.Game {
public static NoxSavedDataSet RestoreSavedData(
ISaveSystem saveSystem,
GameDataState gameDataState,
ref AdventureData adventureData) {
ref AdventureData adventureData,
IGameLogStore gameLogStore = null) {
var sessions = saveSystem.GetAllSessions().AsValueEnumerable().OrderByDescending(s => s.lastSaveDateUtc).ToList();
if(sessions.Count == 0) {
return null;
@@ -36,6 +38,10 @@ namespace Nox.Game {
gameDataState.ActiveParty = saveData.partyDefinition;
adventureData = saveData.adventureData;
if(gameLogStore != null && saveData.gameLogData != null) {
gameLogStore.RestoreFromSaveData(saveData.gameLogData);
}
return saveData;
}
}
@@ -55,6 +61,9 @@ namespace Nox.Game {
// Party
public PartyDefinition partyDefinition;
public SerializableVector3 partyPosition;
// In-game log
public GameLogSaveData gameLogData;
}
/// <summary>