Added a grandfather clock

This commit is contained in:
kilbith 2014-09-10 18:00:51 +02:00 committed by Vanessa Ezekowitz
parent f2440f3ca4
commit 8c68ad9662
6 changed files with 79 additions and 1 deletions

View File

@ -2652,3 +2652,13 @@ minetest.register_craft({
},
})
minetest.register_craft({
output = "homedecor:grandfather_clock_bottom",
recipe = {
{ "building_blocks:slab_hardwood","homedecor:analog_clock_wood","building_blocks:slab_hardwood" },
{ "building_blocks:slab_hardwood","technic:brass_ingot","building_blocks:slab_hardwood" },
{ "building_blocks:slab_hardwood","technic:brass_ingot","building_blocks:slab_hardwood" }
},
})

View File

@ -730,7 +730,7 @@ minetest.register_node("homedecor:wall_shelf", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = { snappy = 3 },
groups = { snappy = 3 },
node_box = {
type = "fixed",
fixed = {
@ -740,6 +740,74 @@ minetest.register_node("homedecor:wall_shelf", {
}
})
minetest.register_node("homedecor:grandfather_clock_bottom", {
description = "Grandfather Clock",
tiles = {
"homedecor_grandfather_clock_sides.png",
"homedecor_grandfather_clock_sides.png",
"homedecor_grandfather_clock_sides.png",
"homedecor_grandfather_clock_sides.png",
"homedecor_grandfather_clock_sides.png",
"homedecor_grandfather_clock_bottom.png"
},
inventory_image = "homedecor_grandfather_clock_inv.png",
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = { snappy = 3 },
node_box = {
type = "fixed",
fixed = {
{-0.4, -0.5, -0.4, -0.3125, 0.5, 0.4}, -- NodeBox1
{-0.3125, -0.4375, -0.3125, 0.3125, 0.5, 0.4}, -- NodeBox2
{0.3125, -0.5, -0.4, 0.4, 0.5, 0.4}, -- NodeBox3
{-0.3125, -0.5, -0.4, 0.3125, -0.405, 0.4}, -- NodeBox4
}
},
selection_box = {
type = "fixed",
fixed = { -0.4, -0.5, -0.4, 0.4, 1.5, 0.4 }
},
on_place = function(itemstack, placer, pointed_thing)
return homedecor.stack_vertically(itemstack, placer, pointed_thing,
"homedecor:grandfather_clock_bottom", "homedecor:grandfather_clock_top")
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
local pos2 = { x = pos.x, y=pos.y + 1, z = pos.z }
if minetest.get_node(pos2).name == "homedecor:grandfather_clock_top" then
minetest.remove_node(pos2)
end
end,
})
minetest.register_node("homedecor:grandfather_clock_top", {
tiles = {
"homedecor_grandfather_clock_sides.png",
"homedecor_grandfather_clock_sides.png",
"homedecor_grandfather_clock_sides.png",
"homedecor_grandfather_clock_sides.png",
"homedecor_grandfather_clock_sides.png",
"homedecor_grandfather_clock_top.png"
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = { snappy = 3, not_in_creative_inventory=1 },
node_box = {
type = "fixed",
fixed = {
{-0.4, -0.5, -0.4, -0.3125, 0.5, 0.4}, -- NodeBox1
{-0.3125, -0.1875, -0.4, 0.3125, 0.5, 0.4}, -- NodeBox2
{0.3125, -0.5, -0.4, 0.4, 0.5, 0.4}, -- NodeBox3
{-0.3125, -0.5, -0.3125, 0.3125, 0.5, 0.4}, -- NodeBox4
}
},
selection_box = {
type = "fixed",
fixed = { 0, 0, 0, 0, 0, 0 }
},
})
-- Aliases for 3dforniture mod.
minetest.register_alias("3dforniture:table", "homedecor:table")

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 957 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB