Page 1 of 1
[Solved] Use of LuaRecipePrototype::hidden_from_player_crafting?
Posted: Tue Jul 23, 2019 6:35 pm
by Schallfalke
0.17.57 has introduced
LuaRecipePrototype::hidden_from_player_crafting.
What does it do actually?
I set this flag = true to some recipes in my mod.
I expected those recipes will be hidden by "E" key player crafting GUI, but still selectable in assembling machines.
BUT I have not found it to be of any effects. Those recipes still show on player crafting GUI and clickable.
Re: [>= 0.17.57] Use of LuaRecipePrototype::hidden_from_player_crafting?
Posted: Tue Jul 23, 2019 6:45 pm
by Bilka
How did you set it?
Re: [>= 0.17.57] Use of LuaRecipePrototype::hidden_from_player_crafting?
Posted: Tue Jul 23, 2019 6:51 pm
by Schallfalke
In my
Schall Alien Loot mod, I modify the recipe prototypes like:
Code: Select all
{
type = "recipe",
name = "coal-from-alien-ore-1",
icons = { {icon = "__base__/graphics/icons/mip/coal.png"},
{icon = "__SchallAlienLoot__/graphics/icons/from-alien-ore-1.png"} },
icon_size = 64,
icon_mipmaps = 4,
order = "a[coal]-1[from-alien-ore-1]",
enabled = true,
category = "advanced-crafting",
energy_required = 5,
ingredients = {{ "alien-ore-1", 1}},
result = "coal",
hidden_from_player_crafting = true, <------------
allow_decomposition = false
},
Re: [>= 0.17.57] Use of LuaRecipePrototype::hidden_from_player_crafting?
Posted: Tue Jul 23, 2019 7:02 pm
by Bilka
The property is called hide_from_player_crafting in the data stage:
https://wiki.factorio.com/Prototype/Rec ... r_crafting
Recommendation: launch factorio with the --check-unused-prototype-data command line parameter and it will log properties that the game doesn't use, such as that.
Re: [>= 0.17.57] Use of LuaRecipePrototype::hidden_from_player_crafting?
Posted: Tue Jul 23, 2019 7:52 pm
by Schallfalke
Thank you, it works.
Did not expect different names in different stage. Good information!