add 'stairsplus_clay_compatibility' setting

This commit is contained in:
tenplus1 2023-03-15 07:47:46 +00:00
parent bd5ff73c19
commit 2e3e82cd92
3 changed files with 17 additions and 6 deletions

@ -8,6 +8,7 @@ https://forum.minetest.net/viewtopic.php?id=8890
Changelog: Changelog:
- 1.2 - Add 'stairsplus_clay_compatibility' setting.
- 1.1 - Remove 0.4.x compatibility to better support 5.x mods - 1.1 - Remove 0.4.x compatibility to better support 5.x mods
- 1.0 - Re-Added glazed terracotta blocks when you cook baked clay in furnace (thanks Amara2_MK), added support for sofar's flowerpot mod, missing glazed textures re-coloured by firefox. - 1.0 - Re-Added glazed terracotta blocks when you cook baked clay in furnace (thanks Amara2_MK), added support for sofar's flowerpot mod, missing glazed textures re-coloured by firefox.
- 0.9 - Baked clay now works in the technic cnc machine - 0.9 - Baked clay now works in the technic cnc machine
@ -24,3 +25,5 @@ Lucky Blocks: 10
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. 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.
You will also find the 'stairsplus_clay_compatibility' setting that is enabled by default for older worlds that switched from default stairs mod to stairsplus. It can be disabled for brand new worlds only using stairsplus mod though.

@ -26,6 +26,8 @@ local techcnc_mod = minetest.get_modpath("technic_cnc")
local stairs_mod = minetest.get_modpath("stairs") local stairs_mod = minetest.get_modpath("stairs")
local stairsplus_mod = minetest.get_modpath("moreblocks") local stairsplus_mod = minetest.get_modpath("moreblocks")
and minetest.global_exists("stairsplus") and minetest.global_exists("stairsplus")
local stairsplus_compat = minetest.settings:get_bool("stairsplus_clay_compatibility") ~= false
-- scroll through colours -- scroll through colours
for _, clay in pairs(clay) do for _, clay in pairs(clay) do
@ -62,14 +64,17 @@ for _, clay in pairs(clay) do
sounds = default.node_sound_stone_defaults() sounds = default.node_sound_stone_defaults()
}) })
stairsplus:register_alias_all("bakedclay", clay[1], if stairsplus_compat then
"bakedclay", "baked_clay_" .. clay[1])
minetest.register_alias("stairs:slab_bakedclay_".. clay[1], stairsplus:register_alias_all("bakedclay", clay[1],
"bakedclay:slab_baked_clay_" .. clay[1]) "bakedclay", "baked_clay_" .. clay[1])
minetest.register_alias("stairs:stair_bakedclay_".. clay[1], minetest.register_alias("stairs:slab_bakedclay_".. clay[1],
"bakedclay:stair_baked_clay_" .. clay[1]) "bakedclay:slab_baked_clay_" .. clay[1])
minetest.register_alias("stairs:stair_bakedclay_".. clay[1],
"bakedclay:stair_baked_clay_" .. clay[1])
end
-- stairs redo -- stairs redo
elseif stairs_mod and stairs.mod then elseif stairs_mod and stairs.mod then

@ -1,2 +1,5 @@
# Registers compatibility aliases with the older colored_clay mod # Registers compatibility aliases with the older colored_clay mod
colored_clay_compatibility (Colored Clay Compatibility) bool false colored_clay_compatibility (Colored Clay Compatibility) bool false
# Registers compatibility aliases in older worlds for StairsPlus mod
stairsplus_clay_compatibility (StairsPlus Stair Compatibility) bool true