More cleanup/tweaking

This commit is contained in:
kilbith 2015-04-30 11:48:15 +02:00 committed by Vanessa Ezekowitz
parent 3eb9d192d0
commit add43c9529
4 changed files with 49 additions and 44 deletions

View File

@ -1,8 +1,16 @@
local S = homedecor.gettext
local toilet_sbox = {
type = "fixed",
fixed = { -6/16, -8/16, -8/16, 6/16, 9/16, 8/16 },
}
local toilet_cbox = {
type = "fixed",
fixed = { -6/16, -8/16, -8/16, 6/16, 9/16, 8/16 }
fixed = {
{-6/16, -8/16, -8/16, 6/16, 1/16, 8/16 },
{-6/16, -8/16, 4/16, 6/16, 9/16, 8/16 }
}
}
homedecor.register("toilet", {
@ -14,14 +22,14 @@ homedecor.register("toilet", {
"homedecor_marble_light.png",
"homedecor_generic_metal_neutral.png"
},
selection_box = toilet_cbox,
collision_box = toilet_cbox,
groups = {cracky=3,},
selection_box = toilet_sbox,
node_box = toilet_cbox,
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
on_punch = function (pos, node, puncher)
node.name = "homedecor:toilet_open"
minetest.set_node(pos, node)
end,
end
})
homedecor.register("toilet_open", {
@ -33,11 +41,10 @@ homedecor.register("toilet_open", {
"default_water.png",
"homedecor_generic_metal_neutral.png"
},
selection_box = toilet_cbox,
selection_box = toilet_sbox,
collision_box = toilet_cbox,
drop = "homedecor:toilet",
groups = {cracky = 3,},
--sounds = {dig = "3dforniture_dig_toilet", gain=0.5},
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
on_punch = function (pos, node, puncher)
node.name = "homedecor:toilet"
@ -47,7 +54,7 @@ homedecor.register("toilet_open", {
max_hear_distance = 5,
gain = 1,
})
end,
end
})
-- toilet paper :-)
@ -67,7 +74,7 @@ homedecor.register("toilet_paper", {
inventory_image = "homedecor_toilet_paper_inv.png",
selection_box = tp_cbox,
walkable = false,
groups = {snappy=2,oddly_breakable_by_hand=3,flammable=3},
groups = {snappy=3,oddly_breakable_by_hand=3},
sounds = default.node_sound_defaults(),
})
@ -89,7 +96,7 @@ homedecor.register("sink", {
inventory_image="homedecor_bathroom_sink_inv.png",
selection_box = sink_cbox,
collision_box = sink_cbox,
groups = {cracky=2,},
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})
@ -106,13 +113,12 @@ homedecor.register("taps", {
},
inventory_image = "3dforniture_taps_inv.png",
wield_image = "3dforniture_taps_inv.png",
sunlight_propagates = true,
selection_box = {
type = "fixed",
fixed = { -4/16, -7/16, 4/16, 4/16, -4/16, 8/16 },
},
walkable = false,
groups = {cracky=2},
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})
@ -132,7 +138,7 @@ homedecor.register("taps_brass", {
fixed = { -4/16, -7/16, 4/16, 4/16, -4/16, 8/16 },
},
walkable = false,
groups = {cracky=2},
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})
@ -147,11 +153,11 @@ homedecor.register("shower_tray", {
node_box = {
type = "fixed",
fixed = {
{ -0.50, -0.50, -0.50, 0.50, -0.45, 0.50, },
{ -0.50, -0.45, -0.50, 0.50, -0.40, -0.45, },
{ -0.50, -0.45, 0.45, 0.50, -0.40, 0.50, },
{ -0.50, -0.45, -0.45, -0.45, -0.40, 0.45, },
{ 0.45, -0.45, -0.45, 0.50, -0.40, 0.45, },
{ -0.5, -0.5, -0.5, 0.5, -0.45, 0.5 },
{ -0.5, -0.45, -0.5, 0.5, -0.4, -0.45 },
{ -0.5, -0.45, 0.45, 0.5, -0.4, 0.5 },
{ -0.5, -0.45, -0.45, -0.45, -0.4, 0.45 },
{ 0.45, -0.45, -0.45, 0.5, -0.4, 0.45 }
},
},
selection_box = {

View File

@ -607,7 +607,12 @@ homedecor.register("calendar", {
on_construct = function(pos)
local meta = minetest.get_meta(pos)
local date = os.date("%Y-%m-%d") -- ISO 8601 format
meta:set_string("infotext", "Date: "..date)
meta:set_string("infotext", "Date (right-click to update):\n"..date)
end,
on_rightclick = function(pos, node, clicker)
local meta = minetest.get_meta(pos)
local date = os.date("%Y-%m-%d")
meta:set_string("infotext", "Date (right-click to update):\n"..date)
end
})

View File

@ -44,7 +44,8 @@ homedecor.register_outer_corner = function(modname, subname, groups, slope_image
selection_box = ocorner_cbox,
collision_box = ocorner_cbox,
groups = groups,
on_place = minetest.rotate_node
on_place = minetest.rotate_node,
sounds = default.node_sound_wood_defaults()
})
end
@ -58,7 +59,8 @@ homedecor.register_inner_corner = function(modname, subname, groups, slope_image
paramtype2 = "facedir",
collision_box = icorner_cbox,
groups = groups,
on_place = minetest.rotate_node
on_place = minetest.rotate_node,
sounds = default.node_sound_wood_defaults()
})
end
@ -73,7 +75,8 @@ homedecor.register_slope = function(modname, subname, recipeitem, groups, slope_
selection_box = slope_cbox,
collision_box = slope_cbox,
groups = groups,
on_place = minetest.rotate_node
on_place = minetest.rotate_node,
sounds = default.node_sound_wood_defaults()
})
-- convert between flat shingles and slopes

View File

@ -1,4 +1,3 @@
local S = homedecor.gettext
homedecor.register("window_quartered", {
@ -24,14 +23,12 @@ homedecor.register("window_quartered", {
{0.4375, -0.5, -0.0625, 0.5, 0.5, 0.0625}, -- NodeBox5
{-0.5, -0.5, -0.0625, -0.4375, 0.5, 0.0625}, -- NodeBox6
{-0.0625, -0.5, -0.025, 0.0625, 0.5, 0.025}, -- NodeBox7
},
},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.0625, 0.5, 0.5, 0.0625}
},
},
fixed = {-0.5, -0.5, -0.0625, 0.5, 0.5, 0.0625}
}
})
homedecor.register("window_plain", {
@ -55,14 +52,12 @@ homedecor.register("window_plain", {
{-0.5, -0.5, -0.0625, 0.5, -0.4375, 0.0625}, -- NodeBox3
{0.4375, -0.5, -0.0625, 0.5, 0.5, 0.0625}, -- NodeBox4
{-0.5, -0.5, -0.0625, -0.4375, 0.5, 0.0625}, -- NodeBox5
},
},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.0625, 0.5, 0.5, 0.0625}
},
},
fixed = {-0.5, -0.5, -0.0625, 0.5, 0.5, 0.0625}
}
})
local wb1_cbox = {
@ -81,7 +76,7 @@ homedecor.register("blinds_thick", {
walkable = false,
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
selection_box = wb1_cbox,
selection_box = wb1_cbox
})
local wb2_cbox = {
@ -100,7 +95,7 @@ homedecor.register("blinds_thin", {
walkable = false,
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
selection_box = wb2_cbox,
selection_box = wb2_cbox
})
local curtaincolors = {
@ -127,9 +122,7 @@ for c in ipairs(curtaincolors) do
groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(),
paramtype2 = 'wallmounted',
selection_box = {
type = "wallmounted",
},
selection_box = { type = "wallmounted" },
-- Open the curtains
on_rightclick = function(pos, node, clicker, itemstack)
local topnode = minetest.get_node({x=pos.x, y=pos.y+1.0, z=pos.z})
@ -151,9 +144,7 @@ for c in ipairs(curtaincolors) do
groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(),
paramtype2 = 'wallmounted',
selection_box = {
type = "wallmounted",
},
selection_box = { type = "wallmounted" },
-- Close the curtains
on_rightclick = function(pos, node, clicker, itemstack)
local topnode = minetest.get_node({x=pos.x, y=pos.y+1.0, z=pos.z})