To make the number next to the product mod. That there are many factories that produce the goods that would not think you have the goods or not.
Сделать количество рядом в с изделием, мод. Который бы показывал сколько есть заводов что производят товар, что бы не думать есть товар или нет.
To make the number next to the product
- bobingabout
- Smart Inserter
- Posts: 7351
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: To make the number next to the product
There may be a way to add a number... it depends what you want the number for? What should the number be telling you?
Re: To make the number next to the product
How many assemblers make this recipe/item.bobingabout wrote:There may be a way to add a number... it depends what you want the number for? What should the number be telling you?
Or press "P".
Re: To make the number next to the product
I meant how many plants are already producing goodsbobingabout wrote:There may be a way to add a number... it depends what you want the number for? What should the number be telling you?
- bobingabout
- Smart Inserter
- Posts: 7351
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: To make the number next to the product
How many entities already exist with this recipe set?
I'm not sure there's an easy way to do this, because of the limited (zero) access to base game GUIs.
I'm not sure there's an easy way to do this, because of the limited (zero) access to base game GUIs.
Re: To make the number next to the product
It's not so difficult. http://lua-api.factorio.com/latest/LuaE ... ity.recipebobingabout wrote:How many entities already exist with this recipe set?
I'm not sure there's an easy way to do this, because of the limited (zero) access to base game GUIs.
on_init find all assemblers, add them into global.assemblers.
on_built_entity or on_robot_built_entity add them to global.assemblers too.
All this events are fast (except one on_init - surface.find_entities_filtered, but wea are need at only once).
Then on press custom GUI "refresh" it can makes a table with all recipes what we have (not furnace-recipes, it can be changed by-the-way). If we have global.assemblers, then it don't needs a lot of time. All this recipes are saved to global.recipes_with_count now.
The global.recipes_with_count looks like
Code: Select all
-- local recipe_with_count = global.recipes_with_count[i]
recipe_with_count = {name = recipe_name, count = count, icons = icons, results = results}
- bobingabout
- Smart Inserter
- Posts: 7351
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: To make the number next to the product
You listed the easy part... how do you do the hard part of actually putting a number on the recipe crafting GUI?
There's no way to edit this GUI directly, no way to probe it to see what page you're looking at, how far you've scrolled it, and if the recipes are even in the order and position you expect them to be.
There's no way to edit this GUI directly, no way to probe it to see what page you're looking at, how far you've scrolled it, and if the recipes are even in the order and position you expect them to be.
Re: To make the number next to the product
It can be your own GUI, that will be updated by click on "refresh" button. Minimize it when you don't need it.bobingabout wrote:You listed the easy part... how do you do the hard part of actually putting a number on the recipe crafting GUI?
There's no way to edit this GUI directly, no way to probe it to see what page you're looking at, how far you've scrolled it, and if the recipes are even in the order and position you expect them to be.