LuaEntityPrototype.max_energy

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:

LuaEntityPrototype.max_energy

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

My MODs:
Click

Greetz,

Senpai

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

Re: LuaEntityPrototype.max_energy

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

User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 333
Joined: Tue Jul 08, 2014 10:06 am
Contact:

Re: LuaEntityPrototype.max_energy

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

My MODs:
Click

Greetz,

Senpai

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

Re: LuaEntityPrototype.max_energy

Post by Rseding91 »

If you want to get ahold of me I'm almost always on Discord.

User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 333
Joined: Tue Jul 08, 2014 10:06 am
Contact:

Re: LuaEntityPrototype.max_energy

Post by LuziferSenpai »

Rseding91 wrote:You can read that with http://lua-api.factorio.com/latest/LuaE ... ergy_usage
Oh ty!
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai

Post Reply

Return to “Already exists”