I've not seen a field so far that will detect if an entity has access to power or not. I am trying to detect if a laser turret is currently powered or unpowered, but I imagine the usefulness is much more broad than that.
Maybe it should be a float instead of a boolean to indicate the percentage powered, as I know the grid can fluctuate and partially power some items. Not sure exactly how that is handled.
Thoughts?
Edit:
Based on IRC conversation with Rseding91, a field to indicate if the entity is connected to a power grid capable of producing energy would also suffice.
Field to indicate entity is powered
Re: Field to indicate entity is powered
This seems to be exactly what LuaEntity::is_connected_to_electric_network does. The thread can be moved to implemented requests.