Unfortunately Terrax didn't write it like that, the whole thing is written as one giant function with a "million" nested conditional statements. So checks for stuff are all over the place instead of localized to specific objects.
What you describe it actually kind of does now, except because it's not localized, it runs countless checks once a frame per event/player all throughout the code. Such as Terrax ABS having 104 references in the code or Mog's stuff having 51 references.
Could someone make it not do that to maintain all the functionality of the script? Of course. Though my main goals were just to speed it up for my game by removing so many extra checks for very specific stuff, and hopefully adapt it for PIXI5. Not really to rewrite the whole script. Goodness knows, I'd just make my own lighting system if I wanted to do that.
What you describe it actually kind of does now, except because it's not localized, it runs countless checks once a frame per event/player all throughout the code. Such as Terrax ABS having 104 references in the code or Mog's stuff having 51 references.
Could someone make it not do that to maintain all the functionality of the script? Of course. Though my main goals were just to speed it up for my game by removing so many extra checks for very specific stuff, and hopefully adapt it for PIXI5. Not really to rewrite the whole script. Goodness knows, I'd just make my own lighting system if I wanted to do that.

