jorn86 / VoxelTycoonMods

MIT License
1 stars 1 forks source link

Console error with spawning higher tier industries mod #2

Open tjcdeveloper opened 1 year ago

tjcdeveloper commented 1 year ago

Currently getting an error in the console:

InvalidOperationException: Sequence contains no elements
System.Linq.Enumerable.Max (System.Collections.Generic.IEnumerable`1[T] source) (at <523a924aba464755b1747653b71e5189>:0)
ImprovedDemands.StoreSpawnerPatch.CalculateNewTierProbabilities (System.Collections.Generic.List`1[T] currentDemands, System.Collections.Generic.List`1[T] possibleTiers) (at <018f119795264239915b36fdf0a92ee7>:0)
ImprovedDemands.StoreSpawnerPatch.GetSpawnInfo (VoxelTycoon.Cities.City city, VoxelTycoon.QuickRandom random) (at <018f119795264239915b36fdf0a92ee7>:0)
ImprovedDemands.StoreSpawnerPatch.Prefix (VoxelTycoon.Cities.City city, VoxelTycoon.QuickRandom random, VoxelTycoon.Cities.CityStoreSpawnInfo& __result) (at <018f119795264239915b36fdf0a92ee7>:0)
(wrapper dynamic-method) VoxelTycoon.Cities.CityStoreSpawner.VoxelTycoon.Cities.CityStoreSpawner.GetSpawnInfo_Patch1(VoxelTycoon.Cities.CityStoreSpawner,VoxelTycoon.Cities.City,VoxelTycoon.QuickRandom)
VoxelTycoon.Cities.CityStoreSpawner.TryGetSpawnInfo (VoxelTycoon.Cities.City city, VoxelTycoon.QuickRandom random, VoxelTycoon.Cities.CityStoreSpawnInfo& spawnInfo) (at <4ce02168efed4142b0fd142d565e512b>:0)
VoxelTycoon.Cities.City.TrySpawnStore () (at <4ce02168efed4142b0fd142d565e512b>:0)
VoxelTycoon.Cities.City.InvalidateDemands () (at <4ce02168efed4142b0fd142d565e512b>:0)
VoxelTycoon.Cities.City.OnUpdate () (at <4ce02168efed4142b0fd142d565e512b>:0)
VoxelTycoon.Cities.CityManager.OnUpdate () (at <4ce02168efed4142b0fd142d565e512b>:0)
VoxelTycoon.UpdateBehaviour.Update () (at <4ce02168efed4142b0fd142d565e512b>:0)
jorn86 commented 1 year ago

Sounds like something broke with an update of the base game. If I ever get back to this game and modding it, I'll have a look. Until then, feel free to fork the mod and release a fix.