2014-07-19 11:39:18 +02:00
|
|
|
local S = homedecor.gettext
|
|
|
|
|
2014-07-27 15:04:53 +02:00
|
|
|
local bathroom_tile_colors = {
|
2015-05-04 05:12:30 +02:00
|
|
|
{ "1", "white/grey", "#c0c0c0:200" },
|
|
|
|
{ "2", "white/dark grey", "#404040:150" },
|
|
|
|
{ "3", "white/black", "#000000:200" },
|
|
|
|
{ "4", "black/dark grey", "" },
|
|
|
|
{ "red", "white/red", "#d00000:150" },
|
|
|
|
{ "green", "white/green", "#00d000:150" },
|
|
|
|
{ "blue", "white/blue", "#0000d0:150" },
|
|
|
|
{ "yellow", "white/yellow", "#ffff00:150" },
|
|
|
|
{ "tan", "white/tan", "#ceaf42:150" }
|
2014-07-27 15:04:53 +02:00
|
|
|
}
|
2014-06-27 03:33:27 +02:00
|
|
|
|
2014-07-27 15:04:53 +02:00
|
|
|
for i in ipairs(bathroom_tile_colors) do
|
|
|
|
local color = bathroom_tile_colors[i][1]
|
|
|
|
local shade = bathroom_tile_colors[i][2]
|
2015-05-04 05:12:30 +02:00
|
|
|
local hue = bathroom_tile_colors[i][3]
|
|
|
|
|
|
|
|
local coloredtile = "homedecor_bathroom_tiles_bg.png^(homedecor_bathroom_tiles_fg.png^[colorize:"..hue..")"
|
|
|
|
|
|
|
|
if color == "4" then
|
|
|
|
coloredtile = "(homedecor_bathroom_tiles_bg.png^[colorize:#000000:75)"..
|
|
|
|
"^(homedecor_bathroom_tiles_fg.png^[colorize:#000000:200)"
|
|
|
|
end
|
|
|
|
|
2014-07-27 15:04:53 +02:00
|
|
|
minetest.register_node("homedecor:tiles_"..color, {
|
|
|
|
description = "Bathroom/kitchen tiles ("..shade..")",
|
|
|
|
tiles = {
|
2015-05-04 05:12:30 +02:00
|
|
|
coloredtile,
|
|
|
|
coloredtile,
|
|
|
|
coloredtile,
|
|
|
|
coloredtile,
|
|
|
|
"("..coloredtile..")^[transformR90",
|
|
|
|
"("..coloredtile..")^[transformR90"
|
2014-07-27 15:04:53 +02:00
|
|
|
},
|
|
|
|
groups = {cracky=3},
|
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
|
|
|
end
|
2014-06-27 03:33:27 +02:00
|
|
|
|
2015-03-31 08:12:42 +02:00
|
|
|
local tr_cbox = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.375, -0.3125, 0.25, 0.375, 0.375, 0.5 }
|
|
|
|
}
|
|
|
|
|
2015-01-21 19:19:14 +01:00
|
|
|
homedecor.register("towel_rod", {
|
2014-06-27 03:33:27 +02:00
|
|
|
description = "Towel rod with towel",
|
2015-03-31 08:12:42 +02:00
|
|
|
mesh = "homedecor_towel_rod.obj",
|
2014-06-27 03:33:27 +02:00
|
|
|
tiles = {
|
2015-03-31 08:12:42 +02:00
|
|
|
"homedecor_generic_terrycloth.png",
|
|
|
|
"default_wood.png",
|
2014-06-27 03:33:27 +02:00
|
|
|
},
|
2015-03-31 17:42:33 +02:00
|
|
|
inventory_image = "homedecor_towel_rod_inv.png",
|
2015-03-31 08:12:42 +02:00
|
|
|
selection_box = tr_cbox,
|
2015-04-29 14:14:36 +02:00
|
|
|
walkable = false,
|
2014-06-27 03:33:27 +02:00
|
|
|
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3},
|
|
|
|
sounds = default.node_sound_defaults(),
|
|
|
|
})
|
|
|
|
|
2015-01-21 19:19:14 +01:00
|
|
|
homedecor.register("medicine_cabinet", {
|
2014-08-02 03:26:04 +02:00
|
|
|
description = S("Medicine Cabinet"),
|
2015-05-04 08:16:36 +02:00
|
|
|
mesh = "homedecor_medicine_cabinet.obj",
|
2014-08-02 03:26:04 +02:00
|
|
|
tiles = {
|
2015-05-04 08:16:36 +02:00
|
|
|
'default_wood.png',
|
|
|
|
'homedecor_medicine_cabinet_mirror.png'
|
2014-08-02 03:26:04 +02:00
|
|
|
},
|
|
|
|
inventory_image = "homedecor_medicine_cabinet_inv.png",
|
2015-01-21 19:19:14 +01:00
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
2014-08-02 03:26:04 +02:00
|
|
|
fixed = {-0.3125, -0.1875, 0.3125, 0.3125, 0.5, 0.5}
|
2015-01-21 19:19:14 +01:00
|
|
|
},
|
2014-08-02 03:26:04 +02:00
|
|
|
groups = { snappy = 3 },
|
|
|
|
sounds = default.node_sound_wood_defaults(),
|
2014-09-20 13:05:07 +02:00
|
|
|
on_punch = function(pos, node, puncher, pointed_thing)
|
2015-01-21 13:42:20 +01:00
|
|
|
node.name = "homedecor:medicine_cabinet_open"
|
|
|
|
minetest.swap_node(pos, node)
|
2014-09-20 13:05:07 +02:00
|
|
|
end,
|
2015-01-21 19:19:14 +01:00
|
|
|
infotext=S("Medicine cabinet"),
|
|
|
|
inventory = {
|
2015-01-23 02:36:43 +01:00
|
|
|
size=6,
|
2015-01-21 19:19:14 +01:00
|
|
|
},
|
2014-08-02 03:26:04 +02:00
|
|
|
})
|
|
|
|
|
2015-01-21 19:19:14 +01:00
|
|
|
homedecor.register("medicine_cabinet_open", {
|
2015-05-04 08:16:36 +02:00
|
|
|
mesh = "homedecor_medicine_cabinet_open.obj",
|
2014-09-20 13:05:07 +02:00
|
|
|
tiles = {
|
2015-05-04 08:16:36 +02:00
|
|
|
'default_wood.png',
|
|
|
|
'homedecor_medicine_cabinet_mirror.png',
|
|
|
|
'homedecor_medicine_cabinet_inside.png'
|
2014-09-20 13:05:07 +02:00
|
|
|
},
|
2015-05-04 08:16:36 +02:00
|
|
|
selection_box = {
|
2014-09-20 13:05:07 +02:00
|
|
|
type = "fixed",
|
2015-05-04 08:16:36 +02:00
|
|
|
fixed = {-0.3125, -0.1875, -0.25, 0.3125, 0.5, 0.5}
|
2014-09-20 13:05:07 +02:00
|
|
|
},
|
2015-05-04 08:16:36 +02:00
|
|
|
groups = { snappy = 3, not_in_creative_inventory=1 },
|
2014-09-20 13:05:07 +02:00
|
|
|
drop = "homedecor:medicine_cabinet",
|
|
|
|
on_punch = function(pos, node, puncher, pointed_thing)
|
2015-01-21 13:42:20 +01:00
|
|
|
node.name = "homedecor:medicine_cabinet"
|
|
|
|
minetest.swap_node(pos, node)
|
2014-09-20 13:05:07 +02:00
|
|
|
end,
|
|
|
|
})
|
|
|
|
|