mirror of
https://github.com/minetest/minetest_game.git
synced 2024-12-22 22:22:25 +01:00
Add different woods to mese posts (#2599)
This commit is contained in:
parent
0a96bac46d
commit
686fdb5c06
@ -300,15 +300,6 @@ minetest.register_craft({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "default:mese_post_light 3",
|
|
||||||
recipe = {
|
|
||||||
{"", "default:glass", ""},
|
|
||||||
{"default:mese_crystal", "default:mese_crystal", "default:mese_crystal"},
|
|
||||||
{"", "group:wood", ""},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "default:obsidian",
|
output = "default:obsidian",
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -421,6 +421,51 @@ function default.register_fence_rail(name, def)
|
|||||||
minetest.register_node(name, def)
|
minetest.register_node(name, def)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Mese post registration helper
|
||||||
|
--
|
||||||
|
|
||||||
|
function default.register_mesepost(name, def)
|
||||||
|
minetest.register_craft({
|
||||||
|
output = name .. " 4",
|
||||||
|
recipe = {
|
||||||
|
{'', 'default:glass', ''},
|
||||||
|
{'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
|
||||||
|
{' ', def.material, ''},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
local post_texture = def.texture .. "^default_mese_post_light_side.png^[makealpha:0,0,0"
|
||||||
|
local post_texture_dark = def.texture .. "^default_mese_post_light_side_dark.png^[makealpha:0,0,0"
|
||||||
|
-- Allow almost everything to be overridden
|
||||||
|
local default_fields = {
|
||||||
|
wield_image = post_texture,
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-2 / 16, -8 / 16, -2 / 16, 2 / 16, 8 / 16, 2 / 16},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
paramtype = "light",
|
||||||
|
tiles = {def.texture, def.texture, post_texture_dark, post_texture_dark, post_texture, post_texture},
|
||||||
|
light_source = default.LIGHT_MAX,
|
||||||
|
sunlight_propagates = true,
|
||||||
|
is_ground_content = false,
|
||||||
|
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
}
|
||||||
|
for k, v in pairs(default_fields) do
|
||||||
|
if def[k] == nil then
|
||||||
|
def[k] = v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def.texture = nil
|
||||||
|
def.material = nil
|
||||||
|
|
||||||
|
minetest.register_node(name, def)
|
||||||
|
end
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Leafdecay
|
-- Leafdecay
|
||||||
|
@ -221,6 +221,10 @@ default:brick
|
|||||||
|
|
||||||
default:meselamp
|
default:meselamp
|
||||||
default:mese_post_light
|
default:mese_post_light
|
||||||
|
default:mese_post_light_acacia_wood
|
||||||
|
default:mese_post_light_junglewood
|
||||||
|
default:mese_post_light_pine_wood
|
||||||
|
default:mese_post_light_aspen_wood
|
||||||
|
|
||||||
Misc
|
Misc
|
||||||
----
|
----
|
||||||
@ -2836,25 +2840,34 @@ minetest.register_node("default:meselamp", {
|
|||||||
light_source = default.LIGHT_MAX,
|
light_source = default.LIGHT_MAX,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("default:mese_post_light", {
|
default.register_mesepost("default:mese_post_light", {
|
||||||
description = S("Mese Post Light"),
|
description = S("Apple Wood Mese Post Light"),
|
||||||
tiles = {"default_mese_post_light_top.png", "default_mese_post_light_top.png",
|
texture = "default_fence_wood.png",
|
||||||
"default_mese_post_light_side_dark.png", "default_mese_post_light_side_dark.png",
|
material = "default:wood",
|
||||||
"default_mese_post_light_side.png", "default_mese_post_light_side.png"},
|
})
|
||||||
wield_image = "default_mese_post_light_side.png",
|
|
||||||
drawtype = "nodebox",
|
default.register_mesepost("default:mese_post_light_acacia", {
|
||||||
node_box = {
|
description = S("Acacia Wood Mese Post Light"),
|
||||||
type = "fixed",
|
texture = "default_fence_acacia_wood.png",
|
||||||
fixed = {
|
material = "default:acacia_wood",
|
||||||
{-2 / 16, -8 / 16, -2 / 16, 2 / 16, 8 / 16, 2 / 16},
|
})
|
||||||
},
|
|
||||||
},
|
default.register_mesepost("default:mese_post_light_junglewood", {
|
||||||
paramtype = "light",
|
description = S("Jungle Wood Mese Post Light"),
|
||||||
light_source = default.LIGHT_MAX,
|
texture = "default_fence_junglewood.png",
|
||||||
sunlight_propagates = true,
|
material = "default:junglewood",
|
||||||
is_ground_content = false,
|
})
|
||||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
|
||||||
sounds = default.node_sound_wood_defaults(),
|
default.register_mesepost("default:mese_post_light_pine_wood", {
|
||||||
|
description = S("Pine Wood Mese Post Light"),
|
||||||
|
texture = "default_fence_pine_wood.png",
|
||||||
|
material = "default:pine_wood",
|
||||||
|
})
|
||||||
|
|
||||||
|
default.register_mesepost("default:mese_post_light_aspen_wood", {
|
||||||
|
description = S("Aspen Wood Mese Post Light"),
|
||||||
|
texture = "default_fence_aspen_wood.png",
|
||||||
|
material = "default:aspen_wood",
|
||||||
})
|
})
|
||||||
|
|
||||||
--
|
--
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 353 B After Width: | Height: | Size: 294 B |
Binary file not shown.
Before Width: | Height: | Size: 353 B After Width: | Height: | Size: 301 B |
Binary file not shown.
Before Width: | Height: | Size: 128 B |
Loading…
Reference in New Issue
Block a user