made some improvements on how the encounters trigger

This commit is contained in:
Sebastian Bularca
2026-05-22 13:47:44 +02:00
parent 8aea6f7eb3
commit dd049642b0
8 changed files with 174 additions and 58 deletions

View File

@@ -1,7 +1,10 @@
using Jovian.SaveSystem;
using Jovian.InGameLogging;
using Jovian.EncounterSystem;
using Nox.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using ZLinq;
using UnityEngine;
using PlayMode = Nox.Core.PlayMode;
@@ -36,14 +39,15 @@ namespace Nox.Game {
gameDataState.activeSessionId = latestSession.sessionId;
gameDataState.savedPartyPosition = saveData.partyPosition.ToVector3();
gameDataState.ActiveParty = saveData.activeParty;
adventureData.isPartyMoving = saveData.adventureData.isPartyMoving;
adventureData.isPartyMoving = saveData.adventureData.isPartyMoving;
adventureData.isEncounterActive = saveData.adventureData.isEncounterActive;
adventureData.currentDay = saveData.adventureData.currentDay;
adventureData.suppliesAvailable = saveData.adventureData.suppliesAvailable;
adventureData.currentTime = saveData.adventureData.currentTime;
adventureData.currentDayPhase = saveData.adventureData.currentDayPhase;
adventureData.completedEncounterIds.Clear();
adventureData.completedEncounterIds.AddRange(saveData.adventureData.completedEncounterIds);
adventureData.abandonedEncounterIds.AddRange(saveData.adventureData.abandonedEncounterIds ?? Enumerable.Empty<string>());
adventureData.questLogEntries.AddRange(saveData.questLogEntries ?? Enumerable.Empty<QuestLogEntry>());
if(gameLogStore != null && saveData.gameLogData != null) {
gameLogStore.RestoreFromSaveData(saveData.gameLogData);
@@ -65,6 +69,9 @@ namespace Nox.Game {
//game mode specific data
public AdventureData adventureData;
// Quest progression
public List<QuestLogEntry> questLogEntries;
// Party
public PartyDefinition activeParty;
public SerializableVector3 partyPosition;