Lifecycle class #767
Labels
code cleanup
Refactor code, remove old code, improve maintainability
discussion
Contains debate on certain topics
technical
Tasks that need to be performed in order to improve quality and maintainability
Milestone
Currently the lifecycle for TM:PE is completely obfuscated across multiple classes, it's impossible to see at a glance what is going on through the various stages, and it's getting even more confusing now that we're supporting hot reloads, etc.
In #764 I suggested briefly this: #764 (comment)
Kian then added this: #764 (comment)
Even if we have mod to patch CS to not do weird stuff, we should still have a more coherent way of managing TMPE lifecycle.
Building on Kian's ideas, I suggest:
TrafficManagerMod
andLoadingExtension
(and anything else relevant) simply calls the applicable lifecycle methodsThe result would be a very concise lifecycle class and you could just read it to see exactly what steps happen in each stage of the lifecycle without getting bogged down in reams of code.
For example, enabled/disabled stuff in
Lifecycle.cs
could look something like (rough mockup):Basically, we should be able to see at a glance wtf is going on without having to wade through gargantuan amounts of code.
The
TrafficManagerMod.cs
would then be like (rough mockup):The text was updated successfully, but these errors were encountered: