From 00433bafe53cc7d0da9f0cfa06fe54f86a16ac47 Mon Sep 17 00:00:00 2001 From: Jude Melton-Houghton Date: Wed, 20 Apr 2022 21:01:21 -0400 Subject: [PATCH] Make compatibility aliases for dyes --- mesecons_compat/init.lua | 10 ++++++++++ mesecons_lightstone/init.lua | 24 ++++++++++++------------ 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/mesecons_compat/init.lua b/mesecons_compat/init.lua index 6c86620..6602060 100644 --- a/mesecons_compat/init.lua +++ b/mesecons_compat/init.lua @@ -23,6 +23,16 @@ if minetest.get_modpath("default") then mesecon.steel_block_texture = "default_steel_block.png" end +local dye_colors = { + "red", "green", "blue", "grey", "dark_grey", "yellow", + "orange", "white", "pink", "magenta", "cyan", "violet", +} +if minetest.get_modpath("dye") then + for _, color in ipairs(dye_colors) do + minetest.register_alias("mesecons_compat:dye_" .. color, "dye:" .. color) + end +end + if minetest.get_modpath("fire") then mesecon.sound_name_fire = "fire_fire" end diff --git a/mesecons_lightstone/init.lua b/mesecons_lightstone/init.lua index 5508d56..8d30152 100644 --- a/mesecons_lightstone/init.lua +++ b/mesecons_lightstone/init.lua @@ -59,15 +59,15 @@ function mesecon.lightstone_add(name, base_item, texture_off, texture_on, desc) end -mesecon.lightstone_add("red", "dye:red", "jeija_lightstone_red_off.png", "jeija_lightstone_red_on.png", "Red Lightstone") -mesecon.lightstone_add("green", "dye:green", "jeija_lightstone_green_off.png", "jeija_lightstone_green_on.png", "Green Lightstone") -mesecon.lightstone_add("blue", "dye:blue", "jeija_lightstone_blue_off.png", "jeija_lightstone_blue_on.png", "Blue Lightstone") -mesecon.lightstone_add("gray", "dye:grey", "jeija_lightstone_gray_off.png", "jeija_lightstone_gray_on.png", "Grey Lightstone") -mesecon.lightstone_add("darkgray", "dye:dark_grey", "jeija_lightstone_darkgray_off.png", "jeija_lightstone_darkgray_on.png", "Dark Grey Lightstone") -mesecon.lightstone_add("yellow", "dye:yellow", "jeija_lightstone_yellow_off.png", "jeija_lightstone_yellow_on.png", "Yellow Lightstone") -mesecon.lightstone_add("orange", "dye:orange", "jeija_lightstone_orange_off.png", "jeija_lightstone_orange_on.png", "Orange Lightstone") -mesecon.lightstone_add("white", "dye:white", "jeija_lightstone_white_off.png", "jeija_lightstone_white_on.png", "White Lightstone") -mesecon.lightstone_add("pink", "dye:pink", "jeija_lightstone_pink_off.png", "jeija_lightstone_pink_on.png", "Pink Lightstone") -mesecon.lightstone_add("magenta", "dye:magenta", "jeija_lightstone_magenta_off.png", "jeija_lightstone_magenta_on.png", "Magenta Lightstone") -mesecon.lightstone_add("cyan", "dye:cyan", "jeija_lightstone_cyan_off.png", "jeija_lightstone_cyan_on.png", "Cyan Lightstone") -mesecon.lightstone_add("violet", "dye:violet", "jeija_lightstone_violet_off.png", "jeija_lightstone_violet_on.png", "Violet Lightstone") +mesecon.lightstone_add("red", "mesecons_compat:dye_red", "jeija_lightstone_red_off.png", "jeija_lightstone_red_on.png", "Red Lightstone") +mesecon.lightstone_add("green", "mesecons_compat:dye_green", "jeija_lightstone_green_off.png", "jeija_lightstone_green_on.png", "Green Lightstone") +mesecon.lightstone_add("blue", "mesecons_compat:dye_blue", "jeija_lightstone_blue_off.png", "jeija_lightstone_blue_on.png", "Blue Lightstone") +mesecon.lightstone_add("gray", "mesecons_compat:dye_grey", "jeija_lightstone_gray_off.png", "jeija_lightstone_gray_on.png", "Grey Lightstone") +mesecon.lightstone_add("darkgray", "mesecons_compat:dye_dark_grey", "jeija_lightstone_darkgray_off.png", "jeija_lightstone_darkgray_on.png", "Dark Grey Lightstone") +mesecon.lightstone_add("yellow", "mesecons_compat:dye_yellow", "jeija_lightstone_yellow_off.png", "jeija_lightstone_yellow_on.png", "Yellow Lightstone") +mesecon.lightstone_add("orange", "mesecons_compat:dye_orange", "jeija_lightstone_orange_off.png", "jeija_lightstone_orange_on.png", "Orange Lightstone") +mesecon.lightstone_add("white", "mesecons_compat:dye_white", "jeija_lightstone_white_off.png", "jeija_lightstone_white_on.png", "White Lightstone") +mesecon.lightstone_add("pink", "mesecons_compat:dye_pink", "jeija_lightstone_pink_off.png", "jeija_lightstone_pink_on.png", "Pink Lightstone") +mesecon.lightstone_add("magenta", "mesecons_compat:dye_magenta", "jeija_lightstone_magenta_off.png", "jeija_lightstone_magenta_on.png", "Magenta Lightstone") +mesecon.lightstone_add("cyan", "mesecons_compat:dye_cyan", "jeija_lightstone_cyan_off.png", "jeija_lightstone_cyan_on.png", "Cyan Lightstone") +mesecon.lightstone_add("violet", "mesecons_compat:dye_violet", "jeija_lightstone_violet_off.png", "jeija_lightstone_violet_on.png", "Violet Lightstone")