diff --git a/README.md b/README.md index fd143df..e740e03 100644 --- a/README.md +++ b/README.md @@ -18,3 +18,6 @@ Changelog: - 0.1 - Initial Release Lucky Blocks: 9 + + +Note: Under settings you will find 'colored_clay_compatibility' switch that when enabled will register aliases for the older colored clay mod and it's stairplus stairs. diff --git a/init.lua b/init.lua index a6da3ff..600021d 100644 --- a/init.lua +++ b/init.lua @@ -265,4 +265,41 @@ lucky_block:add_blocks({ }) end -minetest.log("action", "[bakedclay] loaded.") +-- colored clay compatibility +if minetest.settings:get_bool("colored_clay_compatibility") == true then + +local cc = { + {"black", "black"}, + {"blue", "blue"}, + {"bright", "natural"}, + {"brown", "brown"}, + {"cyan", "cyan"}, + {"dark_green", "dark_green"}, + {"dark_grey", "dark_grey"}, + {"green", "green"}, + {"grey", "grey"}, + {"hardened", "natural"}, + {"magenta", "magenta"}, + {"orange", "orange"}, + {"pink", "pink"}, + {"red", "red"}, + {"violet", "violet"}, + {"white", "white"}, + {"yellow", "yellow"} +} + +for n = 1, #cc do + + local nod1 = "colored_clay:" .. cc[n][1] + local nod2 = "bakedclay:" .. cc[n][2] + + minetest.register_alias(nod1, nod2) + + if stairsplus_mod then + stairsplus:register_alias_all("colored_clay", cc[n][1], "bakedclay", cc[n][2]) + end +end + +end + +minetest.log("action", "[MOD] Baked Clay loaded.") diff --git a/settingtypes.txt b/settingtypes.txt new file mode 100644 index 0000000..bdd2a13 --- /dev/null +++ b/settingtypes.txt @@ -0,0 +1,2 @@ +# Registers compatibility aliases with the older colored_clay mod +colored_clay_compatibility (Colored Clay Compatibility) bool false