2019-04-20 21:49:36 +02:00
|
|
|
-- Home Decor mod by VanessaE
|
|
|
|
--
|
|
|
|
-- Mostly my own code, with bits and pieces lifted from Minetest's default
|
|
|
|
-- lua files and from ironzorg's flowers mod. Many thanks to GloopMaster
|
|
|
|
-- for helping me figure out the inventories used in the nightstands/dressers.
|
|
|
|
--
|
|
|
|
-- The code for ovens, nightstands, refrigerators are basically modified
|
|
|
|
-- copies of the code for chests and furnaces.
|
2017-01-24 21:43:20 +01:00
|
|
|
|
2020-08-05 00:07:13 +02:00
|
|
|
local S = minetest.get_translator("homedecor_misc")
|
|
|
|
|
|
|
|
homedecor_misc = {}
|
2013-03-18 00:09:42 +01:00
|
|
|
|
2022-05-03 21:21:14 +02:00
|
|
|
local wool_black, wool_grey = homedecor.textures.wool_black, homedecor.textures.wool_grey
|
|
|
|
local wood_tex = homedecor.textures.default_wood
|
|
|
|
|
2015-01-24 00:34:02 +01:00
|
|
|
homedecor.register("ceiling_paint", {
|
2013-03-18 00:09:42 +01:00
|
|
|
description = S("Textured Ceiling Paint"),
|
|
|
|
drawtype = 'signlike',
|
|
|
|
tiles = { 'homedecor_ceiling_paint.png' },
|
|
|
|
inventory_image = 'homedecor_ceiling_paint_roller.png',
|
|
|
|
wield_image = 'homedecor_ceiling_paint_roller.png',
|
|
|
|
walkable = false,
|
|
|
|
groups = { snappy = 3 },
|
2022-05-03 21:21:14 +02:00
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_leaves_defaults",
|
|
|
|
},
|
2015-04-29 14:14:36 +02:00
|
|
|
selection_box = { type = "wallmounted" },
|
2013-03-18 00:09:42 +01:00
|
|
|
})
|
|
|
|
|
2015-01-24 00:34:02 +01:00
|
|
|
homedecor.register("ceiling_tile", {
|
2013-03-18 00:09:42 +01:00
|
|
|
description = S("Drop-Ceiling Tile"),
|
|
|
|
drawtype = 'signlike',
|
|
|
|
tiles = { 'homedecor_ceiling_tile.png' },
|
|
|
|
wield_image = 'homedecor_ceiling_tile.png',
|
|
|
|
inventory_image = 'homedecor_ceiling_tile.png',
|
|
|
|
walkable = false,
|
|
|
|
groups = { snappy = 3 },
|
2022-05-03 21:21:14 +02:00
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_leaves_defaults",
|
|
|
|
},
|
2015-04-29 14:14:36 +02:00
|
|
|
selection_box = { type = "wallmounted" },
|
2013-03-18 00:09:42 +01:00
|
|
|
})
|
|
|
|
|
2015-05-11 18:37:49 +02:00
|
|
|
local rug_types = {
|
2019-04-20 21:49:36 +02:00
|
|
|
{ "small", "homedecor_small_rug.obj" },
|
|
|
|
{ "large", homedecor.box.slab_y(0.0625) },
|
|
|
|
{ "persian", homedecor.box.slab_y(0.0625) },
|
2015-05-11 18:37:49 +02:00
|
|
|
}
|
2013-03-18 00:09:42 +01:00
|
|
|
|
2017-01-24 21:43:20 +01:00
|
|
|
for _, rt in ipairs(rug_types) do
|
|
|
|
local s, m = unpack(rt)
|
2015-05-11 18:37:49 +02:00
|
|
|
|
|
|
|
local mesh = m
|
|
|
|
local nodebox = nil
|
2022-05-03 21:21:14 +02:00
|
|
|
local tiles = { "homedecor_rug_"..s..".png", wool_grey }
|
2015-05-11 18:37:49 +02:00
|
|
|
|
|
|
|
if type(m) == "table" then
|
|
|
|
mesh = nil
|
|
|
|
nodebox = {
|
2016-12-15 22:23:31 +01:00
|
|
|
type = "fixed",
|
2015-05-11 18:37:49 +02:00
|
|
|
fixed = m
|
|
|
|
}
|
|
|
|
tiles = {
|
|
|
|
"homedecor_rug_"..s..".png",
|
2022-05-03 21:21:14 +02:00
|
|
|
wool_grey,
|
2015-05-11 18:37:49 +02:00
|
|
|
"homedecor_rug_"..s..".png"
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
homedecor.register("rug_"..s, {
|
2017-01-24 21:43:20 +01:00
|
|
|
description = S("Rug (@1)", S(s)),
|
2015-05-11 18:37:49 +02:00
|
|
|
mesh = mesh,
|
|
|
|
tiles = tiles,
|
|
|
|
node_box = nodebox,
|
|
|
|
paramtype2 = "wallmounted",
|
|
|
|
walkable = false,
|
|
|
|
groups = {snappy = 3},
|
2022-05-03 21:21:14 +02:00
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_leaves_defaults",
|
|
|
|
},
|
2015-05-11 18:37:49 +02:00
|
|
|
selection_box = { type = "wallmounted" },
|
|
|
|
})
|
2015-02-28 10:14:46 +01:00
|
|
|
end
|
2013-03-18 00:09:42 +01:00
|
|
|
|
2019-04-20 21:49:36 +02:00
|
|
|
local pot_colors = { "black", "green", "terracotta" }
|
2013-03-18 00:09:42 +01:00
|
|
|
|
2015-02-28 10:14:46 +01:00
|
|
|
for _, p in ipairs(pot_colors) do
|
|
|
|
homedecor.register("flower_pot_"..p, {
|
2017-01-24 21:43:20 +01:00
|
|
|
description = S("Flower Pot (@1)", S(p)),
|
2014-12-14 21:12:44 +01:00
|
|
|
mesh = "homedecor_flowerpot.obj",
|
2015-04-06 22:35:00 +02:00
|
|
|
tiles = {
|
|
|
|
"homedecor_flower_pot_"..p..".png",
|
2022-05-03 21:21:14 +02:00
|
|
|
{ name = default and "default_dirt.png" or wood_tex, color = 0xff505050 },
|
2015-04-06 22:35:00 +02:00
|
|
|
},
|
2015-01-21 04:40:38 +01:00
|
|
|
groups = { snappy = 3, potting_soil=1 },
|
2022-05-03 21:21:14 +02:00
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_stone_defaults",
|
|
|
|
},
|
2013-03-18 00:09:42 +01:00
|
|
|
})
|
2015-02-28 10:14:46 +01:00
|
|
|
end
|
2022-05-03 21:21:14 +02:00
|
|
|
if minetest.get_modpath("flowers") then
|
|
|
|
local flowers_list = {
|
|
|
|
{ S("Rose"), "rose", "flowers:rose" },
|
|
|
|
{ S("Tulip"), "tulip", "flowers:tulip" },
|
|
|
|
{ S("Yellow Dandelion"), "dandelion_yellow", "flowers:dandelion_yellow" },
|
|
|
|
{ S("White Dandelion"), "dandelion_white", "flowers:dandelion_white" },
|
|
|
|
{ S("Blue Geranium"), "geranium", "flowers:geranium" },
|
|
|
|
{ S("Viola"), "viola", "flowers:viola" },
|
|
|
|
{ S("Cactus"), "cactus", "default:cactus" },
|
|
|
|
{ S("Bonsai"), "bonsai", "default:sapling" }
|
|
|
|
}
|
2013-03-18 00:09:42 +01:00
|
|
|
|
2022-05-03 21:21:14 +02:00
|
|
|
for _, f in ipairs(flowers_list) do
|
|
|
|
local flowerdesc, flower, craftwith = unpack(f)
|
2016-12-15 22:23:31 +01:00
|
|
|
|
2022-05-03 21:21:14 +02:00
|
|
|
homedecor.register("potted_"..flower, {
|
|
|
|
description = S("Potted flower (@1)", flowerdesc),
|
|
|
|
mesh = "homedecor_potted_plant.obj",
|
|
|
|
tiles = {
|
|
|
|
"homedecor_flower_pot_terracotta.png",
|
|
|
|
{ name = "default_dirt.png", color = 0xff303030 },
|
|
|
|
"flowers_"..flower..".png"
|
|
|
|
},
|
|
|
|
walkable = false,
|
|
|
|
use_texture_alpha = "clip",
|
|
|
|
groups = {snappy = 3},
|
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_glass_defaults",
|
|
|
|
},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.2, -0.5, -0.2, 0.2, 0.3, 0.2 }
|
|
|
|
}
|
|
|
|
})
|
2015-05-15 20:14:48 +02:00
|
|
|
|
2022-05-03 21:21:14 +02:00
|
|
|
minetest.register_craft({
|
|
|
|
type = "shapeless",
|
|
|
|
output = "homedecor:potted_"..flower,
|
|
|
|
recipe = { craftwith, "homedecor:flower_pot_small" }
|
|
|
|
})
|
2015-05-15 20:14:48 +02:00
|
|
|
|
2022-05-03 21:21:14 +02:00
|
|
|
minetest.register_alias("flowers:flower_"..flower.."_pot", "homedecor:potted_"..flower)
|
|
|
|
minetest.register_alias("flowers:potted_"..flower, "homedecor:potted_"..flower)
|
|
|
|
minetest.register_alias("flowers:flower_pot", "homedecor:flower_pot_small")
|
|
|
|
end
|
2015-05-15 20:14:48 +02:00
|
|
|
end
|
|
|
|
|
2015-01-24 00:34:02 +01:00
|
|
|
homedecor.register("pole_brass", {
|
2019-09-22 09:23:36 +02:00
|
|
|
description = S("Brass Pole"),
|
2014-12-13 23:32:31 +01:00
|
|
|
mesh = "homedecor_round_pole.obj",
|
2019-09-22 09:23:36 +02:00
|
|
|
tiles = {"homedecor_generic_metal_brass.png^homedecor_generic_metal_lines_overlay.png",},
|
|
|
|
inventory_image = "homedecor_pole_brass_inv.png",
|
|
|
|
wield_image = "homedecor_pole_brass_inv.png",
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.125, -0.5, -0.125, 0.125, 0.5, 0.125 },
|
|
|
|
},
|
|
|
|
collision_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.125, -0.5, -0.125, 0.125, 0.5, 0.125 },
|
|
|
|
},
|
|
|
|
groups = {snappy=3},
|
2022-05-03 21:21:14 +02:00
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_wood_defaults",
|
|
|
|
},
|
2019-09-22 09:23:36 +02:00
|
|
|
check_for_pole = true
|
2013-03-18 00:09:42 +01:00
|
|
|
})
|
2015-01-20 23:59:50 +01:00
|
|
|
|
2015-01-24 00:34:02 +01:00
|
|
|
homedecor.register("pole_wrought_iron", {
|
2014-08-12 18:26:14 +02:00
|
|
|
description = S("Wrought Iron Pole"),
|
2015-04-28 05:48:02 +02:00
|
|
|
tiles = { "homedecor_generic_metal_wrought_iron.png^homedecor_generic_metal_lines_overlay.png" },
|
2014-12-14 21:42:59 +01:00
|
|
|
inventory_image = "homedecor_pole_wrought_iron_inv.png",
|
|
|
|
wield_image = "homedecor_pole_wrought_iron_inv.png",
|
2014-08-12 18:26:14 +02:00
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.0625, -0.5, -0.0625, 0.0625, 0.5, 0.0625}
|
|
|
|
},
|
2013-03-18 00:09:42 +01:00
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.0625, -0.5, -0.0625, 0.0625, 0.5, 0.0625}
|
|
|
|
},
|
2014-08-12 18:26:14 +02:00
|
|
|
groups = {snappy=3},
|
2022-05-03 21:21:14 +02:00
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_wood_defaults",
|
|
|
|
},
|
2013-03-18 00:09:42 +01:00
|
|
|
})
|
|
|
|
|
2015-05-08 20:05:24 +02:00
|
|
|
local ft_cbox = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.5, -0.5, -0.375, 0.5, 0.3125, 0.375 }
|
|
|
|
}
|
|
|
|
|
2015-01-24 00:34:02 +01:00
|
|
|
homedecor.register("fishtank", {
|
2017-01-24 21:43:20 +01:00
|
|
|
description = S("Fishtank"),
|
2015-05-08 20:05:24 +02:00
|
|
|
mesh = "homedecor_fishtank.obj",
|
2014-06-26 04:32:43 +02:00
|
|
|
tiles = {
|
2017-01-25 10:22:28 +01:00
|
|
|
{ name = "homedecor_generic_plastic.png", color = homedecor.color_black },
|
2015-05-09 01:45:34 +02:00
|
|
|
"homedecor_fishtank_filter.png",
|
2015-05-08 20:05:24 +02:00
|
|
|
"homedecor_fishtank_fishes.png",
|
2015-05-09 01:45:34 +02:00
|
|
|
"homedecor_fishtank_gravel.png",
|
|
|
|
"homedecor_fishtank_water_top.png",
|
2015-05-08 21:52:41 +02:00
|
|
|
"homedecor_fishtank_sides.png",
|
2014-06-26 04:32:43 +02:00
|
|
|
},
|
2022-03-29 07:44:05 +02:00
|
|
|
use_texture_alpha = "blend",
|
2015-05-08 20:05:24 +02:00
|
|
|
selection_box = ft_cbox,
|
|
|
|
collision_box = ft_cbox,
|
2014-06-26 04:32:43 +02:00
|
|
|
groups = {cracky=3,oddly_breakable_by_hand=3},
|
2022-05-03 21:21:14 +02:00
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_glass_defaults",
|
|
|
|
},
|
2016-07-31 01:17:23 +02:00
|
|
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
2015-05-08 20:05:24 +02:00
|
|
|
minetest.set_node(pos, {name = "homedecor:fishtank_lighted", param2 = node.param2})
|
2016-07-31 01:17:23 +02:00
|
|
|
return itemstack
|
2014-06-28 01:12:21 +02:00
|
|
|
end
|
|
|
|
})
|
|
|
|
|
2015-01-24 00:34:02 +01:00
|
|
|
homedecor.register("fishtank_lighted", {
|
2017-01-24 21:43:20 +01:00
|
|
|
description = S("Fishtank (lighted)"),
|
2015-05-08 20:05:24 +02:00
|
|
|
mesh = "homedecor_fishtank.obj",
|
2014-06-28 01:12:21 +02:00
|
|
|
tiles = {
|
2017-01-25 10:22:28 +01:00
|
|
|
{ name = "homedecor_generic_plastic.png", color = homedecor.color_black },
|
2015-05-09 01:45:34 +02:00
|
|
|
"homedecor_fishtank_filter.png",
|
2015-05-08 20:05:24 +02:00
|
|
|
"homedecor_fishtank_fishes_lighted.png",
|
2015-05-09 01:45:34 +02:00
|
|
|
"homedecor_fishtank_gravel_lighted.png",
|
|
|
|
"homedecor_fishtank_water_top_lighted.png",
|
2015-05-08 21:52:41 +02:00
|
|
|
"homedecor_fishtank_sides_lighted.png",
|
2014-06-28 01:12:21 +02:00
|
|
|
},
|
2022-05-03 21:21:14 +02:00
|
|
|
light_source = minetest.LIGHT_MAX-4,
|
2022-03-29 07:44:05 +02:00
|
|
|
use_texture_alpha = "blend",
|
2015-05-08 20:05:24 +02:00
|
|
|
selection_box = ft_cbox,
|
|
|
|
collision_box = ft_cbox,
|
2014-08-04 19:04:17 +02:00
|
|
|
groups = {cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1},
|
2022-05-03 21:21:14 +02:00
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_glass_defaults",
|
|
|
|
},
|
2016-07-31 01:17:23 +02:00
|
|
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
2015-05-08 20:05:24 +02:00
|
|
|
minetest.set_node(pos, {name = "homedecor:fishtank", param2 = node.param2})
|
2016-07-31 01:17:23 +02:00
|
|
|
return itemstack
|
2015-05-08 20:22:00 +02:00
|
|
|
end,
|
|
|
|
drop = "homedecor:fishtank",
|
2014-06-26 04:32:43 +02:00
|
|
|
})
|
|
|
|
|
2015-01-23 23:25:00 +01:00
|
|
|
homedecor.register("cardboard_box_big", {
|
|
|
|
description = S("Cardboard box (big)"),
|
2014-06-26 06:28:21 +02:00
|
|
|
tiles = {
|
2015-01-23 23:25:00 +01:00
|
|
|
'homedecor_cardbox_big_tb.png',
|
|
|
|
'homedecor_cardbox_big_tb.png',
|
|
|
|
'homedecor_cardbox_big_sides.png',
|
2014-06-26 06:28:21 +02:00
|
|
|
},
|
2022-03-29 07:44:05 +02:00
|
|
|
use_texture_alpha = "clip",
|
2015-01-23 23:25:00 +01:00
|
|
|
groups = { snappy = 3 },
|
|
|
|
infotext=S("Cardboard box"),
|
|
|
|
inventory = {
|
|
|
|
size=24,
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
homedecor.register("cardboard_box", {
|
|
|
|
description = S("Cardboard box"),
|
|
|
|
tiles = {
|
|
|
|
'homedecor_cardbox_tb.png',
|
|
|
|
'homedecor_cardbox_tb.png',
|
|
|
|
'homedecor_cardbox_sides.png',
|
|
|
|
},
|
2014-06-26 06:28:21 +02:00
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
2015-01-23 23:25:00 +01:00
|
|
|
{-0.3125, -0.5, -0.3125, 0.3125, 0, 0.3125},
|
2014-06-26 06:28:21 +02:00
|
|
|
}
|
|
|
|
},
|
2022-03-29 07:44:05 +02:00
|
|
|
use_texture_alpha = "clip",
|
2014-06-26 06:28:21 +02:00
|
|
|
groups = { snappy = 3 },
|
2015-01-21 19:19:14 +01:00
|
|
|
infotext=S("Cardboard box"),
|
|
|
|
inventory = {
|
2015-01-23 23:25:00 +01:00
|
|
|
size=8,
|
2015-01-21 19:19:14 +01:00
|
|
|
},
|
2014-06-26 06:28:21 +02:00
|
|
|
})
|
2014-06-25 11:59:34 +02:00
|
|
|
|
2015-01-24 00:34:02 +01:00
|
|
|
homedecor.register("dvd_cd_cabinet", {
|
2017-01-24 21:43:20 +01:00
|
|
|
description = S("DVD/CD cabinet"),
|
2015-04-27 05:23:45 +02:00
|
|
|
mesh = "homedecor_dvd_cabinet.obj",
|
2014-06-26 13:11:58 +02:00
|
|
|
tiles = {
|
2022-05-03 21:21:14 +02:00
|
|
|
wood_tex,
|
2014-06-26 13:11:58 +02:00
|
|
|
"homedecor_dvdcd_cabinet_front.png",
|
2015-04-27 05:23:45 +02:00
|
|
|
"homedecor_dvdcd_cabinet_back.png"
|
2014-06-26 13:11:58 +02:00
|
|
|
},
|
2015-08-19 15:06:53 +02:00
|
|
|
selection_box = homedecor.nodebox.slab_z(-0.5),
|
2015-04-29 14:14:36 +02:00
|
|
|
groups = {choppy=2,oddly_breakable_by_hand=2},
|
2022-05-03 21:21:14 +02:00
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_wood_defaults",
|
|
|
|
},
|
2022-08-03 06:00:22 +02:00
|
|
|
crafts = {
|
|
|
|
{
|
|
|
|
type = "shapeless",
|
|
|
|
recipe = {
|
|
|
|
"homedecor:dvd_player", "homedecor:kitchen_cabinet_colorable"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2014-06-26 13:11:58 +02:00
|
|
|
})
|
|
|
|
|
2015-03-23 06:25:13 +01:00
|
|
|
local pooltable_cbox = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.5, -0.5, -0.5, 0.5, 0.3125, 1.5 }
|
|
|
|
}
|
|
|
|
|
2015-01-23 00:01:08 +01:00
|
|
|
homedecor.register("pool_table", {
|
2015-03-23 06:25:13 +01:00
|
|
|
mesh = "homedecor_pool_table.obj",
|
2014-08-07 20:49:26 +02:00
|
|
|
tiles = {
|
2015-03-23 06:25:13 +01:00
|
|
|
"homedecor_pool_table_cue.png",
|
|
|
|
"homedecor_pool_table_baize.png",
|
|
|
|
"homedecor_pool_table_pockets.png",
|
|
|
|
"homedecor_pool_table_balls.png",
|
2017-01-25 10:22:28 +01:00
|
|
|
homedecor.lux_wood,
|
2014-08-07 20:49:26 +02:00
|
|
|
},
|
2017-01-24 21:43:20 +01:00
|
|
|
description = S("Pool Table"),
|
2014-08-07 20:49:26 +02:00
|
|
|
inventory_image = "homedecor_pool_table_inv.png",
|
|
|
|
groups = {snappy=3},
|
2015-03-23 06:25:13 +01:00
|
|
|
selection_box = pooltable_cbox,
|
|
|
|
collision_box = pooltable_cbox,
|
2015-09-08 09:50:02 +02:00
|
|
|
expand = { forward="placeholder" },
|
2022-05-03 21:21:14 +02:00
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_wood_defaults",
|
|
|
|
},
|
2020-08-05 00:07:13 +02:00
|
|
|
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil,
|
2014-08-07 20:49:26 +02:00
|
|
|
})
|
|
|
|
|
2015-03-23 06:25:13 +01:00
|
|
|
minetest.register_alias("homedecor:pool_table_2", "air")
|
2014-08-08 21:13:47 +02:00
|
|
|
|
2015-03-22 06:36:56 +01:00
|
|
|
local piano_cbox = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.5, -0.5, -0.125, 1.5, 0.5, 0.5 }
|
|
|
|
}
|
|
|
|
|
2015-03-22 12:17:13 +01:00
|
|
|
homedecor.register("piano", {
|
2015-03-22 06:36:56 +01:00
|
|
|
mesh = "homedecor_piano.obj",
|
2014-08-26 19:28:47 +02:00
|
|
|
tiles = {
|
2017-01-25 10:22:28 +01:00
|
|
|
{ name = "homedecor_generic_wood_luxury.png", color = homedecor.color_black },
|
2015-03-22 06:36:56 +01:00
|
|
|
"homedecor_piano_keys.png",
|
2015-04-28 05:48:02 +02:00
|
|
|
"homedecor_generic_metal_brass.png",
|
2014-08-26 19:28:47 +02:00
|
|
|
},
|
|
|
|
inventory_image = "homedecor_piano_inv.png",
|
2017-01-24 21:43:20 +01:00
|
|
|
description = S("Piano"),
|
2015-03-22 06:36:56 +01:00
|
|
|
groups = { snappy = 3 },
|
|
|
|
selection_box = piano_cbox,
|
|
|
|
collision_box = piano_cbox,
|
2015-09-08 09:50:02 +02:00
|
|
|
expand = { right="placeholder" },
|
2022-05-03 21:21:14 +02:00
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_wood_defaults",
|
|
|
|
},
|
2020-08-05 00:07:13 +02:00
|
|
|
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil,
|
2014-08-26 19:28:47 +02:00
|
|
|
})
|
|
|
|
|
2015-03-22 12:17:13 +01:00
|
|
|
minetest.register_alias("homedecor:piano_left", "homedecor:piano")
|
2015-03-22 06:36:56 +01:00
|
|
|
minetest.register_alias("homedecor:piano_right", "air")
|
2014-08-28 14:38:16 +02:00
|
|
|
|
2015-04-14 22:53:45 +02:00
|
|
|
local tr_cbox = {
|
|
|
|
type = "fixed",
|
2015-04-14 23:14:02 +02:00
|
|
|
fixed = { -0.3125, -0.5, -0.1875, 0.3125, 0.125, 0.1875 }
|
2015-04-14 22:53:45 +02:00
|
|
|
}
|
|
|
|
|
2015-01-24 00:34:02 +01:00
|
|
|
homedecor.register("trophy", {
|
2017-01-24 21:43:20 +01:00
|
|
|
description = S("Trophy"),
|
2015-04-14 22:53:45 +02:00
|
|
|
mesh = "homedecor_trophy.obj",
|
2014-09-10 12:13:06 +02:00
|
|
|
tiles = {
|
2022-05-03 21:21:14 +02:00
|
|
|
wood_tex,
|
2015-04-28 05:48:02 +02:00
|
|
|
"homedecor_generic_metal_gold.png"
|
2014-09-10 12:13:06 +02:00
|
|
|
},
|
2014-09-10 20:01:37 +02:00
|
|
|
inventory_image = "homedecor_trophy_inv.png",
|
2015-04-14 22:53:45 +02:00
|
|
|
groups = { snappy=3 },
|
2015-04-29 14:14:36 +02:00
|
|
|
walkable = false,
|
2015-04-14 22:53:45 +02:00
|
|
|
selection_box = tr_cbox,
|
2014-09-10 12:13:06 +02:00
|
|
|
})
|
2014-09-10 18:34:09 +02:00
|
|
|
|
2015-04-15 09:01:48 +02:00
|
|
|
local sb_cbox = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.4, -0.5, -0.5, 0.4, 0.375, 0.5 }
|
|
|
|
}
|
|
|
|
|
2015-01-24 00:34:02 +01:00
|
|
|
homedecor.register("sportbench", {
|
2017-01-24 21:43:20 +01:00
|
|
|
description = S("Sport bench"),
|
2015-04-15 09:01:48 +02:00
|
|
|
mesh = "homedecor_sport_bench.obj",
|
2014-09-10 18:34:09 +02:00
|
|
|
tiles = {
|
2015-04-28 05:48:02 +02:00
|
|
|
"homedecor_generic_metal_wrought_iron.png",
|
|
|
|
"homedecor_generic_metal_bright.png",
|
2017-01-25 10:22:28 +01:00
|
|
|
{ name = "homedecor_generic_metal.png", color = homedecor.color_black },
|
2022-05-03 21:21:14 +02:00
|
|
|
wool_black
|
2014-09-10 18:34:09 +02:00
|
|
|
},
|
2015-04-15 09:04:29 +02:00
|
|
|
inventory_image = "homedecor_sport_bench_inv.png",
|
2014-09-10 18:34:09 +02:00
|
|
|
groups = { snappy=3 },
|
2015-04-15 09:01:48 +02:00
|
|
|
selection_box = sb_cbox,
|
2015-04-29 14:14:36 +02:00
|
|
|
walkable = false,
|
2022-05-03 21:21:14 +02:00
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_wood_defaults",
|
|
|
|
},
|
2014-09-10 18:34:09 +02:00
|
|
|
})
|
|
|
|
|
2015-03-28 16:22:47 +01:00
|
|
|
local skate_cbox = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.5, -0.5, -0.15, 0.5, -0.3, 0.15 }
|
|
|
|
}
|
|
|
|
|
2015-01-24 00:34:02 +01:00
|
|
|
homedecor.register("skateboard", {
|
2015-03-28 16:22:47 +01:00
|
|
|
drawtype = "mesh",
|
|
|
|
mesh = "homedecor_skateboard.obj",
|
|
|
|
tiles = { "homedecor_skateboard.png" },
|
2014-09-10 19:49:20 +02:00
|
|
|
inventory_image = "homedecor_skateboard_inv.png",
|
2017-01-24 21:43:20 +01:00
|
|
|
description = S("Skateboard"),
|
2022-03-29 07:44:05 +02:00
|
|
|
use_texture_alpha = "clip",
|
2015-03-28 16:22:47 +01:00
|
|
|
groups = {snappy=3},
|
|
|
|
selection_box = skate_cbox,
|
2015-04-29 14:14:36 +02:00
|
|
|
walkable = false,
|
2022-05-03 21:21:14 +02:00
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_wood_defaults",
|
|
|
|
},
|
2014-09-10 19:49:20 +02:00
|
|
|
on_place = minetest.rotate_node
|
|
|
|
})
|
|
|
|
|
2020-08-05 00:07:13 +02:00
|
|
|
homedecor_misc.banister_materials = {
|
|
|
|
{
|
|
|
|
"wood",
|
2017-01-24 21:43:20 +01:00
|
|
|
S("wood"),
|
2022-05-03 21:21:14 +02:00
|
|
|
wood_tex,
|
|
|
|
wood_tex,
|
2015-04-27 09:04:22 +02:00
|
|
|
"group:wood",
|
|
|
|
"group:stick",
|
|
|
|
"",
|
|
|
|
""
|
|
|
|
},
|
2020-08-05 00:07:13 +02:00
|
|
|
{
|
|
|
|
"white_dark",
|
2017-01-24 21:43:20 +01:00
|
|
|
S("dark topped"),
|
2015-05-04 03:18:35 +02:00
|
|
|
homedecor.white_wood,
|
|
|
|
homedecor.dark_wood,
|
2015-04-27 09:04:22 +02:00
|
|
|
"group:wood",
|
|
|
|
"group:stick",
|
|
|
|
"dye:brown",
|
|
|
|
"dye:white"
|
|
|
|
},
|
2020-08-05 00:07:13 +02:00
|
|
|
{
|
|
|
|
"brass",
|
2017-01-24 21:43:20 +01:00
|
|
|
S("brass"),
|
2015-05-04 03:18:35 +02:00
|
|
|
homedecor.white_wood,
|
2015-04-28 05:48:02 +02:00
|
|
|
"homedecor_generic_metal_brass.png",
|
2015-04-27 09:04:22 +02:00
|
|
|
"technic:brass_ingot",
|
|
|
|
"group:stick",
|
|
|
|
"",
|
|
|
|
"dye:white"
|
|
|
|
},
|
2020-08-05 00:07:13 +02:00
|
|
|
{
|
|
|
|
"wrought_iron",
|
2017-01-24 21:43:20 +01:00
|
|
|
S("wrought iron"),
|
2015-04-28 05:48:02 +02:00
|
|
|
"homedecor_generic_metal_wrought_iron.png",
|
|
|
|
"homedecor_generic_metal_wrought_iron.png",
|
2015-04-27 09:04:22 +02:00
|
|
|
"homedecor:pole_wrought_iron",
|
|
|
|
"homedecor:pole_wrought_iron",
|
|
|
|
"",
|
|
|
|
""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-12 00:03:21 +02:00
|
|
|
for _, side in ipairs({"diagonal_left", "diagonal_right", "horizontal"}) do
|
2015-04-27 09:04:22 +02:00
|
|
|
|
2017-01-24 21:43:20 +01:00
|
|
|
local sidedesc = side:match("^diagonal") and S("diagonal") or S("horizontal")
|
|
|
|
|
2020-08-05 00:07:13 +02:00
|
|
|
for _, mat in ipairs(homedecor_misc.banister_materials) do
|
2015-04-27 09:04:22 +02:00
|
|
|
|
2017-01-24 21:43:20 +01:00
|
|
|
local name, matdesc, tile1, tile2 = unpack(mat)
|
2015-05-12 00:03:21 +02:00
|
|
|
local nodename = "banister_"..name.."_"..side
|
|
|
|
|
2015-04-27 09:04:22 +02:00
|
|
|
local cbox = {
|
|
|
|
type = "fixed",
|
2015-05-12 00:03:21 +02:00
|
|
|
fixed = { -9/16, -3/16, 5/16, 9/16, 24/16, 8/16 }
|
2015-04-27 09:04:22 +02:00
|
|
|
}
|
|
|
|
|
2015-05-12 00:03:21 +02:00
|
|
|
if side == "horizontal" then
|
|
|
|
cbox = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -8/16, -8/16, 5/16, 8/16, 8/16, 8/16 }
|
|
|
|
}
|
2015-04-27 09:04:22 +02:00
|
|
|
end
|
|
|
|
|
2018-09-13 00:49:51 +02:00
|
|
|
local def = {
|
2017-01-24 21:43:20 +01:00
|
|
|
description = S("Banister for Stairs (@1, @2)", matdesc, sidedesc),
|
2015-04-27 09:04:22 +02:00
|
|
|
mesh = "homedecor_banister_"..side..".obj",
|
|
|
|
tiles = {
|
2017-01-24 21:43:20 +01:00
|
|
|
tile1,
|
|
|
|
tile2,
|
2015-04-27 09:04:22 +02:00
|
|
|
},
|
2015-04-27 09:23:15 +02:00
|
|
|
inventory_image = "homedecor_banister_"..name.."_inv.png",
|
2015-04-27 09:04:22 +02:00
|
|
|
selection_box = cbox,
|
|
|
|
collision_box = cbox,
|
2018-09-13 00:49:51 +02:00
|
|
|
groups = { snappy = 3},
|
2015-05-12 00:03:21 +02:00
|
|
|
on_place = homedecor.place_banister,
|
|
|
|
drop = "homedecor:banister_"..name.."_horizontal",
|
2018-09-13 00:49:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if side ~= "horizontal" then
|
2019-04-21 17:25:21 +02:00
|
|
|
def.groups.not_in_creative_inventory = 1
|
2018-09-13 00:49:51 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
if name == "wood" then
|
2018-09-14 04:32:46 +02:00
|
|
|
def.palette = "unifieddyes_palette_greys.png"
|
2018-09-13 00:49:51 +02:00
|
|
|
def.airbrush_replacement_node = "homedecor:banister_wood_"..side.."_grey"
|
|
|
|
def.groups.ud_param2_colorable = 1
|
|
|
|
def.paramtype2 = "colorfacedir"
|
2019-07-18 08:16:46 +02:00
|
|
|
def.on_dig = unifieddyes.on_dig
|
2018-09-13 00:49:51 +02:00
|
|
|
end
|
|
|
|
homedecor.register(nodename, def)
|
|
|
|
|
|
|
|
if name == "wood" then
|
|
|
|
local nn = "homedecor:"..nodename
|
|
|
|
local def2 = table.copy(minetest.registered_items[nn])
|
|
|
|
def2.tiles = {
|
|
|
|
homedecor.white_wood,
|
|
|
|
homedecor.white_wood
|
|
|
|
}
|
|
|
|
def2.inventory_image = "homedecor_banister_wood_colored_inv.png"
|
2019-04-21 17:25:21 +02:00
|
|
|
def2.groups.not_in_creative_inventory = 1
|
2018-09-13 00:49:51 +02:00
|
|
|
|
|
|
|
unifieddyes.generate_split_palette_nodes(nn, def2, "homedecor:banister_"..name.."_horizontal")
|
|
|
|
end
|
2015-04-27 09:04:22 +02:00
|
|
|
end
|
|
|
|
end
|
2015-05-09 09:17:12 +02:00
|
|
|
|
|
|
|
homedecor.register("spiral_staircase", {
|
|
|
|
description = "Spiral Staircase",
|
|
|
|
mesh = "homedecor_spiral_staircase.obj",
|
2015-09-25 13:40:36 +02:00
|
|
|
wield_scale = { x=0.4, y=0.4, z=0.4 },
|
2015-05-09 09:17:12 +02:00
|
|
|
tiles = {
|
|
|
|
"homedecor_generic_metal_wrought_iron.png",
|
|
|
|
},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
2015-05-11 08:25:47 +02:00
|
|
|
fixed = { -1.5, -0.5, -1.5, 0.5, 2.5, 0.5 }
|
2015-05-09 09:17:12 +02:00
|
|
|
},
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5625, -0.5, -0.5625, -0.4375, 2.5, -0.4375}, -- NodeBox9
|
|
|
|
{-0.5, -0.5, -0.5, 0.5, -0.4375, 0}, -- NodeBox14
|
|
|
|
{-0.5, -0.125, -0.5, -0.25, -0.0625, 0.5}, -- NodeBox15
|
|
|
|
{-0.25, -0.125, -0.0625, 0, -0.0625, 0.5}, -- NodeBox16
|
|
|
|
{-1, 0.25, -0.5, -0.5, 0.3125, 0.5}, -- NodeBox17
|
|
|
|
{-1.5, 0.625, -0.5, -0.5, 0.6875, -0.25}, -- NodeBox18
|
|
|
|
{-1.5, 0.625, -0.25, -0.9375, 0.6875, 0}, -- NodeBox19
|
|
|
|
{-1.5, 1, -1, -0.5, 1.0625, -0.5}, -- NodeBox20
|
|
|
|
{-0.75, 1.375, -1.5, -0.5, 1.4375, -0.5}, -- NodeBox21
|
|
|
|
{-1, 1.375, -1.5, -0.75, 1.4375, -1}, -- NodeBox22
|
|
|
|
{-0.5, 1.75, -1.5, 0.0625, 1.8125, -0.5}, -- NodeBox23
|
|
|
|
{-0.5, 2.125, -0.8125, 0.5, 2.1875, -0.5}, -- NodeBox24
|
|
|
|
{-0.0625, 2.125, -1.0625, 0.5, 2.1875, -0.75}, -- NodeBox25
|
|
|
|
{-1.5, -0.125, 0.4375, 0.5, 1.625, 0.5}, -- NodeBox26
|
|
|
|
{-1.5, 1.5625, -1.5, -1.4375, 2.875, 0.5}, -- NodeBox27
|
|
|
|
{-1.5, 1.75, -1.5, 0.5, 3.3125, -1.4375}, -- NodeBox28
|
|
|
|
{0.4375, -0.5, -0.5, 0.5, 0.875, 0.5}, -- NodeBox29
|
|
|
|
{0.4375, 2.125, -1.5, 0.5, 3.3125, 0.5}, -- NodeBox30
|
|
|
|
}
|
|
|
|
},
|
2015-09-25 13:40:36 +02:00
|
|
|
groups = {cracky = 1},
|
2022-05-03 21:21:14 +02:00
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_wood_defaults",
|
|
|
|
},
|
2020-08-05 00:07:13 +02:00
|
|
|
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple or nil,
|
2015-05-11 08:25:47 +02:00
|
|
|
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
|
|
|
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
|
|
|
|
local leftx = homedecor.fdir_to_left[fdir+1][1]
|
|
|
|
local leftz = homedecor.fdir_to_left[fdir+1][2]
|
|
|
|
local revx = -homedecor.fdir_to_fwd[fdir+1][1]
|
|
|
|
local revz = -homedecor.fdir_to_fwd[fdir+1][2]
|
|
|
|
|
|
|
|
local corner1 = { x = pos.x + leftx + revx, y = pos.y, z = pos.z + leftz + revz}
|
|
|
|
local corner2 = { x = pos.x, y = pos.y + 2, z = pos.z }
|
|
|
|
|
|
|
|
local minp = { x = math.min(corner1.x, corner2.x),
|
|
|
|
y = math.min(corner1.y, corner2.y),
|
|
|
|
z = math.min(corner1.z, corner2.z) }
|
|
|
|
|
|
|
|
local maxp = { x = math.max(corner1.x, corner2.x),
|
|
|
|
y = math.max(corner1.y, corner2.y),
|
|
|
|
z = math.max(corner1.z, corner2.z) }
|
|
|
|
|
|
|
|
if #minetest.find_nodes_in_area(minp, maxp, "air") < 11 then
|
|
|
|
minetest.set_node(pos, {name = "air"})
|
2017-01-24 21:43:20 +01:00
|
|
|
minetest.chat_send_player(placer:get_player_name(), S("not enough space"))
|
2015-05-11 08:25:47 +02:00
|
|
|
return true
|
|
|
|
end
|
|
|
|
|
|
|
|
local belownode = minetest.get_node({ x = pos.x, y = pos.y - 1, z = pos.z })
|
|
|
|
|
|
|
|
if belownode and belownode.name == "homedecor:spiral_staircase" then
|
|
|
|
local newpos = { x = pos.x, y = pos.y + 2, z = pos.z }
|
|
|
|
minetest.set_node(pos, { name = "air" })
|
|
|
|
minetest.set_node(newpos, { name = "homedecor:spiral_staircase", param2 = belownode.param2 })
|
|
|
|
end
|
|
|
|
end
|
2015-05-09 09:17:12 +02:00
|
|
|
})
|
|
|
|
|
2015-05-11 08:25:47 +02:00
|
|
|
minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack, pointed_thing)
|
|
|
|
local belownode = minetest.get_node({ x = pos.x, y = pos.y - 1, z = pos.z })
|
|
|
|
|
2015-08-15 11:14:10 +02:00
|
|
|
if newnode.name ~= "homedecor:spiral_staircase"
|
|
|
|
and belownode
|
|
|
|
and belownode.name == "homedecor:spiral_staircase" then
|
2015-05-11 08:25:47 +02:00
|
|
|
minetest.set_node(pos, { name = "air" })
|
|
|
|
|
|
|
|
local newpos = { x = pos.x, y = pos.y + 2, z = pos.z }
|
|
|
|
local checknode = minetest.get_node(newpos)
|
|
|
|
|
|
|
|
if checknode and checknode.name == "air" then
|
|
|
|
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
|
|
|
|
minetest.set_node(newpos, { name = newnode.name, param2 = fdir })
|
|
|
|
else
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end)
|
2019-04-20 21:49:36 +02:00
|
|
|
|
|
|
|
minetest.register_node(":homedecor:tatami_mat", {
|
|
|
|
tiles = {
|
|
|
|
"homedecor_tatami.png",
|
|
|
|
"homedecor_tatami.png",
|
|
|
|
"homedecor_tatami.png",
|
|
|
|
"homedecor_tatami.png",
|
|
|
|
"homedecor_tatami.png",
|
|
|
|
"homedecor_tatami.png"
|
|
|
|
},
|
|
|
|
description = S("Japanese tatami"),
|
|
|
|
drawtype = "nodebox",
|
|
|
|
paramtype = "light",
|
|
|
|
groups = {snappy=3},
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
homedecor.register("dartboard", {
|
|
|
|
description = S("Dartboard"),
|
|
|
|
mesh = "homedecor_dartboard.obj",
|
|
|
|
tiles = { "homedecor_dartboard.png" },
|
|
|
|
inventory_image = "homedecor_dartboard_inv.png",
|
|
|
|
wield_image = "homedecor_dartboard_inv.png",
|
|
|
|
paramtype2 = "wallmounted",
|
|
|
|
walkable = false,
|
|
|
|
selection_box = {
|
|
|
|
type = "wallmounted",
|
|
|
|
},
|
|
|
|
groups = {choppy=2,dig_immediate=2,attached_node=1},
|
|
|
|
legacy_wallmounted = true,
|
2022-05-03 21:21:14 +02:00
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_wood_defaults",
|
|
|
|
},
|
2019-04-20 21:49:36 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
-- crafting
|
|
|
|
|
|
|
|
-- Crafting for homedecor mod (includes folding) by Vanessa Ezekowitz
|
|
|
|
--
|
|
|
|
-- Mostly my own code; overall template borrowed from game default
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
2020-08-05 00:07:13 +02:00
|
|
|
output = "homedecor:flower_pot_terracotta",
|
|
|
|
recipe = {
|
2022-05-03 21:21:14 +02:00
|
|
|
{ "homedecor:roof_tile_terracotta", homedecor.materials.dirt, "homedecor:roof_tile_terracotta" },
|
2020-08-05 00:07:13 +02:00
|
|
|
{ "homedecor:roof_tile_terracotta", "homedecor:roof_tile_terracotta", "homedecor:roof_tile_terracotta" },
|
|
|
|
},
|
2019-04-20 21:49:36 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
2020-08-05 00:07:13 +02:00
|
|
|
output = "homedecor:flower_pot_green",
|
|
|
|
recipe = {
|
|
|
|
{ "", "dye:dark_green", "" },
|
2022-05-03 21:21:14 +02:00
|
|
|
{ "basic_materials:plastic_sheet", homedecor.materials.dirt, "basic_materials:plastic_sheet" },
|
2020-08-05 00:07:13 +02:00
|
|
|
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
|
|
|
|
},
|
2019-04-20 21:49:36 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
2020-08-05 00:07:13 +02:00
|
|
|
output = "homedecor:flower_pot_black",
|
|
|
|
recipe = {
|
2022-05-03 21:21:14 +02:00
|
|
|
{ homedecor.materials.dye_black, homedecor.materials.dye_black, homedecor.materials.dye_black },
|
|
|
|
{ "basic_materials:plastic_sheet", homedecor.materials.dirt, "basic_materials:plastic_sheet" },
|
2020-08-05 00:07:13 +02:00
|
|
|
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
|
|
|
|
},
|
2019-04-20 21:49:36 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
|
|
|
type = "shapeless",
|
2020-08-05 00:07:13 +02:00
|
|
|
output = "homedecor:ceiling_paint 20",
|
|
|
|
recipe = {
|
2022-05-03 21:21:14 +02:00
|
|
|
homedecor.materials.dye_white,
|
|
|
|
homedecor.materials.dye_white,
|
|
|
|
homedecor.materials.sand,
|
|
|
|
homedecor.materials.water_bucket,
|
2020-08-05 00:07:13 +02:00
|
|
|
},
|
2022-05-03 21:21:14 +02:00
|
|
|
replacements = { { homedecor.materials.water_bucket,homedecor.materials.empty_bucket } }
|
2019-04-20 21:49:36 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
2020-08-05 00:07:13 +02:00
|
|
|
output = "homedecor:ceiling_tile 10",
|
|
|
|
recipe = {
|
2022-05-03 21:21:14 +02:00
|
|
|
{ "", homedecor.materials.dye_white, "" },
|
|
|
|
{ homedecor.materials.steel_ingot, homedecor.materials.stone, homedecor.materials.steel_ingot },
|
2020-08-05 00:07:13 +02:00
|
|
|
},
|
2019-04-20 21:49:36 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
2020-08-05 00:07:13 +02:00
|
|
|
output = "homedecor:drawer_small",
|
|
|
|
recipe = {
|
2022-05-03 21:21:14 +02:00
|
|
|
{ "group:wood", homedecor.materials.steel_ingot, "group:wood" },
|
2020-08-05 00:07:13 +02:00
|
|
|
},
|
2019-04-20 21:49:36 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
2020-08-05 00:07:13 +02:00
|
|
|
type = "fuel",
|
|
|
|
recipe = "homedecor:drawer_small",
|
|
|
|
burntime = 30,
|
2019-04-20 21:49:36 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
-- vertical poles/lampposts
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
2020-08-05 00:07:13 +02:00
|
|
|
output = "homedecor:pole_brass 4",
|
2019-04-20 21:49:36 +02:00
|
|
|
recipe = {
|
|
|
|
{ "", "basic_materials:brass_ingot", "" },
|
|
|
|
{ "", "basic_materials:brass_ingot", "" },
|
|
|
|
{ "", "basic_materials:brass_ingot", "" }
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
2020-08-05 00:07:13 +02:00
|
|
|
output = "homedecor:pole_wrought_iron 4",
|
|
|
|
recipe = {
|
2022-05-03 21:21:14 +02:00
|
|
|
{ homedecor.materials.iron_lump, },
|
|
|
|
{ homedecor.materials.iron_lump, },
|
|
|
|
{ homedecor.materials.iron_lump, },
|
2020-08-05 00:07:13 +02:00
|
|
|
},
|
2019-04-20 21:49:36 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
-- ===========================================================
|
|
|
|
-- Recipes that require materials from wool (cotton alternate)
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
|
|
|
type = "shapeless",
|
2020-08-05 00:07:13 +02:00
|
|
|
output = "homedecor:rug_small 8",
|
2019-04-20 21:49:36 +02:00
|
|
|
recipe = {
|
|
|
|
"wool:red",
|
|
|
|
"wool:yellow",
|
|
|
|
"wool:blue",
|
|
|
|
"wool:black"
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
|
|
|
output = "homedecor:rug_persian 8",
|
|
|
|
recipe = {
|
|
|
|
{ "", "wool:yellow", "" },
|
|
|
|
{ "wool:red", "wool:blue", "wool:red" },
|
|
|
|
{ "", "wool:yellow", "" }
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
-- cotton versions:
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
|
|
|
type = "shapeless",
|
2020-08-05 00:07:13 +02:00
|
|
|
output = "homedecor:rug_small 8",
|
2019-04-20 21:49:36 +02:00
|
|
|
recipe = {
|
2020-08-05 00:07:13 +02:00
|
|
|
"cotton:red",
|
|
|
|
"cotton:yellow",
|
|
|
|
"cotton:blue",
|
|
|
|
"cotton:black"
|
2019-04-20 21:49:36 +02:00
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
|
|
|
output = "homedecor:rug_persian 8",
|
|
|
|
recipe = {
|
|
|
|
{ "", "cotton:yellow", "" },
|
|
|
|
{ "cotton:red", "cotton:blue", "cotton:red" },
|
|
|
|
{ "", "cotton:yellow", "" }
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
-- fuel recipes for same
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "fuel",
|
|
|
|
recipe = "homedecor:rug_small",
|
|
|
|
burntime = 30,
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
|
|
|
type = "shapeless",
|
2020-08-05 00:07:13 +02:00
|
|
|
output = "homedecor:rug_large 2",
|
2019-04-20 21:49:36 +02:00
|
|
|
recipe = {
|
|
|
|
"homedecor:rug_small",
|
|
|
|
"homedecor:rug_small",
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "fuel",
|
|
|
|
recipe = "homedecor:rug_large",
|
|
|
|
burntime = 30,
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "fuel",
|
|
|
|
recipe = "homedecor:rug_persian",
|
|
|
|
burntime = 30,
|
|
|
|
})
|
|
|
|
|
|
|
|
-- more misc stuff here
|
|
|
|
|
|
|
|
minetest.register_craft({
|
2020-08-05 00:07:13 +02:00
|
|
|
output = "homedecor:fishtank",
|
|
|
|
recipe = {
|
|
|
|
{ "basic_materials:plastic_sheet", "homedecor:glowlight_small_cube", "basic_materials:plastic_sheet" },
|
2022-05-03 21:21:14 +02:00
|
|
|
{ homedecor.materials.glass_block, homedecor.materials.water_bucket, homedecor.materials.glass_block },
|
|
|
|
{ homedecor.materials.glass_block, "building_blocks:gravel_spread", homedecor.materials.glass_block },
|
2020-08-05 00:07:13 +02:00
|
|
|
},
|
2022-05-03 21:21:14 +02:00
|
|
|
replacements = { {homedecor.materials.water_bucket, homedecor.materials.empty_bucket} }
|
2019-04-20 21:49:36 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
2020-08-05 00:07:13 +02:00
|
|
|
output = "homedecor:cardboard_box 2",
|
|
|
|
recipe = {
|
2022-05-03 21:21:14 +02:00
|
|
|
{ homedecor.materials.paper, "", homedecor.materials.paper },
|
|
|
|
{ homedecor.materials.paper, homedecor.materials.paper, homedecor.materials.paper },
|
2020-08-05 00:07:13 +02:00
|
|
|
},
|
2019-04-20 21:49:36 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
2020-08-05 00:07:13 +02:00
|
|
|
output = "homedecor:cardboard_box_big 2",
|
|
|
|
recipe = {
|
2022-05-03 21:21:14 +02:00
|
|
|
{ homedecor.materials.paper, "", homedecor.materials.paper },
|
|
|
|
{ homedecor.materials.paper, "", homedecor.materials.paper },
|
|
|
|
{ homedecor.materials.paper, homedecor.materials.paper, homedecor.materials.paper },
|
2020-08-05 00:07:13 +02:00
|
|
|
},
|
2019-04-20 21:49:36 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
-- japanese walls and mat
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
2020-08-05 00:07:13 +02:00
|
|
|
output = "homedecor:japanese_wall_top",
|
|
|
|
recipe = {
|
2022-05-03 21:21:14 +02:00
|
|
|
{"group:stick", homedecor.materials.paper},
|
|
|
|
{ homedecor.materials.paper, "group:stick"},
|
|
|
|
{"group:stick", homedecor.materials.paper}
|
2020-08-05 00:07:13 +02:00
|
|
|
},
|
2019-04-20 21:49:36 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
2020-08-05 00:07:13 +02:00
|
|
|
output = "homedecor:japanese_wall_top",
|
|
|
|
recipe = {
|
2022-05-03 21:21:14 +02:00
|
|
|
{homedecor.materials.paper, "group:stick"},
|
|
|
|
{"group:stick", homedecor.materials.paper},
|
|
|
|
{homedecor.materials.paper, "group:stick"}
|
2020-08-05 00:07:13 +02:00
|
|
|
},
|
2019-04-20 21:49:36 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
2020-08-05 00:07:13 +02:00
|
|
|
output = "homedecor:japanese_wall_middle",
|
|
|
|
recipe = {
|
|
|
|
{"homedecor:japanese_wall_top"}
|
|
|
|
},
|
2019-04-20 21:49:36 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
2020-08-05 00:07:13 +02:00
|
|
|
output = "homedecor:japanese_wall_bottom",
|
|
|
|
recipe = {
|
|
|
|
{"homedecor:japanese_wall_middle"}
|
|
|
|
},
|
2019-04-20 21:49:36 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
2020-08-05 00:07:13 +02:00
|
|
|
output = "homedecor:japanese_wall_top",
|
|
|
|
recipe = {
|
|
|
|
{"homedecor:japanese_wall_bottom"}
|
|
|
|
},
|
2019-04-20 21:49:36 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
2020-08-05 00:07:13 +02:00
|
|
|
output = "homedecor:tatami_mat",
|
|
|
|
recipe = {
|
|
|
|
{"farming:wheat", "farming:wheat", "farming:wheat"}
|
|
|
|
},
|
2019-04-20 21:49:36 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
2020-08-05 00:07:13 +02:00
|
|
|
output = "homedecor:pool_table",
|
|
|
|
recipe = {
|
|
|
|
{ "wool:dark_green", "wool:dark_green", "wool:dark_green" },
|
|
|
|
{ "building_blocks:hardwood", "building_blocks:hardwood", "building_blocks:hardwood" },
|
|
|
|
{ "building_blocks:slab_hardwood", "", "building_blocks:slab_hardwood" }
|
|
|
|
},
|
2019-04-20 21:49:36 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "homedecor:dartboard",
|
|
|
|
recipe = {
|
2020-08-05 00:07:13 +02:00
|
|
|
{"dye:black", "basic_materials:plastic_sheet", "dye:white"},
|
|
|
|
{"basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet"},
|
|
|
|
{"dye:dark_green", "basic_materials:plastic_sheet", "dye:red"}
|
2019-04-20 21:49:36 +02:00
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "homedecor:piano",
|
|
|
|
recipe = {
|
|
|
|
{ "", "basic_materials:steel_wire", "building_blocks:hardwood" },
|
|
|
|
{ "basic_materials:plastic_strip", "basic_materials:steel_wire", "building_blocks:hardwood" },
|
|
|
|
{ "basic_materials:brass_ingot", "default:steelblock", "building_blocks:hardwood" }
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "homedecor:wall_shelf 2",
|
|
|
|
recipe = {
|
|
|
|
{ "homedecor:wood_table_small_square", "homedecor:curtainrod_wood", "homedecor:curtainrod_wood" },
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "homedecor:trophy 3",
|
|
|
|
recipe = {
|
|
|
|
{ "default:gold_ingot","","default:gold_ingot" },
|
|
|
|
{ "","default:gold_ingot","" },
|
|
|
|
{ "group:wood","default:gold_ingot","group:wood" }
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "homedecor:sportbench",
|
|
|
|
recipe = {
|
2020-02-28 17:39:35 +01:00
|
|
|
{ "stairs:slab_steelblock","basic_materials:steel_bar","stairs:slab_steelblock" },
|
2019-04-20 21:49:36 +02:00
|
|
|
{ "default:steel_ingot","wool:black","default:steel_ingot" },
|
|
|
|
{ "default:steel_ingot","wool:black","default:steel_ingot" }
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "homedecor:skateboard",
|
|
|
|
recipe = {
|
|
|
|
{ "dye:yellow","dye:green","dye:blue" },
|
|
|
|
{ "homedecor:wood_table_small_square","homedecor:wood_table_small_square","homedecor:wood_table_small_square" },
|
|
|
|
{ "default:steel_ingot","","default:steel_ingot" }
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "homedecor:spiral_staircase",
|
|
|
|
recipe = {
|
|
|
|
{ "default:steelblock", "homedecor:pole_wrought_iron", "" },
|
|
|
|
{ "", "homedecor:pole_wrought_iron", "default:steelblock" },
|
|
|
|
{ "default:steelblock", "homedecor:pole_wrought_iron", "" }
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craftitem(":homedecor:flower_pot_small", {
|
|
|
|
description = S("Small Flower Pot"),
|
|
|
|
inventory_image = "homedecor_flowerpot_small_inv.png"
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
|
|
|
output = "homedecor:flower_pot_small",
|
|
|
|
recipe = {
|
2020-08-05 00:07:13 +02:00
|
|
|
{ "default:clay_brick", "", "default:clay_brick" },
|
|
|
|
{ "", "default:clay_brick", "" }
|
2019-04-20 21:49:36 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft( {
|
|
|
|
output = "homedecor:flower_pot_small 3",
|
|
|
|
recipe = { { "homedecor:flower_pot_terracotta" } }
|
|
|
|
})
|
|
|
|
|
2020-08-05 00:07:13 +02:00
|
|
|
for i in ipairs(homedecor_misc.banister_materials) do
|
2019-04-20 21:49:36 +02:00
|
|
|
|
2020-08-05 00:07:13 +02:00
|
|
|
local name = homedecor_misc.banister_materials[i][1]
|
|
|
|
local topmat = homedecor_misc.banister_materials[i][5]
|
|
|
|
local vertmat = homedecor_misc.banister_materials[i][6]
|
|
|
|
local dye1 = homedecor_misc.banister_materials[i][7]
|
|
|
|
local dye2 = homedecor_misc.banister_materials[i][8]
|
2019-04-20 21:49:36 +02:00
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "homedecor:banister_"..name.."_horizontal 2",
|
|
|
|
recipe = {
|
|
|
|
{ topmat, "", dye1 },
|
|
|
|
{ vertmat, topmat, "" },
|
|
|
|
{ dye2, vertmat, topmat }
|
|
|
|
},
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
unifieddyes.register_color_craft({
|
|
|
|
output = "",
|
|
|
|
palette = "split",
|
|
|
|
neutral_node = "homedecor:banister_wood_horizontal",
|
|
|
|
type = "shapeless",
|
|
|
|
output_prefix = "homedecor:banister_wood_horizontal_",
|
|
|
|
output_suffix = "",
|
|
|
|
recipe = {
|
|
|
|
"NEUTRAL_NODE",
|
|
|
|
"MAIN_DYE",
|
|
|
|
}
|
|
|
|
})
|
2019-05-25 01:08:13 +02:00
|
|
|
|
|
|
|
-- Japanese-style wood/paper wall pieces and door
|
|
|
|
|
|
|
|
local jp_cbox = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.5, -0.5, 0, 0.5, 0.5, 0.0625},
|
|
|
|
}
|
|
|
|
|
|
|
|
minetest.register_node(":homedecor:japanese_wall_top", {
|
|
|
|
description = S("Japanese wall (top)"),
|
|
|
|
drawtype = "mesh",
|
|
|
|
mesh = "homedecor_wall_japanese_top.obj",
|
|
|
|
tiles = {
|
|
|
|
homedecor.lux_wood,
|
|
|
|
"homedecor_japanese_paper.png"
|
|
|
|
},
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
groups = {snappy=3},
|
|
|
|
selection_box = jp_cbox,
|
|
|
|
collision_box = jp_cbox,
|
2022-05-03 21:21:14 +02:00
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_wood_defaults",
|
|
|
|
},
|
2019-05-25 01:08:13 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node(":homedecor:japanese_wall_middle", {
|
|
|
|
description = S("Japanese wall"),
|
|
|
|
drawtype = "mesh",
|
|
|
|
mesh = "homedecor_wall_japanese_middle.obj",
|
|
|
|
tiles = {
|
|
|
|
homedecor.lux_wood,
|
|
|
|
"homedecor_japanese_paper.png"
|
|
|
|
},
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
groups = {snappy=3},
|
|
|
|
selection_box = jp_cbox,
|
|
|
|
collision_box = jp_cbox,
|
2022-05-03 21:21:14 +02:00
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_wood_defaults",
|
|
|
|
},
|
2019-05-25 01:08:13 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node(":homedecor:japanese_wall_bottom", {
|
|
|
|
description = S("Japanese wall (bottom)"),
|
|
|
|
drawtype = "mesh",
|
|
|
|
mesh = "homedecor_wall_japanese_bottom.obj",
|
|
|
|
tiles = {
|
|
|
|
homedecor.lux_wood,
|
|
|
|
"homedecor_japanese_paper.png"
|
|
|
|
},
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
groups = {snappy=3},
|
|
|
|
selection_box = jp_cbox,
|
|
|
|
collision_box = jp_cbox,
|
2022-05-03 21:21:14 +02:00
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_wood_defaults",
|
|
|
|
},
|
2019-05-25 01:08:13 +02:00
|
|
|
})
|