2020-08-05 00:10:48 +02:00
|
|
|
local S = minetest.get_translator("homedecor_office")
|
2015-08-16 17:41:19 +02:00
|
|
|
|
|
|
|
homedecor.register("filing_cabinet", {
|
2017-01-24 21:43:20 +01:00
|
|
|
description = S("Filing cabinet"),
|
2015-08-16 17:41:19 +02:00
|
|
|
mesh = "homedecor_filing_cabinet.obj",
|
|
|
|
tiles = {
|
|
|
|
homedecor.plain_wood,
|
|
|
|
"homedecor_filing_cabinet_front.png",
|
|
|
|
"homedecor_filing_cabinet_bottom.png"
|
|
|
|
},
|
2022-05-03 21:21:14 +02:00
|
|
|
groups = { snappy = 3, dig_tree=2 },
|
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_wood_defaults",
|
|
|
|
},
|
2015-08-16 17:41:19 +02:00
|
|
|
infotext=S("Filing cabinet"),
|
|
|
|
inventory = {
|
|
|
|
size=16,
|
2015-08-19 19:30:03 +02:00
|
|
|
lockable=true,
|
2015-08-16 17:41:19 +02:00
|
|
|
},
|
2022-05-03 21:21:14 +02:00
|
|
|
crafts = {
|
|
|
|
{
|
|
|
|
recipe = {
|
|
|
|
{ "", "group:wood", "" },
|
|
|
|
{ "group:wood", "homedecor:drawer_small", "group:wood" },
|
|
|
|
{ "", "group:wood", "" },
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
2015-08-16 17:41:19 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
local desk_cbox = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.5, -0.5, -0.5, 1.5, 0.5, 0.5 }
|
|
|
|
}
|
|
|
|
homedecor.register("desk", {
|
2017-01-31 06:34:41 +01:00
|
|
|
description = S("Desk"),
|
2015-08-16 17:41:19 +02:00
|
|
|
mesh = "homedecor_desk.obj",
|
|
|
|
tiles = {
|
|
|
|
homedecor.plain_wood,
|
|
|
|
"homedecor_desk_drawers.png",
|
2017-01-25 23:53:45 +01:00
|
|
|
{ name = "homedecor_generic_metal.png", color = homedecor.color_black }
|
2015-08-16 17:41:19 +02:00
|
|
|
},
|
|
|
|
inventory_image = "homedecor_desk_inv.png",
|
|
|
|
selection_box = desk_cbox,
|
|
|
|
collision_box = desk_cbox,
|
2022-05-03 21:21:14 +02:00
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_wood_defaults",
|
|
|
|
},
|
|
|
|
groups = { snappy = 3, dig_tree=2 },
|
2015-09-08 09:50:02 +02:00
|
|
|
expand = { right="placeholder" },
|
2015-08-16 17:41:19 +02:00
|
|
|
inventory = {
|
|
|
|
size=24,
|
2015-08-19 20:21:56 +02:00
|
|
|
lockable=true,
|
2015-08-16 17:41:19 +02:00
|
|
|
},
|
2022-05-03 21:21:14 +02:00
|
|
|
crafts = {
|
|
|
|
{
|
|
|
|
recipe = {
|
|
|
|
{ "slab_wood", "slab_wood", "slab_wood" },
|
|
|
|
{ "homedecor:drawer_small", "group:wood", "group:wood" },
|
|
|
|
{ "homedecor:drawer_small", "", "group:wood" },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
recipe = {
|
|
|
|
{ "moreblocks:slab_wood", "moreblocks:slab_wood", "moreblocks:slab_wood" },
|
|
|
|
{ "homedecor:drawer_small", "group:wood", "group:wood" },
|
|
|
|
{ "homedecor:drawer_small", "", "group:wood" },
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
2015-08-16 17:41:19 +02:00
|
|
|
})
|
|
|
|
minetest.register_alias("homedecor:desk_r", "air")
|
|
|
|
|
|
|
|
local globe_cbox = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.4, -0.5, -0.3, 0.3, 0.3, 0.3 }
|
|
|
|
}
|
|
|
|
|
|
|
|
homedecor.register("desk_globe", {
|
2017-01-31 06:34:41 +01:00
|
|
|
description = S("Desk globe"),
|
2015-08-16 17:41:19 +02:00
|
|
|
mesh = "homedecor_desk_globe.obj",
|
|
|
|
tiles = {
|
|
|
|
"homedecor_generic_wood_red.png",
|
2017-01-25 10:22:28 +01:00
|
|
|
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
|
2015-08-16 17:41:19 +02:00
|
|
|
"homedecor_earth.png"
|
|
|
|
},
|
|
|
|
inventory_image = "homedecor_desk_globe_inv.png",
|
|
|
|
selection_box = globe_cbox,
|
|
|
|
collision_box = globe_cbox,
|
2016-12-11 04:46:32 +01:00
|
|
|
groups = {choppy=2, oddly_breakable_by_hand=2},
|
2015-08-16 17:41:19 +02:00
|
|
|
walkable = false,
|
2022-05-03 21:21:14 +02:00
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_wood_defaults",
|
|
|
|
},
|
|
|
|
crafts = {
|
|
|
|
{
|
|
|
|
recipe = {
|
|
|
|
{ "group:stick", "basic_materials:plastic_sheet", "dye_green" },
|
|
|
|
{ "group:stick", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
|
|
|
|
{ "group:stick", "slab_wood", "dye_blue" }
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
recipe = {
|
|
|
|
{ "group:stick", "basic_materials:plastic_sheet", "dye_green" },
|
|
|
|
{ "group:stick", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
|
|
|
|
{ "group:stick", "moreblocks:slab_wood", "dye_blue" }
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
2015-08-16 17:41:19 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
homedecor.register("calendar", {
|
2017-01-31 06:34:41 +01:00
|
|
|
description = S("Calendar"),
|
2015-08-16 17:41:19 +02:00
|
|
|
mesh = "homedecor_calendar.obj",
|
|
|
|
tiles = {"homedecor_calendar.png"},
|
|
|
|
inventory_image = "homedecor_calendar_inv.png",
|
|
|
|
wield_image = "homedecor_calendar_inv.png",
|
|
|
|
paramtype2 = "wallmounted",
|
|
|
|
walkable = false,
|
|
|
|
selection_box = {
|
|
|
|
type = "wallmounted",
|
|
|
|
wall_side = { -8/16, -8/16, -4/16, -5/16, 5/16, 4/16 },
|
|
|
|
wall_bottom = { -4/16, -8/16, -8/16, 4/16, -5/16, 5/16 },
|
|
|
|
wall_top = { -4/16, 5/16, -8/16, 4/16, 8/16, 5/16 }
|
|
|
|
},
|
2022-02-07 14:18:17 +01:00
|
|
|
use_texture_alpha = "clip",
|
2022-05-03 21:21:14 +02:00
|
|
|
groups = {choppy=2,attached_node=1, dig_tree=2},
|
2015-08-16 17:41:19 +02:00
|
|
|
legacy_wallmounted = true,
|
2022-05-03 21:21:14 +02:00
|
|
|
_sound_def = {
|
2022-08-12 05:37:26 +02:00
|
|
|
key = "node_sound_default",
|
2022-05-03 21:21:14 +02:00
|
|
|
},
|
2017-01-31 06:34:41 +01:00
|
|
|
infotext = S("Date (right-click to update):\n@1", os.date("%Y-%m-%d")), -- ISO 8601 format
|
2016-07-31 01:17:23 +02:00
|
|
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
2015-08-16 17:41:19 +02:00
|
|
|
local meta = minetest.get_meta(pos)
|
|
|
|
local date = os.date("%Y-%m-%d")
|
2017-01-31 06:34:41 +01:00
|
|
|
meta:set_string("infotext", S("Date (right-click to update):\n@1", date))
|
2016-07-31 01:17:23 +02:00
|
|
|
return itemstack
|
2022-05-03 21:21:14 +02:00
|
|
|
end,
|
|
|
|
crafts = {
|
|
|
|
{
|
|
|
|
recipe = {
|
|
|
|
{ "","dye_red","" },
|
|
|
|
{ "","dye_black","" },
|
|
|
|
{ "","paper","" }
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|