[0.17.79] Recipe prototype icon and locale inheritance behaves differently

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
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!

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 3976
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.17.79] Recipe prototype icon and locale inheritance behaves differently

Post by Klonan » Mon Dec 09, 2019 10:08 am

I will move this to modding interface requests

Post Reply

Return to “Modding interface requests”

Who is online

Users browsing this forum: Bilka