CyberEngineTweaks icon indicating copy to clipboard operation
CyberEngineTweaks copied to clipboard

Game and some other things are accessible from where they shouldn't

Open WSSDude opened this issue 1 year ago • 1 comments

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

WSSDude avatar Oct 09 '22 13:10 WSSDude

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.

WSSDude avatar Oct 09 '22 18:10 WSSDude

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.

WSSDude avatar Oct 15 '22 18:10 WSSDude

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

WSSDude avatar Oct 21 '22 12:10 WSSDude