how to consistently detect when entities have electricity?
Posted: Tue Mar 12, 2019 9:19 pm
Filed this bug: viewtopic.php?f=7&t=67527
The GUI electricity bar oddness is not a big deal so I'm prepared for it to be not-a-bug, but from the Lua API perspective having LuaEntity .energy == .electric_buffer_size for a lamp with zero electricity available, and no internal generation capacity, is confusing.
Is there a better way than .energy > 0 to consistently detect when entities have power?
The GUI electricity bar oddness is not a big deal so I'm prepared for it to be not-a-bug, but from the Lua API perspective having LuaEntity .energy == .electric_buffer_size for a lamp with zero electricity available, and no internal generation capacity, is confusing.
Is there a better way than .energy > 0 to consistently detect when entities have power?