Page 1 of 1

[0.17.69] Drain with burner EnergySource on pump

Posted: Thu Oct 03, 2019 8:58 pm
by moon69
I've modded a pump to use a burner EnergySource.

Watching LuaBurner.remaining_burning_fuel, you can see it's slowly draining fuel (once fueled) even when freshly built and not connected to any pipes.
Bilka wrote:
Thu Oct 03, 2019 8:07 pm
Because of:
Pump update function wrote: if (!pumpedAnything)
this->energySource->extractEnergyAndPollute(prototype.energyUsage * ElectricEnergySource::restingEnergyConsumption, ...);
No idea why this code exists. Consider making a bug report, most likely that code was just not adjusted after the possibility to use non-electric energy sources in the pump was added.
Attached is simple mod that shows the issue, with save game with no other mods installed, and it's matching log file.

Re: [0.17.69] Drain with burner EnergySource on pump

Posted: Wed Oct 09, 2019 3:38 pm
by Honktown
Try adding fuel_category = "chemical"

Edit: Also try removing ".enabled = true". Your pump currently can't hook up to networks, and I think that's a circuit-set option, not one that should be defined anywhere else.

Also use clearer variable names.

Re: [0.17.69] Drain with burner EnergySource on pump

Posted: Wed Oct 09, 2019 8:10 pm
by Bilka
Thanks for the report, fixed for the next version.
Honktown wrote:
Wed Oct 09, 2019 3:38 pm
...
Recommendation: Don't give unsolicited and wrong advice.