Burner drain?

Place to get help with not working mods / modding interface.
Post Reply
User avatar
moon69
Fast Inserter
Fast Inserter
Posts: 181
Joined: Sun Sep 18, 2016 6:53 pm
Contact:

Burner drain?

Post by moon69 »

I've modded a pump to use a burner EnergySource.

Watching LuaBurner.remaining_burning_fuel, I can't figure out why it's slowly draining fuel (once I stick a piece of coal in it) even when freshly built and not connected to any pipes.

Code: Select all

local ass = util.table.deepcopy(data.raw["pump"]["pump"])
ass.name = "testpmp1"
ass.minable.result = ass.name

ass.energy_usage = "1kW"
ass.energy_source =
{
	type = "burner",	
	emissions_per_minute = 0,
	fuel_inventory_size = 5,
}
	  	  
data.raw["pump"][ass.name] = ass
Why is this?

Bilka
Factorio Staff
Factorio Staff
Posts: 3127
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Burner drain?

Post by Bilka »

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.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
moon69
Fast Inserter
Fast Inserter
Posts: 181
Joined: Sun Sep 18, 2016 6:53 pm
Contact:

Re: Burner drain?

Post by moon69 »


User avatar
moon69
Fast Inserter
Fast Inserter
Posts: 181
Joined: Sun Sep 18, 2016 6:53 pm
Contact:

Re: Burner drain?

Post by moon69 »

Now I think it about, perhaps a good fix is to add drain property to Burner EnergySource?

Might be fun to make burner machine that needs to be kept 'hot' or it breaks.

Post Reply

Return to “Modding help”