api call to get power drawed from electric network
Posted: Wed May 09, 2018 3:26 am
Hi,
I'm working on an electric interface for my turret energy shields and I want them to loose their energy more quickly, when there is no energy available on the network.
It seems like there is no api to see how much energy the entity actually drains.
When I use is_connected_to_electric_network(), it always returns true as long as there are any power-producers in the network, even if they output nothing, even if they are just empty accumulators.
My request would be to make the function return false if the energy is 0 or very low, or to add a lightweight api call to check how much the entity actually draws from the electric network.
edit: i found a workaround (by caching the stored energy) but still think this should be implemented
I'm working on an electric interface for my turret energy shields and I want them to loose their energy more quickly, when there is no energy available on the network.
It seems like there is no api to see how much energy the entity actually drains.
When I use is_connected_to_electric_network(), it always returns true as long as there are any power-producers in the network, even if they output nothing, even if they are just empty accumulators.
My request would be to make the function return false if the energy is 0 or very low, or to add a lightweight api call to check how much the entity actually draws from the electric network.
edit: i found a workaround (by caching the stored energy) but still think this should be implemented