Allow setting hidden_from_player_crafting on a LuaRecipe
Posted: Mon Aug 05, 2019 2:43 pm
The attribute 'hidden_from_player_crafting' has been added to LuaRecipePrototype recently. However, you can't change that property at runtime through LuaRecipe, as the field is only present on the Prototype. I think it would be reasonable to add it as read-write to LuaRecipe as well, seeing that 'hidden_from_flow_stats' is available this way.
My particular use case would be to hide non-handcraftable recipes from the player's inventory view. This is not really doable at the data stage because you can't guarantee that the mod will be loaded last, potentially missing some recipe changes made by other mods. But I'm sure there could be more use cases for this, like custom scenarios for example.
My particular use case would be to hide non-handcraftable recipes from the player's inventory view. This is not really doable at the data stage because you can't guarantee that the mod will be loaded last, potentially missing some recipe changes made by other mods. But I'm sure there could be more use cases for this, like custom scenarios for example.