Page 1 of 1

LuaEntityPrototype.max_energy

Posted: Thu Mar 22, 2018 1:11 pm
by LuziferSenpai
Greetings,

Why is this only for flying Robots? Why is it not for Trains, Cars etc. too. So we can read out what there max_energy capacity is?

Would be a nice to have.

Greetz,

Luzifer

Re: LuaEntityPrototype.max_energy

Posted: Thu Mar 22, 2018 1:47 pm
by Rseding91
Because max_energy is only a property on flying robots. Trains, cars and so on have no max energy.

A robots max energy is the maximum amount of energy they can store. A train and or car don't store energy - they consume energy from what ever fuel they're burning which you can read through entity.burner. http://lua-api.factorio.com/latest/LuaBurner.html

Re: LuaEntityPrototype.max_energy

Posted: Thu Mar 22, 2018 5:27 pm
by LuziferSenpai
Rseding91 wrote:Because max_energy is only a property on flying robots. Trains, cars and so on have no max energy.

A robots max energy is the maximum amount of energy they can store. A train and or car don't store energy - they consume energy from what ever fuel they're burning which you can read through entity.burner. http://lua-api.factorio.com/latest/LuaBurner.html
Thats not what I ask for. I ask for that I can read out what the MAX Energy is that a Train can have. A Standard can have 10667 Energy so 600kW. Thats what I want to read out.

Re: LuaEntityPrototype.max_energy

Posted: Thu Mar 22, 2018 6:54 pm
by Rseding91

Re: LuaEntityPrototype.max_energy

Posted: Thu Mar 22, 2018 6:59 pm
by LuziferSenpai
Rseding91 wrote:You can read that with http://lua-api.factorio.com/latest/LuaE ... ergy_usage
Oh ty!