Closed Alexejhero closed 1 year ago
Honestly, it would be nice if we brought back dependency injection. I would like to add a debug window to allow for modifying values without restarting the game and the ability to inject a settings object on every match would be much more elegant than coupling every handler component to the debug window.
The other option is to make the relevant members public or use reflection, which would also be less work.
In hindsight, dependency injection won't entirely solve this issue. For example if I want to add a button to force restart the pathfinding method because it stopped for whatever reason, I will either need to make the method public or use reflection.
I have a debug window implemention that I can copy paste from a different mod, I will add that and then we can fill it with useful methods
PathfindingHandler
,MovementHandler
andTasksHandler
all touch movement/pathfinding fields. These should be refactored.MinigameHandler
andTasksHandler
and allow each task to specify when it should be opened using something like MinigameSolver in #26VisionHandler
is a mess, it should be refactored to reduce duplicated code, reduce method complexity, and stuff like that