I've already said the code is useless. 90% of it is the "artificial" implementation and the remainder you can figure out yourself. I have not been talking about more than a single line of code, for a long time. But you didn't understand when I told you that, and didn't want it clarified.
Just letting modders set the global variable on line 416, and even all the maintenance needed for it, is far, far less work than you've already done in responding to me.
I'm not responding anymore. This topic needs to die. At this point it is purely about "saving face".