CyberEngineTweaks
CyberEngineTweaks copied to clipboard
Game and some other things are accessible from where they shouldn't
Game should be isolated from drawing functions and from init.lua, along with other selected functions.
It should be functional only in these:
- onInit
- onUpdate
- onTweak
- override handlers
- observer handlers
- binding handlers
Idea from @psiberx : Add a flag of sorts into mod environment, check the flag in affected functions. This flag could also be used to sandbox ImGui a bit more cleanly.
Made WIP version of something here https://github.com/yamashi/CyberEngineTweaks/commit/5450cbdd4c04c3997496085c7633c4a0aff17575
It could use some more polish, but it seems to do what it was supposed to do. Leaving this open for now to not forget to clean this up a bit.
We have found a better solution in general, it is currently present in master.
There could still be issues with onShutdown with this, but majority of other issues which could be caused by this should be resolved without need of any changes to the code!
Gonna close this as I concider done what this wanted to achieve in the end