Banjobeni / DerailValley-PersistentJobs

Derail Valley Peristent Jobs Mod
https://www.nexusmods.com/derailvalley/mods/794
MIT License
2 stars 1 forks source link

S282 Tenders not spawning #11

Closed Average-S2000-Enjoyer closed 1 year ago

Average-S2000-Enjoyer commented 1 year ago

When persistent jobs is loaded no tenders can spawn for the S282 and the game freezes when I try to make a new save.

Banjobeni commented 1 year ago

As we discussed on discord, it is not certain that this type of bug originate in PJ. Still, there is an exception in the log that needs fixing. The problem here is that there are already jobless cars on a track at the time the car spawning job generator runs, due to loading a savegame with PJ the first time. The car spawning algorithm should be able to handle this and be fixed.


  at PersistentJobsMod.CarSpawningJobGenerators.EmptyHaulJobWithCarsGenerator+<>c.<GetTrackCandidates>b__1_3 (DV.Logic.Job.Job j) [0x00000] in <cc33f3951f0a44de8ed793b8dcd6ee58>:0 
  at System.Linq.Enumerable.All[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x0002c] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 
  at PersistentJobsMod.CarSpawningJobGenerators.EmptyHaulJobWithCarsGenerator+<>c.<GetTrackCandidates>b__1_1 (System.ValueTuple`2[T1,T2] t) [0x0000d] in <cc33f3951f0a44de8ed793b8dcd6ee58>:0 
  at System.Linq.Enumerable+WhereListIterator`1[TSource].ToList () [0x00017] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 
  at System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0001f] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 
  at PersistentJobsMod.CarSpawningJobGenerators.EmptyHaulJobWithCarsGenerator.GetTrackCandidates (System.Collections.Generic.List`1[T] tracks) [0x00051] in <cc33f3951f0a44de8ed793b8dcd6ee58>:0 
  at PersistentJobsMod.CarSpawningJobGenerators.EmptyHaulJobWithCarsGenerator.TryGenerateJobChainController (StationController startingStation, System.Boolean requirePlayerLicensesCompatible, System.Random random) [0x000c6] in <cc33f3951f0a44de8ed793b8dcd6ee58>:0 
  at PersistentJobsMod.HarmonyPatches.StationProceduralJobsController_Patch.GenerateAndFinalizeEmptyHaulJob (StationController startingStation, System.Boolean requirePlayerLicensesCompatible, System.Random random) [0x00016] in <cc33f3951f0a44de8ed793b8dcd6ee58>:0 
  at PersistentJobsMod.HarmonyPatches.StationProceduralJobsController_Patch.GenerateJobChain (StationProceduralJobsRuleset generationRuleset, StationController stationController, System.Random random, System.Boolean forceJobWithLicenseRequirementFulfilled) [0x0021b] in <cc33f3951f0a44de8ed793b8dcd6ee58>:0 
  at PersistentJobsMod.HarmonyPatches.StationProceduralJobsController_Patch+<GenerateProceduralJobsCoroutine>d__1.MoveNext () [0x00100] in <cc33f3951f0a44de8ed793b8dcd6ee58>:0 
  at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00026] in <85d1d3e7744a4a47b5f51883bf40bba2>:0