Swap out g_pSystem null checks with a new boolean value g_vrInitialized. Sets the boolean value to true during Init and sets it to false during Shutdown. Adds a new Lua function vrmod.IsInitialized(). Adds checks to every relevant Lua function checking for initialization and throwing an error instead of crashing the game. Compiled and tested with the vrmod addon from the workshop and found no problems.
Fixes https://github.com/catsethecat/vrmod-module/issues/11
Swap out
g_pSystem
null checks with a new boolean valueg_vrInitialized
. Sets the boolean value to true duringInit
and sets it to false duringShutdown
. Adds a new Lua functionvrmod.IsInitialized()
. Adds checks to every relevant Lua function checking for initialization and throwing an error instead of crashing the game. Compiled and tested with the vrmod addon from the workshop and found no problems.