1
0
mirror of https://codeberg.org/tenplus1/bakedclay.git synced 2024-11-07 00:40:22 +01:00

added switch in settings for coloured_clay mod compatibility

This commit is contained in:
tenplus1 2020-06-13 19:01:11 +01:00
parent b7b3b98003
commit dd7749131c
3 changed files with 44 additions and 0 deletions

View File

@ -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.

View File

@ -300,4 +300,43 @@ lucky_block:add_blocks({
})
end
-- 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
print ("[MOD] Baked Clay loaded")

2
settingtypes.txt Normal file
View File

@ -0,0 +1,2 @@
# Registers compatibility aliases with the older colored_clay mod
colored_clay_compatibility (Colored Clay Compatibility) bool false