Merge remote-tracking branch 'upstream/master'

This commit is contained in:
bri cassa 2024-09-15 08:33:45 +02:00
commit 04b9577a91
3 changed files with 65 additions and 55 deletions

View File

@ -1,6 +1,10 @@
-- translation support -- translation support
local S = minetest.get_translator("bakedclay") local S = minetest.get_translator("bakedclay")
-- new flowers
local flowers = { local flowers = {
{"delphinium", S("Blue Delphinium"), {"delphinium", S("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}},
@ -15,8 +19,8 @@ local flowers = {
{-0.15, -0.5, -0.15, 0.15, 0.2, 0.15}, {color_dark_green = 1}} {-0.15, -0.5, -0.15, 0.15, 0.2, 0.15}, {color_dark_green = 1}}
} }
-- register some new flowers to fill in missing dye colours -- helper function
-- flower registration (borrowed from default game)
local function add_simple_flower(name, desc, box, f_groups) local function add_simple_flower(name, desc, box, f_groups)
f_groups.snappy = 3 f_groups.snappy = 3
@ -41,11 +45,14 @@ local function add_simple_flower(name, desc, box, f_groups)
}) })
end end
-- register new flowers to fill in missing dye colours
for _,item in pairs(flowers) do for _,item in pairs(flowers) do
add_simple_flower(unpack(item)) add_simple_flower(unpack(item))
end end
-- add new flowers to mapgen -- add new flowers to mapgen
minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
place_on = {"default:dirt_with_grass"}, place_on = {"default:dirt_with_grass"},
@ -118,7 +125,8 @@ minetest.register_decoration({
num_spawn_by = 1 num_spawn_by = 1
}) })
-- flowerpot mod -- flowerpot mod support
if minetest.get_modpath("flowerpot") then if minetest.get_modpath("flowerpot") then
flowerpot.register_node("bakedclay:delphinium") flowerpot.register_node("bakedclay:delphinium")
flowerpot.register_node("bakedclay:thistle") flowerpot.register_node("bakedclay:thistle")

View File

@ -32,7 +32,6 @@ 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 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
@ -43,7 +42,8 @@ for _, clay in pairs(clay) do
description = clay[2] .. " " .. S("Baked Clay"), description = clay[2] .. " " .. S("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(),
is_ground_content = false
}) })
-- register craft recipe -- register craft recipe
@ -141,6 +141,7 @@ for _, clay in pairs(clay) do
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {cracky = 3, terracotta = 1}, groups = {cracky = 3, terracotta = 1},
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
is_ground_content = false,
on_place = minetest.rotate_node on_place = minetest.rotate_node
}) })

View File

@ -1,4 +1,10 @@
-- helpers
local p = "bakedclay:" local p = "bakedclay:"
local p2 = "bakedclay:terracotta_"
-- add lucky blocks
lucky_block:add_blocks({ lucky_block:add_blocks({
{"dro", {"bakedclay:"}, 10, true}, {"dro", {"bakedclay:"}, 10, true},
@ -22,29 +28,7 @@ lucky_block:add_blocks({
p .. "orange", p .. "pink", p .. "red", p .. "violet", p .. "white", p .. "yellow" p .. "orange", p .. "pink", p .. "red", p .. "violet", p .. "white", p .. "yellow"
}, 2}, }, 2},
{"nod", "default:chest", 0, { {"nod", "default:chest", 0, {
{name = p.."natural", max = 30}, {name = p .. "natural", max = 20},
{name = p.."black", max = 30},
{name = p.."blue", max = 30},
{name = p.."brown", max = 30},
{name = p.."cyan", max = 30},
{name = p.."dark_green", max = 30},
{name = p.."dark_grey", max = 30},
{name = p.."green", max = 30},
{name = p.."grey", max = 30},
{name = p.."magenta", max = 30},
{name = p.."orange", max = 30},
{name = p.."pink", max = 30},
{name = p.."red", max = 30},
{name = p.."violet", max = 30},
{name = p.."white", max = 30},
{name = p.."yellow", max = 30}
}}
})
p = "bakedclay:terracotta_"
lucky_block:add_blocks({
{"nod", "default:chest", 0, {
{name = p .. "black", max = 20}, {name = p .. "black", max = 20},
{name = p .. "blue", max = 20}, {name = p .. "blue", max = 20},
{name = p .. "brown", max = 20}, {name = p .. "brown", max = 20},
@ -60,5 +44,22 @@ lucky_block:add_blocks({
{name = p .. "violet", max = 20}, {name = p .. "violet", max = 20},
{name = p .. "white", max = 20}, {name = p .. "white", max = 20},
{name = p .. "yellow", max = 20} {name = p .. "yellow", max = 20}
}},
{"nod", "default:chest", 0, {
{name = p2 .. "black", max = 20},
{name = p2 .. "blue", max = 20},
{name = p2 .. "brown", max = 20},
{name = p2 .. "cyan", max = 20},
{name = p2 .. "dark_green", max = 20},
{name = p2 .. "dark_grey", max = 20},
{name = p2 .. "green", max = 20},
{name = p2 .. "grey", max = 20},
{name = p2 .. "magenta", max = 20},
{name = p2 .. "orange", max = 20},
{name = p2 .. "pink", max = 20},
{name = p2 .. "red", max = 20},
{name = p2 .. "violet", max = 20},
{name = p2 .. "white", max = 20},
{name = p2 .. "yellow", max = 20}
}} }}
}) })