Page 1 of 1

[boskid][1.1.82] Fluid-powered loader-1x1s do not show "out of fuel" notification when filled then emptied

Posted: Fri Jun 09, 2023 1:54 pm
by Deadlock989
When loaders powered by electricity or fluids are first placed down and they have no power, their respective "out of fuel" flashing icon is correctly shown:

Untitled.jpg
Untitled.jpg (23.84 KiB) Viewed 1408 times

However if fluid-powered loaders are given fluid and it then runs out (i.e. the entity tooltip shows no fluidbox information and calling get_fluid_count() returns 0), the loader deactivates, but there is no flashing "out of fuel" notification.

Given that the belt continues to animate, there is no visual cue that the loader is disabled due to lack of fuel - it just looks like there is nothing to put onto the belt.

Re: [boskid][1.1.82] Fluid-powered loader-1x1s do not show "out of fuel" notification when filled then emptied

Posted: Fri Jun 09, 2023 6:15 pm
by boskid
Thanks for the report. Issue is now fixed for 1.1.83. When i was adding energy source support to loaders i did some clever tricks to reduce update cost but those tricks were too clever as i made loader only able to consume energy in increments of energy_per_item. In this case when the amount of energy left in the buffer was greater than 0 but lower than energy_per_item, the icon would not show up but the loader would also refuse to consume energy. I did some changes here to make it possible to consume less energy than energy_per_item, basically by changing counter of how many transfers are to be paid in energy to be a float.