I saw that you added in 0.13.2 the define for the rocket inventory.
It would be nice to have the same for other missing invenotories like the train wagon, even if using 1 usually works

not remember another for the moment.Rseding91 wrote:I can add them. Do you know of others so I can do them all at once?
Yes: http://lua-api.factorio.com/0.13.3/defines.html item_main and item_activeChoumiko wrote:The blueprint book is some kind of inventory right?
Mining drills don't have an output inventory. They have an internal energy progress bar and when that hits 100% it puts the result item(s) on the ground or in a chest in front of the entity.binbinhfr wrote:you have defines.inventory.mining_drill_modules
but no defines.inventory.mining_dril_output ?
Ok. Then is there a way to read the currently extracted ore (the icon that is shown in the mining drill info, at the right of the progress bar) ? Or to see if a drill is still working ?Rseding91 wrote:Mining drills don't have an output inventory. They have an internal energy progress bar and when that hits 100% it puts the result item(s) on the ground or in a chest in front of the entity.binbinhfr wrote:you have defines.inventory.mining_drill_modules
but no defines.inventory.mining_dril_output ?
"is mining" is true if the drill exists and has ore in it's range. You can check entity.mining_progress to see how far along it is.binbinhfr wrote:It would be nice also to have a is_mining() function, like the is_crafting(), to see if the drill is working or not.
Because for the moment, how can we test this ?
A expected_resources() function, giving back the number shown in the drill info, would be great too.
All these informations are displayed in the drill info pane, but not available in the API.
With these functions, we could really fully diagnose a drill.
"is mining" can be false if no electricity, or output full...Rseding91 wrote:"is mining" is true if the drill exists and has ore in it's range.
http://lua-api.factorio.com/0.13.9/LuaFluidBox.htmlbinbinhfr wrote:I was also looking for things like reading a storage tank.
Is there a way to read its content ? Or at least the name of fluid ?
Code: Select all
Name of the fluid (eg. crude-oil):
/c game.player.print(game.player.selected.fluidbox[1].type)
Amount (0..2500 for storage tanks):
/c game.player.print(game.player.selected.fluidbox[1].amount)
The drill is still mining even in those instances. It has no "true/false" state for is mining. If there's ore in the area the drill is by definition mining.binbinhfr wrote:"is mining" can be false if no electricity, or output full...Rseding91 wrote:"is mining" is true if the drill exists and has ore in it's range.
It would be nice to have it.
I was also looking for things like reading a storage tank.
Is there a way to read its content ? Or at least the name of fluid ?
Thx Daniel !!!daniel34 wrote:Code: Select all
Name of the fluid (eg. crude-oil): /c game.player.print(game.player.selected.fluidbox[1].type) Amount (0..2500 for storage tanks): /c game.player.print(game.player.selected.fluidbox[1].amount)