LuaGuiElement::choose-elem-button.type = recipe, technology

Post Reply
Bilka
Factorio Staff
Factorio Staff
Posts: 3130
Joined: Sat Aug 13, 2016 9:20 am
Contact:

LuaGuiElement::choose-elem-button.type = recipe, technology

Post by Bilka »

Make it possible to make the player choose a recipe or a technology using choose-elem-button, not just the existing types ( "item", "tile", "entity", or "signal") by adding the types recipe and technology.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
Bergzwerg
Burner Inserter
Burner Inserter
Posts: 16
Joined: Mon Mar 28, 2016 12:18 am
Contact:

Re: LuaGuiElement::choose-elem-button.type = recipe, technology

Post by Bergzwerg »

i have stumbled on not being able to use recipes aswell and would like to use it.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: LuaGuiElement::choose-elem-button.type = recipe, technology

Post by Rseding91 »

When you say recipe/technology do you mean "all of the recipes the player has unlocked as they see in their crafting GUI" or do you mean "All recipes that exist in the game"? The same question for technologies.
If you want to get ahold of me I'm almost always on Discord.

Bilka
Factorio Staff
Factorio Staff
Posts: 3130
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: LuaGuiElement::choose-elem-button.type = recipe, technology

Post by Bilka »

In my case, I meant all of them, I want to use the gui to unlock recipes (or technologies). My question here is how it is done for items. Showing everything allows me to code "invalid selections" so that i can simply remove un-unlocked (or already unlocked) recipes/technologies after the player selects them.

I don't include hidden ones in my definition of all of them.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: LuaGuiElement::choose-elem-button.type = recipe, technology

Post by Rseding91 »

I've added fluid and recipe support for 0.16 but technology is a little more complex.

Technology icons don't fit in the standard button size (32x32) meaning they're going to be near impossible to understand when squashed to fit or the button will be massive.
If you want to get ahold of me I'm almost always on Discord.

Bilka
Factorio Staff
Factorio Staff
Posts: 3130
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: LuaGuiElement::choose-elem-button.type = recipe, technology

Post by Bilka »

Rseding91 wrote:I've added fluid and recipe support for 0.16 but technology is a little more complex.
Thank you!
Rseding91 wrote:Technology icons don't fit in the standard button size (32x32) meaning they're going to be near impossible to understand when squashed to fit or the button will be massive.
Would it be possible to use the left part of the normal technology gui as the gui to do the selections in? Then the fact that the button itself shows only a small graphic shouldn't matter too much. It's not too important to me though, I mostly cared about the recipes and would've used the technologies as a workaround.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: LuaGuiElement::choose-elem-button.type = recipe, technology

Post by eradicator »

Rseding91 wrote:I've added fluid and recipe support for 0.16 but technology is a little more complex.

Technology icons don't fit in the standard button size (32x32) meaning they're going to be near impossible to understand when squashed to fit or the button will be massive.
I've used some sprite buttons with technology icons in a .14 mod (e.g. "technology/military") and even downscaled to 32² they looked just fine.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Post Reply

Return to “Implemented mod requests”