hytonhan / Timberborn-SimpleFloodgateTriggers

MIT License
1 stars 3 forks source link

Crash while auto saving (Experimental branch v0.2.2.1) #3

Closed FuryoftheStars closed 2 years ago

FuryoftheStars commented 2 years ago

As noted in the title, when the game went to auto save, it crashed, spewing the below to the log.

[Error  : Unity Log] ArgumentException: Can't serialize Hytone.Timberborn.Plugins.Floodgates.EntityAction.StreamGaugeFloodgateLink of type Hytone.Timberborn.Plugins.Floodgates.EntityAction.StreamGaugeFloodgateLink
Stack trace:
Timberborn.WorldSerialization.PrimitiveTypeSerialization.Serialize (System.Object value) (at <aee47ec7978a4ebfb965970708fbaa52>:0)
Timberborn.WorldSerialization.ObjectSave.SetArray[T] (System.String name, T[] values) (at <aee47ec7978a4ebfb965970708fbaa52>:0)
Timberborn.Persistence.ObjectSaver.Set[T] (Timberborn.Persistence.ListKey`1[T] key, System.Collections.Generic.IReadOnlyCollection`1[T] values) (at <81093724205945d2bcf38adc918217d8>:0)
Hytone.Timberborn.Plugins.Floodgates.EntityAction.FloodgateTriggerMonoBehaviour.Save (Timberborn.Persistence.IEntitySaver entitySaver) (at <3a11c115c1b642cb8e72e426f63505d6>:0)
Timberborn.Persistence.WorldSaveFactory.SaveEntity (UnityEngine.GameObject gameObject, Timberborn.WorldSerialization.EntitySave output) (at <81093724205945d2bcf38adc918217d8>:0)
Timberborn.Persistence.WorldSaveFactory.SaveEntities (Timberborn.WorldSerialization.WorldSave worldSave) (at <81093724205945d2bcf38adc918217d8>:0)
Timberborn.Persistence.WorldSaveFactory.Create () (at <81093724205945d2bcf38adc918217d8>:0)
Timberborn.GameSaveRuntimeSystem.GameSaver.Save (Timberborn.GameSaveRepositorySystem.SaveReference saveReference, System.Boolean skipNameValidation) (at <fb74d2ff515d408a84b82347789206b3>:0)
Timberborn.GameSaveRuntimeSystem.GameSaver.SaveSkippingNameValidation (Timberborn.GameSaveRepositorySystem.SaveReference saveReference) (at <fb74d2ff515d408a84b82347789206b3>:0)
Timberborn.Autosaving.Autosaver.Save () (at <f8c572698f6a4f4180c2f26eaafcbd64>:0)
Timberborn.Autosaving.Autosaver.Update () (at <f8c572698f6a4f4180c2f26eaafcbd64>:0)
hytonhan commented 2 years ago

Hey! This issue is known. The saving system has drastically changed between stable and experimental, causing the floodgate mod to crash the game upon saving/loading. This, much like a lot of other mods, will be fixed once experimental hits stable. Until then I am afraid this mod will not work on experimental. Sorry for that and thank you for undestanding!

FuryoftheStars commented 2 years ago

Ah, ok. Well, just to put this out there for anyone else who happens to come here and see this, it does still work and save with the basic triggers of Drought Begin and Drought End (I haven’t tried the schedule triggers), so it’s not completely broken. :)