Yes, add function in public void PowerTurretOn(AutoTurret turret)
This
turret.UpdateFromInput(25, 0);
Function to alert when a turret locks on a targetNo Thanks
Hi, this plugin exists purely to allow turrets to function without power.
Yes, but ... This function provides power to the output for the detector.
So that you can connect alerts
In case the issue isn't clear, the way this plugin currently powers turrets is by flagging it as on, not by actually providing energy. That means that when the turret acquires a target, has low ammo or no ammo, the corresponding outputs will never send any power because the turret has has no power to send.
It certainly seems in scope for this plugin to address that. A simple way to fix it is to provide power to the turret using the function that the original poster provided. This is how the Powerless Electronics plugin works which doesn't have this issue (as long as the plugin is configured to provide more than 10 power). However, that plugin's focus is not turrets, so I've been sending folks to other plugins such as this one if they want the ability to toggle them on/off.
The main potential issue with using the suggested approach is that players can effectively exploit it by not adding ammo to the turret, and using the No Ammo output to siphon off all the extra energy. To address this, you can either provide a low amount of energy like 11 or make it configurable with a recommendation for a low amount if server owners are concerned about this.