Page 1 of 1

[1.1.47] Tips & tricks (modded) prototype error at load time

Posted: Wed Nov 24, 2021 3:08 am
by ShadowGlass
This error only happens on 1.1.47. It works correctly on 1.1.46.

image_2021-11-24_135959.png
image_2021-11-24_135959.png (24.76 KiB) Viewed 1939 times

The data.lua is simply adding a custom tip with the "unlocked-recipe" trigger (testmod attached):

Code: Select all

data:extend(
{
	{
		type = "tips-and-tricks-item-category",
		name = "test-category",
		order = "a"
	},
	{
		type = "tips-and-tricks-item",
		name = "test-tip",
		category = "test-category",
		order = "a",
		trigger =
		{
			type = "unlocked-recipe",
			recipe = "speed-module"
		},
		is_title = true,
	}
})
There's no problem with trigger types "set-recipe" or "build-entity", but I haven't tested all possible trigger types from the wiki. I'd recommend testing all of them.

Re: [1.1.47] Tips & tricks (modded) prototype error at load time

Posted: Wed Nov 24, 2021 5:47 am
by ShadowGlass
So apparently this was changed to "unlock-recipe" from "unlocked-recipe". I think the bug report is still valid, as this was an undocumented change.

1. Please update the wiki. Updating the documentation should be part of the workflow, and a change/bugfix/feature shouldn't be considered "done", until the documentation is also updated.
2. This was a breaking change for mods, and was not included in the changelog. Please don't do this.

Thank you.

Re: [1.1.47] Tips & tricks (modded) prototype error at load time

Posted: Wed Nov 24, 2021 1:07 pm
by kovarex
Hello, thanks for the notice, I added a note to the next changelog.

Re: [1.1.47] Tips & tricks (modded) prototype error at load time

Posted: Wed Nov 24, 2021 2:13 pm
by jan1i3
According to my tool there are 0 (latest 1.1 releases of) mods on the portal with `unlocked-recipe` in any of their .lua files, and I believe this to be accurate.

While I agree that keeping docs up to date is important, and adding a notice in the changelog is good as well, I am incredibly happy to see you make this kind of a change even with the potential of breaking a few mods. And in this case there happen to be no (public) broken mods making it a win-win :D

Re: [1.1.47] Tips & tricks (modded) prototype error at load time

Posted: Fri Nov 26, 2021 11:15 am
by Bilka
The wiki is now also updated.