Wow this was deadly

So, this is a monstrous change. It still needs 2 fixes: 1. we have to
make the player unable to turn the lights back on if they are currently
off. 2. we have to fix a bug where the enemy simply doesn't go turn off
the light for a second time -_-
In any case, I suggest not messing with this code unless you consult
with me, because holy crap this thing is crazy. If you really think
there is a nicer way to do it, feel free to completely roll back this
change and do it yourself lol, but I don't think time really permits
that.