Defines for missing inventories
Defines for missing inventories
Hi,
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
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
My mods on the Factorio Mod Portal
Re: Defines for missing inventories
I can add them. Do you know of others so I can do them all at once?
If you want to get ahold of me I'm almost always on Discord.
Re: Defines for missing inventories
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?
My mods on the Factorio Mod Portal
Re: Defines for missing inventories
The blueprint book is some kind of inventory right?
Re: Defines for missing inventories
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?
If you want to get ahold of me I'm almost always on Discord.
Re: Defines for missing inventories
you have defines.inventory.mining_drill_modules
but no defines.inventory.mining_dril_output ?
but no defines.inventory.mining_dril_output ?
My mods on the Factorio Mod Portal
Re: Defines for missing inventories
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 ?
If you want to get ahold of me I'm almost always on Discord.
Re: Defines for missing inventories
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 ?
My mods on the Factorio Mod Portal
Re: Defines for missing inventories
I added LuaEntity::mining_target read for 0.13.10.
If you want to get ahold of me I'm almost always on Discord.
Re: Defines for missing inventories
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.
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.
My mods on the Factorio Mod Portal
Re: Defines for missing inventories
"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.
Expected resources isn't known by the drill. The display just guesses based off the ores in the drills area what the drill will end up mining. You can get the same effect by scanning all the ore around the drill and adding it up yourself.
If you want to get ahold of me I'm almost always on Discord.
Re: Defines for missing inventories
"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 ?
My mods on the Factorio Mod Portal
Re: Defines for missing inventories
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)
Re: Defines for missing inventories
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 ?
If you want to get ahold of me I'm almost always on Discord.
Re: Defines for missing inventories
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)
Ok, Rseding, the new LuaEntity::mining_target is already very helpful.
My mods on the Factorio Mod Portal