entity_prototype.burner

Things that already exist in the current mod API
Post Reply
User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 333
Joined: Tue Jul 08, 2014 10:06 am
Contact:

entity_prototype.burner

Post 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
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: entity_prototype.burner

Post 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
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Already exists”