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

@@ -3,6 +3,7 @@ using Nox.Game;
using Nox.Platform;
using Nox.Game.UI;
using Jovian.SaveSystem;
using Jovian.InGameLogging;
using System.Collections.Generic;
using ZLinq;
using UnityEngine;
@@ -21,6 +22,7 @@ namespace Nox.Core {
private readonly ISaveSystem saveSystem;
private readonly ISceneTransition sceneTransition;
private readonly AdventureData adventuredata;
private readonly IGameLogStore gameLogStore;
private readonly Dictionary<PlayMode, IPlayMode?> playModeCache = new();
@@ -43,12 +45,14 @@ namespace Nox.Core {
PlatformSettings platformSettings,
ISaveSystem saveSystem,
ISceneTransition sceneTransition,
AdventureData adventuredata) {
AdventureData adventuredata,
IGameLogStore gameLogStore) {
this.gameDataState = gameDataState;
this.platformSettings = platformSettings;
this.saveSystem = saveSystem;
this.sceneTransition = sceneTransition;
this.adventuredata = adventuredata;
this.gameLogStore = gameLogStore;
bootstrapSettings = Addressables.LoadAssetAsync<PlayModeSettings>(bootstrapReferences.playModeSettings).WaitForCompletion();
}
@@ -75,7 +79,11 @@ namespace Nox.Core {
private NoxSavedDataSet? CaptureNoxSaveData() {
var adventure = FindAdventurePlayMode();
return adventure?.CaptureNoxSaveData();
var saveData = adventure?.CaptureNoxSaveData();
if(saveData != null) {
saveData.gameLogData = gameLogStore.GetSaveData();
}
return saveData;
}
private AdventurePlayMode? FindAdventurePlayMode() {