Page 1 of 1

[1.0.0] Recipe properties don't propagate to normal and expensive

Posted: Sun Nov 01, 2020 11:59 am
by GotLag
If you set a property on a recipe which has normal and expensive modes, that property does not apply to those modes.
For example, the following has no effect in-game except to show that the recipe has been modded:

Code: Select all

data.raw.recipe["burner-mining-drill"].hidden = true
To actually hide the recipe, the following is required:

Code: Select all

data.raw.recipe["burner-mining-drill"].normal.hidden = true
data.raw.recipe["burner-mining-drill"].expensive.hidden = true
I'm not sure if this is intentional or not, but it was very confusing when I encountered it.
My suggestion is that a property definition should be automatically applied to normal/expensive modes unless those mode definitions also define that property.

Re: [1.0.0] Recipe properties don't propagate to normal and expensive

Posted: Sun Nov 01, 2020 1:20 pm
by Pi-C
GotLag wrote: Sun Nov 01, 2020 11:59 am I'm not sure if this is intentional or not, but it was very confusing when I encountered it.
It is the expected behavior, see the paragraph above this:
If the recipe does not have a difficulty, this is located directly in the prototype. Otherwise, if the "normal" or "expensive" property exists, the recipe has difficulty. Then, the recipe data has to be specified for each difficulty instead of directly in the prototype.
Still, having the general recipe data (if no difficulties are defined) propagate to difficulties could be useful.

Re: [1.0.0] Recipe properties don't propagate to normal and expensive

Posted: Sun Nov 01, 2020 3:59 pm
by Rseding91
That is working as intended. I highly recommend anyone making mods to enable the "check-unused-prototype-data" config option so you can see when you define prototype values that the game doesn't use.