[0.17.79] Recipe prototype icon and locale inheritance behaves differently

Post your bugs and problems so we can fix them.
Post Reply
User avatar
theRustyKnife
Fast Inserter
Fast Inserter
Posts: 249
Joined: Thu Feb 26, 2015 9:26 pm
Contact:

[0.17.79] Recipe prototype icon and locale inheritance behaves differently

Post by theRustyKnife » Tue Dec 03, 2019 8:05 pm

When a recipe doesn't have icons or locale specified, but has a main product, it uses it's icons/locale. However, when a recipe is defined such that the main product is different for normal and expensive versions, the main product for the recipe overall is ambiguous. Locale just falls back (correctly, in my opinion) to recipe-name.xxx. Icons however are taken from the main product for the normal version, which is somewhat arbitrary.

What makes me think this is a bug, is that if the expensive version doesn't have a main product, you get an error saying icon is not specified, which is just weird.

Here's an example recipe that gets the default locale (recipe-name.test-recipe in this case), but the icon from the normal version (the iron stick icon):

Code: Select all

{
	type = 'recipe',
	name = 'test-recipe',
	enabled = true,
	subgroup = data.raw['item']['constant-combinator'].subgroup,
	
	normal = {
		ingredients = {},
		result = 'iron-stick',
	},
	
	expensive = {
		ingredients = {},
		result = 'iron-plate',
	},
},
Check out my mods!

Post Reply

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users