bloodypenguin / Skylines-MetroOverhaulMod

Metro Overhaul Mod for Cities: Skylines
http://steamcommunity.com/sharedfiles/filedetails/?id=816260433
GNU General Public License v3.0
66 stars 18 forks source link

Added defensive checks to prevent InvalidCastException #17

Closed calvin-fisher closed 7 years ago

calvin-fisher commented 7 years ago

This should prevent the errors on level load that people have been reporting: http://steamcommunity.com/workshop/filedetails/discussion/816260433/1842367319520455984/?ctp=17

calvin-fisher commented 7 years ago

I re-compiled with these changes, dropped in the new .dll, and everything is now working again in the latest version of the game.

calvin-fisher commented 7 years ago

Actually, found a bug: Simulation error: Array index is out of range.

Happens in TransportLine.GetNextStop or PassengerTrainAI.ArrivingToDestination

calvin-fisher commented 7 years ago

Okay, there are two problems. One: after, loading an existing game there are a bunch of Array index is out of range exceptions in PassengerTrainAIDetour.StartPathFind and PassengerTrainAI.ArrivingToDestination but they seem to go away.

The bigger problem is that metro trains don't spawn. All other vehicle types are spawning normally.

calvin-fisher commented 7 years ago

This stops all the errors, but I can't figure out how to make trains spawn. Is this mod still being maintained?

andreharv commented 7 years ago

Hey sorry for no responding sooner. I was on a hiatus but I am back now. Looks cool! Thanks for your contribution!

calvin-fisher commented 7 years ago

No problem, I was mostly trying to fix the bugs after the last version of the game was released. I couldn't figure it out, but BloodyPenguin fixed it pretty soon after.