Digging in

Place to get help with not working mods / modding interface.
Schmendrick
Fast Inserter
Fast Inserter
Posts: 226
Joined: Wed Apr 30, 2014 11:17 pm
Contact:

Digging in

Post by Schmendrick »

This is a question that I suspect I'm going to have to ask the devs and hope for a response, but I figured I'd ask here first.

Is there a resource anywhere for the contents/structure of the userdata for entities? Specifically, I'm hoping to get at the "energy remaining from a unit of fuel" value of a boiler, but is this documented/available anywhere for any of the entities?
Like my mods? Check out another! Or see older, pre-0.12.0 mods.
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: Digging in

Post by JamesOFarrell »

Check here:

https://forums.factorio.com/wiki/inde ... Lua/Entity

"energy

Writable since 0.7.2.

Energy stored in the entity (Heat in furnace, energy stored in electrical devices etc.)

nil for entities that don't have the concept of energy stored inside.

game.player.print("Machine energy: " .. game.player.selected.energy .. "J")
game.player.selected.energy = 3000"
Post Reply

Return to “Modding help”