WhiteThunder,
Good Day, I hope you're doing well. I'm sure you're innundated with request about plugins. I'm curious how much work it would be to turn this feature on/off per player using a command like /PE E or /PE D to enable or disable respectively functioning like the autodoor plugin where users can turn the auto closing door feature on/off as a whole or per door.
Thanks.
Ability to turn electronics on/offSolved
I'm curious to understand what use case(s) this is solving. Since the plugin's inception, I was careful to not interfere with situations where players want or need to create logical circuits, hence the plugin only provides power to entities not plugged in. If there's an opportunity to better cater to player use cases, I'd like to learn about that.
The basic logic of this feature could be implemented pretty easily (1-2 hours), either in the original plugin or in an addon plugin that makes use of the OnPowerlessInputUpdate hook. However, where things will go wrong (not factored into the estimate) is that PowerlessElectronics (PE) doesn't have the ability to unpower entities, so if a player were to toggle PE off, their existing entities would need to be plugged in and then then unplugged to remain off.
I understand the challenges now. I had not noticed that if you plug something in this plugin would, essentially, disable the self powering mode for that device. Thanks for the info.
I was thinking more if the PE plugin was enabled to the default permission group, everyone would have power to devices as configured in the .json file. Everyone that has it may not want to power devices with the plugin and therefore would want to turn some of the items off.
Overall, I'm not sure if it's necessary to let players control this. If you are uncertain whether all players will want a particular entity type to be auto powered, then you can start with that entity type disabled and re-evaluate later.
One nuance to keep in mind is what happens when a free-powered entity is disconnected due to raiding. Currently, when an entity is unplugged, if eligible for free power, it will receive free power at that time. This can be used as a feature, such as to turn on a smart alarm when a branch on a wall is destroyed (due to the wall being destroyed). That circuit example can be achieved using a more complex design without PE, where the branch on the wall is fed into a blocker to prevent the smart alarm from being triggered, but PE allows for simplifying it. It may or may not be the player's intention to use this capability, so they may be surprised when various entities turn on throughout a raid.