Page 1 of 1

entity_prototype.burner

Posted: Fri Mar 30, 2018 5:21 pm
by LuziferSenpai
Hey,

I tested around AND WTF, I tested if a Stone Furnace runes with "Script Fuel". NO! entity.burner.heat_capacity doesnt give out the maximal Heat the Entity can have. Because Trains running out out of Heat after 2 Ticks, whats really wrong and Stone Furnaces doesnt even start to burn.

What I just ask for is something to read out the Heat Max Value that FUEL can give the entity!

I tried this with Fuel Trains, my Electric Trains and Stone Furnaces:

Code: Select all

/c
local entity = game.players[1].selected
entity.burner.heat = entity.burner.heat_capacity
entity.burner.currently_burning = "coal"
remaining_burning_fuel = entity.burner.heat_capacity
AND it does NOTHING

Greetz,

Luzifer

Re: entity_prototype.burner

Posted: Fri Mar 30, 2018 7:30 pm
by Rseding91
You're not understanding what that value actually is: heat_capacity is the energy buffer size - which is designed to run out in 2 ticks. Just like the buffer size on an electric entity. Every tick the game transfers energy from the "being burnt" item (http://lua-api.factorio.com/latest/LuaB ... ly_burning) into the buffer and reduces the "being burnt" energy value (http://lua-api.factorio.com/latest/LuaB ... rning_fuel).

What you want is to simply read the fuel value of a given item. That is how much energy will be transferred into the burner-enabled entity. You can read that from: http://lua-api.factorio.com/latest/LuaI ... fuel_value