2017-01-30 00:12:02 +01:00
|
|
|
|
2019-04-20 21:49:36 +02:00
|
|
|
local S = homedecor_i18n.gettext
|
|
|
|
|
|
|
|
minetest.register_node(":homedecor:bathroom_tiles_dark", {
|
|
|
|
description = S("Bathroom/kitchen tiles (dark)"),
|
|
|
|
tiles = {
|
|
|
|
"homedecor_bathroom_tiles_bg.png"
|
|
|
|
},
|
|
|
|
overlay_tiles = {
|
|
|
|
{ name = "homedecor_bathroom_tiles_fg.png", color = 0xff606060 },
|
|
|
|
},
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "color",
|
|
|
|
palette = "unifieddyes_palette_extended.png",
|
|
|
|
groups = {cracky=3, ud_param2_colorable = 1},
|
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
on_construct = unifieddyes.on_construct,
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node(":homedecor:bathroom_tiles_medium", {
|
|
|
|
description = S("Bathroom/kitchen tiles (medium)"),
|
|
|
|
tiles = {
|
|
|
|
"homedecor_bathroom_tiles_bg.png"
|
|
|
|
},
|
|
|
|
overlay_tiles = {
|
|
|
|
{ name = "homedecor_bathroom_tiles_fg.png", color = 0xffc0c0c0 },
|
|
|
|
},
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "color",
|
|
|
|
palette = "unifieddyes_palette_extended.png",
|
|
|
|
groups = {cracky=3, ud_param2_colorable = 1},
|
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
on_construct = unifieddyes.on_construct,
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node(":homedecor:bathroom_tiles_light", {
|
|
|
|
description = S("Bathroom/kitchen tiles (light)"),
|
|
|
|
tiles = {
|
|
|
|
"homedecor_bathroom_tiles_bg.png"
|
|
|
|
},
|
|
|
|
overlay_tiles = {
|
|
|
|
{ name = "homedecor_bathroom_tiles_fg.png", color = 0xffffffff },
|
|
|
|
},
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "color",
|
|
|
|
palette = "unifieddyes_palette_extended.png",
|
|
|
|
groups = {cracky=3, ud_param2_colorable = 1},
|
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
on_construct = unifieddyes.on_construct,
|
|
|
|
})
|
|
|
|
|
|
|
|
local tr_cbox = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.375, -0.3125, 0.25, 0.375, 0.375, 0.5 }
|
|
|
|
}
|
|
|
|
|
|
|
|
homedecor.register("towel_rod", {
|
|
|
|
description = S("Towel rod with towel"),
|
|
|
|
mesh = "homedecor_towel_rod.obj",
|
|
|
|
tiles = {
|
|
|
|
"homedecor_generic_terrycloth.png",
|
|
|
|
"default_wood.png",
|
|
|
|
},
|
|
|
|
inventory_image = "homedecor_towel_rod_inv.png",
|
|
|
|
selection_box = tr_cbox,
|
|
|
|
walkable = false,
|
|
|
|
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3},
|
|
|
|
sounds = default.node_sound_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
homedecor.register("medicine_cabinet", {
|
|
|
|
description = S("Medicine cabinet"),
|
|
|
|
mesh = "homedecor_medicine_cabinet.obj",
|
|
|
|
tiles = {
|
|
|
|
'default_wood.png',
|
|
|
|
'homedecor_medicine_cabinet_mirror.png'
|
|
|
|
},
|
|
|
|
inventory_image = "homedecor_medicine_cabinet_inv.png",
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.3125, -0.1875, 0.3125, 0.3125, 0.5, 0.5}
|
|
|
|
},
|
|
|
|
walkable = false,
|
|
|
|
groups = { snappy = 3 },
|
|
|
|
sounds = default.node_sound_wood_defaults(),
|
|
|
|
on_punch = function(pos, node, puncher, pointed_thing)
|
|
|
|
node.name = "homedecor:medicine_cabinet_open"
|
|
|
|
minetest.swap_node(pos, node)
|
|
|
|
end,
|
|
|
|
infotext=S("Medicine cabinet"),
|
|
|
|
inventory = {
|
|
|
|
size=6,
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
homedecor.register("medicine_cabinet_open", {
|
|
|
|
mesh = "homedecor_medicine_cabinet_open.obj",
|
|
|
|
tiles = {
|
|
|
|
'default_wood.png',
|
|
|
|
'homedecor_medicine_cabinet_mirror.png',
|
|
|
|
'homedecor_medicine_cabinet_inside.png'
|
|
|
|
},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.3125, -0.1875, -0.25, 0.3125, 0.5, 0.5}
|
|
|
|
},
|
|
|
|
walkable = false,
|
|
|
|
groups = { snappy = 3, not_in_creative_inventory=1 },
|
|
|
|
drop = "homedecor:medicine_cabinet",
|
|
|
|
on_punch = function(pos, node, puncher, pointed_thing)
|
|
|
|
node.name = "homedecor:medicine_cabinet"
|
|
|
|
minetest.swap_node(pos, node)
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
-- "Sanitation" related
|
|
|
|
|
|
|
|
|
2017-01-30 00:12:02 +01:00
|
|
|
local S = homedecor_i18n.gettext
|
2013-10-22 02:50:45 +02:00
|
|
|
|
2015-04-30 11:48:15 +02:00
|
|
|
local toilet_sbox = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -6/16, -8/16, -8/16, 6/16, 9/16, 8/16 },
|
|
|
|
}
|
|
|
|
|
2015-04-18 10:22:12 +02:00
|
|
|
local toilet_cbox = {
|
|
|
|
type = "fixed",
|
2016-12-15 22:23:31 +01:00
|
|
|
fixed = {
|
2015-04-30 11:48:15 +02:00
|
|
|
{-6/16, -8/16, -8/16, 6/16, 1/16, 8/16 },
|
|
|
|
{-6/16, -8/16, 4/16, 6/16, 9/16, 8/16 }
|
|
|
|
}
|
2015-04-18 10:22:12 +02:00
|
|
|
}
|
|
|
|
|
2015-01-24 00:34:02 +01:00
|
|
|
homedecor.register("toilet", {
|
2015-01-23 22:14:00 +01:00
|
|
|
description = S("Toilet"),
|
2015-04-18 10:22:12 +02:00
|
|
|
mesh = "homedecor_toilet_closed.obj",
|
|
|
|
tiles = {
|
2019-04-20 21:49:36 +02:00
|
|
|
"building_blocks_marble.png",
|
|
|
|
"building_blocks_marble.png",
|
|
|
|
"building_blocks_marble.png",
|
2017-01-25 10:22:28 +01:00
|
|
|
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey }
|
2015-01-23 22:14:00 +01:00
|
|
|
},
|
2015-04-30 11:48:15 +02:00
|
|
|
selection_box = toilet_sbox,
|
|
|
|
node_box = toilet_cbox,
|
|
|
|
groups = {cracky=3},
|
2015-01-23 22:14:00 +01:00
|
|
|
sounds = default.node_sound_stone_defaults(),
|
2017-02-21 00:30:59 +01:00
|
|
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
2015-01-23 22:14:00 +01:00
|
|
|
node.name = "homedecor:toilet_open"
|
|
|
|
minetest.set_node(pos, node)
|
2015-04-30 11:48:15 +02:00
|
|
|
end
|
2013-03-26 12:05:22 +01:00
|
|
|
})
|
|
|
|
|
2015-01-24 00:34:02 +01:00
|
|
|
homedecor.register("toilet_open", {
|
2015-04-18 10:22:12 +02:00
|
|
|
mesh = "homedecor_toilet_open.obj",
|
2015-01-23 22:14:00 +01:00
|
|
|
tiles = {
|
2019-04-20 21:49:36 +02:00
|
|
|
"building_blocks_marble.png",
|
|
|
|
"building_blocks_marble.png",
|
|
|
|
"building_blocks_marble.png",
|
2015-04-18 10:22:12 +02:00
|
|
|
"default_water.png",
|
2017-01-25 10:22:28 +01:00
|
|
|
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey }
|
2015-01-23 22:14:00 +01:00
|
|
|
},
|
2015-04-30 11:48:15 +02:00
|
|
|
selection_box = toilet_sbox,
|
2015-04-18 10:22:12 +02:00
|
|
|
collision_box = toilet_cbox,
|
2015-01-23 22:14:00 +01:00
|
|
|
drop = "homedecor:toilet",
|
2015-04-30 11:48:15 +02:00
|
|
|
groups = {cracky=3},
|
2015-01-23 22:14:00 +01:00
|
|
|
sounds = default.node_sound_stone_defaults(),
|
2017-02-21 00:30:59 +01:00
|
|
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
2015-01-23 22:14:00 +01:00
|
|
|
node.name = "homedecor:toilet"
|
|
|
|
minetest.set_node(pos, node)
|
2014-06-18 12:10:26 +02:00
|
|
|
minetest.sound_play("homedecor_toilet_flush", {
|
|
|
|
pos=pos,
|
|
|
|
max_hear_distance = 5,
|
|
|
|
gain = 1,
|
|
|
|
})
|
2015-04-30 11:48:15 +02:00
|
|
|
end
|
2013-03-26 12:05:22 +01:00
|
|
|
})
|
|
|
|
|
2015-04-26 23:57:45 +02:00
|
|
|
-- toilet paper :-)
|
|
|
|
|
|
|
|
local tp_cbox = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.25, 0.125, 0.0625, 0.1875, 0.4375, 0.5 }
|
|
|
|
}
|
|
|
|
|
|
|
|
homedecor.register("toilet_paper", {
|
|
|
|
description = S("Toilet paper"),
|
|
|
|
mesh = "homedecor_toilet_paper.obj",
|
|
|
|
tiles = {
|
|
|
|
"homedecor_generic_quilted_paper.png",
|
|
|
|
"default_wood.png"
|
|
|
|
},
|
|
|
|
inventory_image = "homedecor_toilet_paper_inv.png",
|
|
|
|
selection_box = tp_cbox,
|
2015-04-29 14:14:36 +02:00
|
|
|
walkable = false,
|
2015-04-30 11:48:15 +02:00
|
|
|
groups = {snappy=3,oddly_breakable_by_hand=3},
|
2015-04-26 23:57:45 +02:00
|
|
|
sounds = default.node_sound_defaults(),
|
|
|
|
})
|
|
|
|
|
2013-03-26 12:05:22 +01:00
|
|
|
--Sink
|
2015-04-17 18:45:14 +02:00
|
|
|
|
2019-03-24 18:38:27 +01:00
|
|
|
local sink_sbox = {
|
2015-04-17 18:45:14 +02:00
|
|
|
type = "fixed",
|
|
|
|
fixed = { -5/16, -8/16, 1/16, 5/16, 8/16, 8/16 }
|
|
|
|
}
|
|
|
|
|
2019-03-24 18:38:27 +01:00
|
|
|
local sink_cbox = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{ -5/16, 5/16, 1/16, -4/16, 8/16, 8/16 },
|
|
|
|
{ 5/16, 5/16, 1/16, 4/16, 8/16, 8/16 },
|
|
|
|
{ -5/16, 5/16, 1/16, 5/16, 8/16, 2/16 },
|
|
|
|
{ -5/16, 5/16, 6/16, 5/16, 8/16, 8/16 },
|
|
|
|
{ -4/16, -8/16, 1/16, 4/16, 5/16, 6/16 }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-01-24 00:34:02 +01:00
|
|
|
homedecor.register("sink", {
|
2015-04-17 18:45:14 +02:00
|
|
|
description = S("Bathroom Sink"),
|
|
|
|
mesh = "homedecor_bathroom_sink.obj",
|
2015-01-23 22:14:00 +01:00
|
|
|
tiles = {
|
2019-04-20 21:49:36 +02:00
|
|
|
"building_blocks_marble.png",
|
|
|
|
"building_blocks_marble.png",
|
2015-04-17 18:45:14 +02:00
|
|
|
"default_water.png"
|
2015-01-23 22:14:00 +01:00
|
|
|
},
|
2015-04-17 18:45:14 +02:00
|
|
|
inventory_image="homedecor_bathroom_sink_inv.png",
|
2019-03-24 18:38:27 +01:00
|
|
|
selection_box = sink_sbox,
|
|
|
|
collision_box = sink_cbox,
|
2015-04-30 11:48:15 +02:00
|
|
|
groups = {cracky=3},
|
2015-01-23 22:14:00 +01:00
|
|
|
sounds = default.node_sound_stone_defaults(),
|
2015-05-11 04:08:34 +02:00
|
|
|
on_destruct = function(pos)
|
|
|
|
homedecor.stop_particle_spawner({x=pos.x, y=pos.y+1, z=pos.z})
|
|
|
|
end
|
2013-03-26 12:05:22 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
--Taps
|
2015-04-27 22:48:32 +02:00
|
|
|
|
2016-07-31 01:17:23 +02:00
|
|
|
local function taps_on_rightclick(pos, node, clicker, itemstack, pointed_thing)
|
2015-05-11 04:08:34 +02:00
|
|
|
local below = minetest.get_node_or_nil({x=pos.x, y=pos.y-1, z=pos.z})
|
|
|
|
if below and
|
2015-05-11 04:30:53 +02:00
|
|
|
below.name == "homedecor:shower_tray" or
|
|
|
|
below.name == "homedecor:sink" or
|
2017-01-07 08:48:16 +01:00
|
|
|
below.name == "homedecor:kitchen_cabinet_with_sink" or
|
|
|
|
below.name == "homedecor:kitchen_cabinet_with_sink_locked" then
|
2015-05-11 04:08:34 +02:00
|
|
|
local particledef = {
|
2015-05-11 04:34:30 +02:00
|
|
|
outlet = { x = 0, y = -0.44, z = 0.28 },
|
2015-05-11 04:08:34 +02:00
|
|
|
velocity_x = { min = -0.1, max = 0.1 },
|
|
|
|
velocity_y = -0.3,
|
|
|
|
velocity_z = { min = -0.1, max = 0 },
|
2019-03-24 18:38:27 +01:00
|
|
|
spread = 0,
|
|
|
|
die_on_collision = true,
|
2015-05-11 04:08:34 +02:00
|
|
|
}
|
2015-05-11 09:56:44 +02:00
|
|
|
homedecor.start_particle_spawner(pos, node, particledef, "homedecor_faucet")
|
2015-05-11 04:08:34 +02:00
|
|
|
end
|
2016-07-31 01:17:23 +02:00
|
|
|
return itemstack
|
2015-05-11 04:08:34 +02:00
|
|
|
end
|
|
|
|
|
2015-01-24 00:34:02 +01:00
|
|
|
homedecor.register("taps", {
|
2015-04-27 22:42:20 +02:00
|
|
|
description = S("Bathroom taps/faucet"),
|
|
|
|
mesh = "homedecor_bathroom_faucet.obj",
|
|
|
|
tiles = {
|
2017-01-25 10:22:28 +01:00
|
|
|
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
|
2015-04-28 05:48:02 +02:00
|
|
|
"homedecor_generic_metal_bright.png",
|
2017-01-25 10:22:28 +01:00
|
|
|
"homedecor_generic_metal.png",
|
2015-04-28 05:48:02 +02:00
|
|
|
"homedecor_generic_metal_bright.png"
|
2015-04-27 22:42:20 +02:00
|
|
|
},
|
2015-04-27 22:58:45 +02:00
|
|
|
inventory_image = "3dforniture_taps_inv.png",
|
|
|
|
wield_image = "3dforniture_taps_inv.png",
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -4/16, -7/16, 4/16, 4/16, -4/16, 8/16 },
|
|
|
|
},
|
|
|
|
walkable = false,
|
2015-04-30 11:48:15 +02:00
|
|
|
groups = {cracky=3},
|
2015-04-27 22:58:45 +02:00
|
|
|
sounds = default.node_sound_stone_defaults(),
|
2015-05-11 04:08:34 +02:00
|
|
|
on_rightclick = taps_on_rightclick,
|
2015-05-14 12:25:11 +02:00
|
|
|
on_destruct = homedecor.stop_particle_spawner,
|
|
|
|
on_rotate = screwdriver.disallow
|
2015-04-27 22:58:45 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
homedecor.register("taps_brass", {
|
|
|
|
description = S("Bathroom taps/faucet (brass)"),
|
|
|
|
mesh = "homedecor_bathroom_faucet.obj",
|
|
|
|
tiles = {
|
2015-04-28 05:48:02 +02:00
|
|
|
"homedecor_generic_metal_brass.png",
|
|
|
|
"homedecor_generic_metal_brass.png",
|
2017-01-25 10:22:28 +01:00
|
|
|
"homedecor_generic_metal.png",
|
2015-04-28 05:48:02 +02:00
|
|
|
"homedecor_generic_metal_brass.png"
|
2015-04-27 22:58:45 +02:00
|
|
|
},
|
|
|
|
inventory_image = "3dforniture_taps_brass_inv.png",
|
|
|
|
wield_image = "3dforniture_taps_brass_inv.png",
|
2015-01-23 22:14:00 +01:00
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
2015-04-27 22:42:20 +02:00
|
|
|
fixed = { -4/16, -7/16, 4/16, 4/16, -4/16, 8/16 },
|
2015-01-23 22:14:00 +01:00
|
|
|
},
|
2015-04-27 22:48:32 +02:00
|
|
|
walkable = false,
|
2015-04-30 11:48:15 +02:00
|
|
|
groups = {cracky=3},
|
2015-01-23 22:14:00 +01:00
|
|
|
sounds = default.node_sound_stone_defaults(),
|
2015-05-11 04:08:34 +02:00
|
|
|
on_rightclick = taps_on_rightclick,
|
2015-05-14 12:25:11 +02:00
|
|
|
on_destruct = homedecor.stop_particle_spawner,
|
|
|
|
on_rotate = screwdriver.disallow
|
2013-03-26 12:05:22 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
--Shower Tray
|
2015-04-27 22:58:45 +02:00
|
|
|
|
2015-01-24 00:34:02 +01:00
|
|
|
homedecor.register("shower_tray", {
|
2015-01-23 22:14:00 +01:00
|
|
|
description = S("Shower Tray"),
|
|
|
|
tiles = {
|
2014-06-18 12:53:07 +02:00
|
|
|
"forniture_marble_base_ducha_top.png",
|
2019-04-20 21:49:36 +02:00
|
|
|
"building_blocks_marble.png"
|
2015-01-23 22:14:00 +01:00
|
|
|
},
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
2015-04-30 11:48:15 +02:00
|
|
|
{ -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 }
|
2015-01-23 22:14:00 +01:00
|
|
|
},
|
|
|
|
},
|
2015-08-19 15:49:32 +02:00
|
|
|
selection_box = homedecor.nodebox.slab_y(0.1),
|
2015-03-28 16:22:47 +01:00
|
|
|
groups = {cracky=2},
|
2015-01-23 22:14:00 +01:00
|
|
|
sounds = default.node_sound_stone_defaults(),
|
2015-04-28 11:56:38 +02:00
|
|
|
on_destruct = function(pos)
|
2015-05-11 04:08:34 +02:00
|
|
|
homedecor.stop_particle_spawner({x=pos.x, y=pos.y+2, z=pos.z}) -- the showerhead
|
|
|
|
homedecor.stop_particle_spawner({x=pos.x, y=pos.y+1, z=pos.z}) -- the taps, if any
|
2015-04-28 11:56:38 +02:00
|
|
|
end
|
2013-03-26 12:05:22 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
--Shower Head
|
2015-04-28 07:32:24 +02:00
|
|
|
|
2015-04-28 11:56:38 +02:00
|
|
|
|
2015-03-28 16:22:47 +01:00
|
|
|
local sh_cbox = {
|
|
|
|
type = "fixed",
|
2015-03-29 13:13:17 +02:00
|
|
|
fixed = { -0.2, -0.4, -0.05, 0.2, 0.1, 0.5 }
|
2015-03-28 16:22:47 +01:00
|
|
|
}
|
|
|
|
|
2015-01-24 00:34:02 +01:00
|
|
|
homedecor.register("shower_head", {
|
2015-03-28 16:22:47 +01:00
|
|
|
drawtype = "mesh",
|
|
|
|
mesh = "homedecor_shower_head.obj",
|
2015-04-28 07:32:24 +02:00
|
|
|
tiles = {
|
2017-01-25 10:22:28 +01:00
|
|
|
"homedecor_generic_metal.png",
|
2015-04-28 07:32:24 +02:00
|
|
|
"homedecor_shower_head.png"
|
|
|
|
},
|
2015-03-28 16:22:47 +01:00
|
|
|
inventory_image = "homedecor_shower_head_inv.png",
|
2017-01-24 21:43:20 +01:00
|
|
|
description = S("Shower Head"),
|
2015-03-28 16:22:47 +01:00
|
|
|
groups = {snappy=3},
|
|
|
|
selection_box = sh_cbox,
|
2015-04-29 14:14:36 +02:00
|
|
|
walkable = false,
|
2015-05-14 12:25:11 +02:00
|
|
|
on_rotate = screwdriver.disallow,
|
2016-07-31 01:17:23 +02:00
|
|
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
2015-05-11 03:03:50 +02:00
|
|
|
local below = minetest.get_node_or_nil({x=pos.x, y=pos.y-2.0, z=pos.z})
|
2015-05-11 04:30:53 +02:00
|
|
|
if below and below.name == "homedecor:shower_tray" then
|
2015-05-11 03:03:50 +02:00
|
|
|
local particledef = {
|
2015-05-11 04:34:30 +02:00
|
|
|
outlet = { x = 0, y = -0.42, z = 0.1 },
|
2015-05-11 03:03:50 +02:00
|
|
|
velocity_x = { min = -0.15, max = 0.15 },
|
2015-05-11 04:08:34 +02:00
|
|
|
velocity_y = -2,
|
2015-05-11 03:03:50 +02:00
|
|
|
velocity_z = { min = -0.3, max = 0.1 },
|
|
|
|
spread = 0.12
|
|
|
|
}
|
|
|
|
homedecor.start_particle_spawner(pos, node, particledef, "homedecor_shower")
|
2015-04-28 11:56:38 +02:00
|
|
|
end
|
2016-07-31 01:17:23 +02:00
|
|
|
return itemstack
|
2015-04-28 11:56:38 +02:00
|
|
|
end,
|
|
|
|
on_destruct = function(pos)
|
2015-05-11 03:03:50 +02:00
|
|
|
homedecor.stop_particle_spawner(pos)
|
2015-04-28 11:56:38 +02:00
|
|
|
end
|
2013-03-26 12:05:22 +01:00
|
|
|
})
|
|
|
|
|
2017-02-28 02:08:14 +01:00
|
|
|
homedecor.register("bathtub_clawfoot_brass_taps", {
|
|
|
|
drawtype = "mesh",
|
|
|
|
mesh = "homedecor_bathtub_clawfoot.obj",
|
|
|
|
tiles = {
|
|
|
|
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
|
|
|
|
"homedecor_generic_metal_bright.png",
|
|
|
|
"homedecor_generic_metal_bright.png",
|
|
|
|
"homedecor_generic_metal_brass.png",
|
2019-04-20 21:49:36 +02:00
|
|
|
"building_blocks_marble.png",
|
2017-02-28 02:08:14 +01:00
|
|
|
"homedecor_bathtub_clawfoot_bottom_inside.png",
|
|
|
|
},
|
|
|
|
description = S("Bathtub, clawfoot, with brass taps"),
|
|
|
|
groups = {cracky=3},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.5, -0.5, -0.5, 1.5, 0.3125, 0.5 },
|
|
|
|
},
|
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
homedecor.register("bathtub_clawfoot_chrome_taps", {
|
|
|
|
drawtype = "mesh",
|
|
|
|
mesh = "homedecor_bathtub_clawfoot.obj",
|
|
|
|
tiles = {
|
|
|
|
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
|
|
|
|
"homedecor_generic_metal_bright.png",
|
|
|
|
"homedecor_generic_metal_bright.png",
|
|
|
|
"homedecor_generic_metal_bright.png",
|
2019-04-20 21:49:36 +02:00
|
|
|
"building_blocks_marble.png",
|
2017-02-28 02:08:14 +01:00
|
|
|
"homedecor_bathtub_clawfoot_bottom_inside.png",
|
|
|
|
},
|
|
|
|
description = S("Bathtub, clawfoot, with chrome taps"),
|
|
|
|
groups = {cracky=3},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.5, -0.5, -0.5, 1.5, 0.3125, 0.5 },
|
|
|
|
},
|
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
|
|
|
|
2015-03-29 04:42:53 +02:00
|
|
|
local bs_cbox = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -8/16, -8/16, 1/16, 8/16, 8/16, 8/16 }
|
|
|
|
}
|
|
|
|
|
|
|
|
homedecor.register("bathroom_set", {
|
|
|
|
drawtype = "mesh",
|
|
|
|
mesh = "homedecor_bathroom_set.obj",
|
|
|
|
tiles = {
|
|
|
|
"homedecor_bathroom_set_mirror.png",
|
|
|
|
"homedecor_bathroom_set_tray.png",
|
|
|
|
"homedecor_bathroom_set_toothbrush.png",
|
|
|
|
"homedecor_bathroom_set_cup.png",
|
|
|
|
"homedecor_bathroom_set_toothpaste.png",
|
|
|
|
},
|
2015-03-29 13:13:17 +02:00
|
|
|
inventory_image = "homedecor_bathroom_set_inv.png",
|
2017-01-24 21:43:20 +01:00
|
|
|
description = S("Bathroom sundries set"),
|
2015-03-29 04:42:53 +02:00
|
|
|
groups = {snappy=3},
|
|
|
|
selection_box = bs_cbox,
|
2015-04-29 14:14:36 +02:00
|
|
|
walkable = false,
|
|
|
|
sounds = default.node_sound_glass_defaults(),
|
2015-03-29 04:42:53 +02:00
|
|
|
})
|
|
|
|
|
2019-04-20 21:49:36 +02:00
|
|
|
-- aliases
|
|
|
|
|
2013-03-26 12:05:22 +01:00
|
|
|
minetest.register_alias("3dforniture:toilet", "homedecor:toilet")
|
|
|
|
minetest.register_alias("3dforniture:toilet_open", "homedecor:toilet_open")
|
|
|
|
minetest.register_alias("3dforniture:sink", "homedecor:sink")
|
|
|
|
minetest.register_alias("3dforniture:taps", "homedecor:taps")
|
|
|
|
minetest.register_alias("3dforniture:shower_tray", "homedecor:shower_tray")
|
|
|
|
minetest.register_alias("3dforniture:shower_head", "homedecor:shower_head")
|
|
|
|
minetest.register_alias("3dforniture:table_lamp", "homedecor:table_lamp_off")
|
|
|
|
|
|
|
|
minetest.register_alias("toilet", "homedecor:toilet")
|
|
|
|
minetest.register_alias("sink", "homedecor:sink")
|
|
|
|
minetest.register_alias("taps", "homedecor:taps")
|
|
|
|
minetest.register_alias("shower_tray", "homedecor:shower_tray")
|
|
|
|
minetest.register_alias("shower_head", "homedecor:shower_head")
|
|
|
|
minetest.register_alias("table_lamp", "homedecor:table_lamp_off")
|
2019-04-20 21:49:36 +02:00
|
|
|
|
|
|
|
-- convert old static nodes
|
|
|
|
|
|
|
|
homedecor.old_static_bathroom_tiles = {
|
|
|
|
"homedecor:tiles_1",
|
|
|
|
"homedecor:tiles_2",
|
|
|
|
"homedecor:tiles_3",
|
|
|
|
"homedecor:tiles_4",
|
|
|
|
"homedecor:tiles_red",
|
|
|
|
"homedecor:tiles_tan",
|
|
|
|
"homedecor:tiles_yellow",
|
|
|
|
"homedecor:tiles_green",
|
|
|
|
"homedecor:tiles_blue"
|
|
|
|
}
|
|
|
|
|
|
|
|
local old_to_color = {
|
|
|
|
"light_grey",
|
|
|
|
"grey",
|
|
|
|
"black",
|
|
|
|
"black"
|
|
|
|
}
|
|
|
|
|
|
|
|
minetest.register_lbm({
|
|
|
|
name = ":homedecor:convert_bathroom_tiles",
|
|
|
|
label = "Convert bathroom tiles to use param2 color",
|
|
|
|
run_at_every_load = false,
|
|
|
|
nodenames = homedecor.old_static_bathroom_tiles,
|
|
|
|
action = function(pos, node)
|
|
|
|
local name = node.name
|
|
|
|
local newname = "homedecor:bathroom_tiles_light"
|
|
|
|
local a = string.find(name, "_")
|
|
|
|
local color = string.sub(name, a + 1)
|
|
|
|
|
|
|
|
if color == "tan" then
|
|
|
|
color = "yellow_s50"
|
|
|
|
elseif color == "1" or color == "2" or color == "3" or color == "4" then
|
|
|
|
if color == "4" then
|
|
|
|
newname = "homedecor:bathroom_tiles_medium"
|
|
|
|
end
|
|
|
|
color = old_to_color[tonumber(color)]
|
|
|
|
elseif color ~= "yellow" then
|
|
|
|
color = color.."_s50"
|
|
|
|
end
|
|
|
|
|
|
|
|
local paletteidx = unifieddyes.getpaletteidx("unifieddyes:"..color, "extended")
|
|
|
|
|
|
|
|
minetest.set_node(pos, { name = newname, param2 = paletteidx })
|
|
|
|
local meta = minetest.get_meta(pos)
|
|
|
|
meta:set_string("dye", "unifieddyes:"..color)
|
|
|
|
meta:set_string("palette", "ext")
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
-- crafting
|
|
|
|
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "homedecor:towel_rod",
|
|
|
|
recipe = {
|
|
|
|
{ "group:wood", "group:stick", "group:wood" },
|
|
|
|
{ "", "building_blocks:terrycloth_towel", "" },
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "homedecor:toilet_paper",
|
|
|
|
recipe = {
|
|
|
|
{ "", "default:paper", "default:paper" },
|
|
|
|
{ "group:wood", "group:stick", "default:paper" },
|
|
|
|
{ "", "default:paper", "default:paper" },
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "homedecor:medicine_cabinet",
|
|
|
|
recipe = {
|
|
|
|
{ "group:stick", "default:glass", "group:stick" },
|
|
|
|
{ "group:stick", "default:glass", "group:stick" },
|
|
|
|
{ "group:stick", "default:glass", "group:stick" }
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
-- bathroom/kitchen tiles
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
|
|
|
output = "homedecor:bathroom_tiles_light 4",
|
|
|
|
recipe = {
|
|
|
|
{ "group:marble", "group:marble", "" },
|
|
|
|
{ "group:marble", "group:marble", "dye:white" }
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
unifieddyes.register_color_craft({
|
|
|
|
output = "homedecor:bathroom_tiles_light",
|
|
|
|
palette = "extended",
|
|
|
|
type = "shapeless",
|
|
|
|
neutral_node = "homedecor:bathroom_tiles_light",
|
|
|
|
recipe = {
|
|
|
|
"NEUTRAL_NODE",
|
|
|
|
"MAIN_DYE"
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
|
|
|
output = "homedecor:bathroom_tiles_medium 4",
|
|
|
|
recipe = {
|
|
|
|
{ "group:marble", "group:marble", "" },
|
|
|
|
{ "group:marble", "group:marble", "dye:grey" }
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
unifieddyes.register_color_craft({
|
|
|
|
output = "homedecor:bathroom_tiles_medium",
|
|
|
|
palette = "extended",
|
|
|
|
type = "shapeless",
|
|
|
|
neutral_node = "homedecor:bathroom_tiles_medium",
|
|
|
|
recipe = {
|
|
|
|
"NEUTRAL_NODE",
|
|
|
|
"MAIN_DYE"
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
|
|
|
output = "homedecor:bathroom_tiles_dark 4",
|
|
|
|
recipe = {
|
|
|
|
{ "group:marble", "group:marble", "" },
|
|
|
|
{ "group:marble", "group:marble", "dye:dark_grey" }
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
unifieddyes.register_color_craft({
|
|
|
|
output = "homedecor:bathroom_tiles_dark",
|
|
|
|
palette = "extended",
|
|
|
|
type = "shapeless",
|
|
|
|
neutral_node = "homedecor:bathroom_tiles_dark",
|
|
|
|
recipe = {
|
|
|
|
"NEUTRAL_NODE",
|
|
|
|
"MAIN_DYE"
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "homedecor:bathroom_set",
|
|
|
|
recipe = {
|
|
|
|
{ "", "homedecor:glass_table_small_round", "" },
|
|
|
|
{ "basic_materials:plastic_sheet", "homedecor:glass_table_small_round", "basic_materials:plastic_sheet" },
|
|
|
|
{ "group:stick", "basic_materials:plastic_sheet", "group:stick" }
|
|
|
|
},
|
|
|
|
})
|