CitiesSkylinesMods / TMPE

Cities: Skylines Traffic Manager: President Edition
https://steamcommunity.com/sharedfiles/filedetails/?id=1637663252
MIT License
571 stars 85 forks source link

Hotreload save #1635

Closed kianzarrin closed 2 years ago

kianzarrin commented 2 years ago

First commit: introduce Preload Patch phase Second commit: hot reload

EDIT: summary from discord talk:

krzychu124 commented 2 years ago

This feature shouldn't be available on public/release version

kianzarrin commented 2 years ago

This feature shouldn't be available on public/release version

@krzychu124 its only available when hot-reloading. otherwise the code is not executed.

krzychu124 commented 2 years ago

This feature shouldn't be available on public/release version

@krzychu124 its only available when hot-reloading. otherwise the code is not executed.

I understand, but I don't think normal users should be able to use hot-reloading feature. We have features like ExtCitizen data holding ParkingAI state which will desync and cause flying citizens all over the map. It's very minor issue if you develop or test things but very annoying when you actually play normally.

One more thing, I see that asset data reload will work only if LOM is available, right?

kianzarrin commented 2 years ago

I don't think normal users should be able to use hot-reloading

OK I make it DEBUG only. CS should probably turn off file observers too. but that can be done with LOM patch as well.

I see that asset data reload will work only if LOM is available, right?

Yes. LOM holds the data that needs to be transferred.

krzychu124 commented 2 years ago

Q: What will happen if I hot-reload different mod after hot-reloading TM:PE (patch is still active)?