Start to fix turrets placed outside of a base turning off turrets inside a base
- cache turrets within 40m instead of doing a physics query to find all turrets within 40m each time we update interference
- rewrite the interference system, getting rid of all the queues
- system is no longer recursive since a turret can only overload itself, meaning we never have to recalculate neighbors interference
- when a turret turns on, if it would cause a nearby turret to go over the interference limit it instead will overload itself
- when a turret turns off, it will check if any nearby turrets that are overloaded can now turn on
Now the complex part: which overloaded turret should be turned on first
- tried to reactivate overloaded turrets based on the order they were powered on, however this could be abused by stacking 40 turrets in your base (mostly overloaded) and the raiders having to destroy every single turret in the base before theirs would turn on
- instead trying to prioritize the overloaded turrets with the least amount of active turrets nearby, assuming that the FOB will have less turrets nearby then the turrets inside the base