[0.18.24] bug with input_flow_limit = "0W"
Posted: Fri May 15, 2020 12:53 am
Setting input_flow_limit to "0W" has very unusual effects (tested on assembling-machine entity). Example snippet of code:
With that code, a connected accumulator-type entity shows 1.1MW being produced in the power screen, even if active = false is set in-game, and the energy is going nowhere. If input_flow_limit is set to "0.0001W" the code works as expected: the accumulator shows "0W" being produced in the power screen (presumably rounded from 0.0001).
The 1.1MW value might be a side effect of the bug, as the entity is clearly set to consume 1MW with no drain. The information on the right side of the screen does not show min/max consumption, just "0W" max consumption and status: "No Power" whether the input_flow_limit is "0W" or "0.0001W" (the latter being confusing because it clearly should be gaining power... though the buffer doesn't have 1J or greater)
Code: Select all
elE.energy_source =
{
type = "electric",
usage_priority = "secondary-input",
buffer_capacity = "5MJ",
output_flow_limit = "0W",
input_flow_limit = "0W",
drain = "0W",
render_no_power_icon = false,
render_no_network_icon = false
}
elE.energy_usage = "1MW"
The 1.1MW value might be a side effect of the bug, as the entity is clearly set to consume 1MW with no drain. The information on the right side of the screen does not show min/max consumption, just "0W" max consumption and status: "No Power" whether the input_flow_limit is "0W" or "0.0001W" (the latter being confusing because it clearly should be gaining power... though the buffer doesn't have 1J or greater)