mt-mods / abriglass

Stained glass mod for Minetest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Broken craft recipes

axcore opened this issue · comments

Some items cannot be crafted due to complications in the code that I don't fully understand.

Example: abriglass:stainedglass_pattern01

  1. Craft some yellow dye, dye:yellow
  2. Craft some abriglass:stained_glass_hardware
  3. Use those ingredients to craft at least nine copies of abriglass:stained_glass_hardware in its yellow version
  4. Code in crafts.lua suggests that this should produce the node we want:
minetest.register_craft({
	output = 'abriglass:stainedglass_pattern01 9',
	recipe = {
		{sg_conversion_table['yellow'], sg_conversion_table['yellow'], sg_conversion_table['yellow'] },
		{sg_conversion_table['yellow'], sg_conversion_table['yellow'], sg_conversion_table['yellow'] },
		{sg_conversion_table['yellow'], sg_conversion_table['yellow'], sg_conversion_table['yellow'] },
	}
})

But in fact it produces abriglass:stainedglass_pattern05, because (for some reason) the code is confusing the yellow, green and blue versions of abriglass:stained_glass_hardware.

Compare the craft recipe that should produce abriglass:stainedglass_pattern05

minetest.register_craft({
	output = 'abriglass:stainedglass_pattern05 9',
	recipe = {
		{sg_conversion_table['blue'], sg_conversion_table['blue'], sg_conversion_table['blue'] },
		{sg_conversion_table['blue'], sg_conversion_table['green'], sg_conversion_table['blue'] },
		{sg_conversion_table['blue'], sg_conversion_table['blue'], sg_conversion_table['blue'] },
	}
})

tldr minetest engine sucks with hardware coloring - worked around it