Merge remote-tracking branch 'upstream/master'

This commit is contained in:
bri cassa 2023-06-04 23:39:09 +02:00
commit 567a483405
8 changed files with 57 additions and 35 deletions

View File

@ -8,6 +8,8 @@ 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.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
- 0.8 - Cooking clay block in furnace gives natural baked clay which you can dye - 0.8 - Cooking clay block in furnace gives natural baked clay which you can dye
@ -23,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.

View File

@ -1,6 +0,0 @@
default
stairs
moreblocks?
lucky_block?
technic_cnc?
flowerpot?

View File

@ -1 +0,0 @@
Adds the ability to bake clay into blocks and colour them with dye.

View File

@ -1,3 +1,6 @@
-- 5.x translation
S = minetest.get_translator("bakedclay")
local flowers = { local flowers = {
{"delphinium", "Blue Delphinium", {"delphinium", "Blue Delphinium",
{-0.15, -0.5, -0.15, 0.15, 0.3, 0.15}, {color_cyan = 1}}, {-0.15, -0.5, -0.15, 0.15, 0.3, 0.15}, {color_cyan = 1}},
@ -22,7 +25,7 @@ local function add_simple_flower(name, desc, box, f_groups)
f_groups.attached_node = 1 f_groups.attached_node = 1
minetest.register_node("bakedclay:" .. name, { minetest.register_node("bakedclay:" .. name, {
description = desc, description = S(desc),
drawtype = "plantlike", drawtype = "plantlike",
waving = 1, waving = 1,
tiles = {"baked_clay_" .. name .. ".png"}, tiles = {"baked_clay_" .. name .. ".png"},
@ -32,7 +35,7 @@ local function add_simple_flower(name, desc, box, f_groups)
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
buildable_to = true, buildable_to = true,
stack_max = 99, -- stack_max = 99,
groups = f_groups, groups = f_groups,
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
selection_box = {type = "fixed", fixed = box} selection_box = {type = "fixed", fixed = box}
@ -115,3 +118,11 @@ minetest.register_decoration({
spawn_by = "group:water", spawn_by = "group:water",
num_spawn_by = 1 num_spawn_by = 1
}) })
-- flowerpot mod
if minetest.get_modpath("flowerpot") then
flowerpot.register_node("bakedclay:delphinium")
flowerpot.register_node("bakedclay:thistle")
flowerpot.register_node("bakedclay:lazarus")
flowerpot.register_node("bakedclay:mannagrass")
end

View File

@ -1,6 +1,7 @@
-- 5.x translation
S = minetest.get_translator("bakedclay")
-- Baked Clay by TenPlus1 -- list of clay colours
local clay = { local clay = {
{"natural", "Natural"}, {"natural", "Natural"},
{"white", "White"}, {"white", "White"},
@ -20,22 +21,26 @@ local clay = {
{"dark_green", "Dark Green"} {"dark_green", "Dark Green"}
} }
-- check mod support
local techcnc_mod = minetest.get_modpath("technic_cnc") 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
for _, clay in pairs(clay) do for _, clay in pairs(clay) do
-- node -- register node
minetest.register_node("bakedclay:" .. clay[1], { minetest.register_node("bakedclay:" .. clay[1], {
description = clay[2] .. " Baked Clay", description = S(clay[2] .. " Baked Clay"),
tiles = {"baked_clay_" .. clay[1] ..".png"}, tiles = {"baked_clay_" .. clay[1] ..".png"},
groups = {cracky = 3, bakedclay = 1}, groups = {cracky = 3, bakedclay = 1},
sounds = default.node_sound_stone_defaults() sounds = default.node_sound_stone_defaults()
}) })
-- craft recipe -- register craft recipe
if clay[1] ~= "natural" then if clay[1] ~= "natural" then
minetest.register_craft({ minetest.register_craft({
@ -59,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
@ -88,13 +96,16 @@ for _, clay in pairs(clay) do
default.node_sound_stone_defaults()) default.node_sound_stone_defaults())
end end
-- register bakedclay for use in technic_cnc mod -- register bakedclay for use in technic_cnc mod after all mods loaded
if techcnc_mod then if techcnc_mod then
technic_cnc.register_all("bakedclay:" .. clay[1], core.register_on_mods_loaded(function()
{cracky = 3, not_in_creative_inventory = 1},
{"baked_clay_" .. clay[1] .. ".png"}, technic_cnc.register_all("bakedclay:" .. clay[1],
clay[2] .. " Baked Clay") {cracky = 3, not_in_creative_inventory = 1},
{"baked_clay_" .. clay[1] .. ".png"},
clay[2] .. " Baked Clay")
end)
end end
end end
@ -106,7 +117,7 @@ for _, clay in pairs(clay) do
local texture = "baked_clay_terracotta_" .. clay[1] ..".png" local texture = "baked_clay_terracotta_" .. clay[1] ..".png"
minetest.register_node("bakedclay:terracotta_" .. clay[1], { minetest.register_node("bakedclay:terracotta_" .. clay[1], {
description = clay[2] .. " Glazed Terracotta", description = S(clay[2] .. " Glazed Terracotta"),
tiles = { tiles = {
texture .. "", texture .. "",
texture .. "", texture .. "",
@ -183,14 +194,6 @@ if minetest.settings:get_bool("colored_clay_compatibility") == true then
end end
end end
-- flowerpot mod
if minetest.get_modpath("flowerpot") then
flowerpot.register_node("bakedclay:delphinium")
flowerpot.register_node("bakedclay:thistle")
flowerpot.register_node("bakedclay:lazarus")
flowerpot.register_node("bakedclay:mannagrass")
end
-- get mod path -- get mod path
local path = minetest.get_modpath("bakedclay") local path = minetest.get_modpath("bakedclay")

View File

@ -21,8 +21,16 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
Textures by TenPlus1 (CC0) unless listed below
Textures by Amara2_MK (Creative Commons) Textures by Amara2_MK (Creative Commons)
https://www.curseforge.com/minecraft/texture-packs/glazed-terracotta-revamp https://www.curseforge.com/minecraft/texture-packs/glazed-terracotta-revamp
baked_clay_terracotta*.png baked_clay_terracotta*.png
Missing gray, light gray, black and green textures re-coloured by Firefox. Missing gray, light gray, black and green textures re-coloured by Firefox.
Textures by Timbits (CC-BY-SA 3.0)
baked_clay_lazarus.png
baked_clay_delphinium.png
baked_clay_mannagrass.png
baked_clay_thistle.png

View File

@ -1,4 +1,4 @@
name = bakedclay name = bakedclay
depends = default depends = default
optional_depends = stairs, moreblocks, lucky_block, technic_cnc, flowerpot optional_depends = stairs, moreblocks, lucky_block, flowerpot
description = Adds the ability to bake clay into blocks and colour them with dye. description = Adds the ability to bake clay into blocks and colour them with dye.

View File

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