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?
Digging in
-
- Fast Inserter
- Posts: 226
- Joined: Wed Apr 30, 2014 11:17 pm
- Contact:
Digging in
Like my mods? Check out another! Or see older, pre-0.12.0 mods.
-
- Filter Inserter
- Posts: 402
- Joined: Fri May 23, 2014 8:54 am
- Contact:
Re: Digging in
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"
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"