forked from mtcontrib/homedecor_modpack
Opti. code
This commit is contained in:
parent
2d0d6c53f9
commit
546f8b501c
|
@ -1,48 +1,32 @@
|
||||||
homedecor.register("analog_clock_plastic", {
|
local clock_cbox = {
|
||||||
description = "Analog clock (plastic)",
|
type = "fixed",
|
||||||
mesh = "homedecor_analog_clock.obj",
|
fixed = {
|
||||||
tiles = { "homedecor_analog_clock_plastic.png" },
|
{ -8/32, -3/32, 14/32, 8/32, 3/32, 16/32 },
|
||||||
inventory_image = "homedecor_analog_clock_plastic_inv.png",
|
{ -7/32, -5/32, 14/32, 7/32, 5/32, 16/32 },
|
||||||
wield_image = "homedecor_analog_clock_plastic_inv.png",
|
{ -6/32, -6/32, 14/32, 6/32, 6/32, 16/32 },
|
||||||
collision_box = {
|
{ -5/32, -7/32, 14/32, 5/32, 7/32, 16/32 },
|
||||||
type = "fixed",
|
{ -3/32, -8/32, 14/32, 3/32, 8/32, 16/32 }
|
||||||
fixed = {
|
}
|
||||||
{ -8/32, -3/32, 14/32, 8/32, 3/32, 16/32 },
|
}
|
||||||
{ -7/32, -5/32, 14/32, 7/32, 5/32, 16/32 },
|
|
||||||
{ -6/32, -6/32, 14/32, 6/32, 6/32, 16/32 },
|
|
||||||
{ -5/32, -7/32, 14/32, 5/32, 7/32, 16/32 },
|
|
||||||
{ -3/32, -8/32, 14/32, 3/32, 8/32, 16/32 }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = { -8/32, -8/32, 14/32, 8/32, 8/32, 16/32 }
|
|
||||||
},
|
|
||||||
groups = {snappy=3},
|
|
||||||
})
|
|
||||||
|
|
||||||
homedecor.register("analog_clock_wood", {
|
local clock_sbox = {
|
||||||
description = "Analog clock (wood)",
|
type = "fixed",
|
||||||
mesh = "homedecor_analog_clock.obj",
|
fixed = { -8/32, -8/32, 14/32, 8/32, 8/32, 16/32 }
|
||||||
tiles = { "homedecor_analog_clock_wood.png" },
|
}
|
||||||
inventory_image = "homedecor_analog_clock_wood_inv.png",
|
|
||||||
wield_image = "homedecor_analog_clock_wood_inv.png",
|
local materials = {"plastic", "wood"}
|
||||||
collision_box = {
|
|
||||||
type = "fixed",
|
for _, m in ipairs(materials) do
|
||||||
fixed = {
|
homedecor.register("analog_clock_"..m, {
|
||||||
{ -8/32, -3/32, 14/32, 8/32, 3/32, 16/32 },
|
description = "Analog clock ("..m..")",
|
||||||
{ -7/32, -5/32, 14/32, 7/32, 5/32, 16/32 },
|
mesh = "homedecor_analog_clock.obj",
|
||||||
{ -6/32, -6/32, 14/32, 6/32, 6/32, 16/32 },
|
tiles = { "homedecor_analog_clock_"..m..".png" },
|
||||||
{ -5/32, -7/32, 14/32, 5/32, 7/32, 16/32 },
|
inventory_image = "homedecor_analog_clock_"..m.."_inv.png",
|
||||||
{ -3/32, -8/32, 14/32, 3/32, 8/32, 16/32 }
|
collision_box = clock_cbox,
|
||||||
}
|
selection_box = clock_sbox,
|
||||||
},
|
groups = {snappy=3},
|
||||||
selection_box = {
|
})
|
||||||
type = "fixed",
|
end
|
||||||
fixed = { -8/32, -8/32, 14/32, 8/32, 8/32, 16/32 }
|
|
||||||
},
|
|
||||||
groups = {snappy=3},
|
|
||||||
})
|
|
||||||
|
|
||||||
homedecor.register("digital_clock", {
|
homedecor.register("digital_clock", {
|
||||||
description = "Digital clock",
|
description = "Digital clock",
|
||||||
|
|
|
@ -1281,7 +1281,7 @@ minetest.register_craft({
|
||||||
-- Wrought-iron wall latern
|
-- Wrought-iron wall latern
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "homedecor:wall_lantern 4",
|
output = "homedecor:ground_lantern",
|
||||||
recipe = {
|
recipe = {
|
||||||
{ "default:iron_lump", "default:iron_lump", "default:iron_lump" },
|
{ "default:iron_lump", "default:iron_lump", "default:iron_lump" },
|
||||||
{ "default:iron_lump", "default:torch", "default:iron_lump" },
|
{ "default:iron_lump", "default:torch", "default:iron_lump" },
|
||||||
|
|
|
@ -15,22 +15,15 @@ if signs_modpath then
|
||||||
end
|
end
|
||||||
|
|
||||||
local S = homedecor.gettext
|
local S = homedecor.gettext
|
||||||
|
local materials = {"brass", "wrought_iron"}
|
||||||
|
|
||||||
homedecor.register("fence_brass", {
|
for _, m in ipairs(materials) do
|
||||||
description = S("Brass Fence/railing"),
|
|
||||||
drawtype = "fencelike",
|
|
||||||
tiles = {"homedecor_tile_brass.png"},
|
|
||||||
inventory_image = "homedecor_fence_brass.png",
|
|
||||||
selection_box = homedecor.nodebox.bar_y(1/7),
|
|
||||||
groups = {snappy=3},
|
|
||||||
sounds = default.node_sound_wood_defaults(),
|
|
||||||
})
|
|
||||||
|
|
||||||
homedecor.register("fence_wrought_iron", {
|
homedecor.register("fence_"..m, {
|
||||||
description = S("Wrought Iron Fence/railing"),
|
description = S("Fence/railing ("..m..")"),
|
||||||
drawtype = "fencelike",
|
drawtype = "fencelike",
|
||||||
tiles = {"homedecor_tile_wrought_iron.png"},
|
tiles = {"homedecor_tile_"..m..".png"},
|
||||||
inventory_image = "homedecor_fence_wrought_iron.png",
|
inventory_image = "homedecor_fence_"..m..".png",
|
||||||
selection_box = homedecor.nodebox.bar_y(1/7),
|
selection_box = homedecor.nodebox.bar_y(1/7),
|
||||||
groups = {snappy=3},
|
groups = {snappy=3},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
@ -38,17 +31,17 @@ homedecor.register("fence_wrought_iron", {
|
||||||
|
|
||||||
-- brass/wrought iron with signs:
|
-- brass/wrought iron with signs:
|
||||||
|
|
||||||
homedecor.register("fence_brass_with_sign", {
|
homedecor.register("fence_"..m.."_with_sign", {
|
||||||
description = S("Brass Fence/railing with sign"),
|
description = S("Fence/railing with sign ("..m..")"),
|
||||||
tiles = {
|
tiles = {
|
||||||
"homedecor_sign_brass_post_top.png",
|
"homedecor_sign_"..m.."_post_top.png",
|
||||||
"homedecor_sign_brass_post_bottom.png",
|
"homedecor_sign_"..m.."_post_bottom.png",
|
||||||
"homedecor_sign_brass_post_side.png",
|
"homedecor_sign_"..m.."_post_side.png",
|
||||||
"homedecor_sign_brass_post_side.png",
|
"homedecor_sign_"..m.."_post_side.png",
|
||||||
"homedecor_sign_brass_post_back.png",
|
"homedecor_sign_"..m.."_post_back.png",
|
||||||
"homedecor_sign_brass_post_front.png",
|
"homedecor_sign_"..m.."_post_front.png",
|
||||||
},
|
},
|
||||||
wield_image = "homedecor_sign_brass_post.png",
|
wield_image = "homedecor_sign_"..m.."_post.png",
|
||||||
node_box = sign_post_model,
|
node_box = sign_post_model,
|
||||||
groups = {snappy=3,not_in_creative_inventory=1},
|
groups = {snappy=3,not_in_creative_inventory=1},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
@ -57,34 +50,12 @@ homedecor.register("fence_brass_with_sign", {
|
||||||
max_items = 2,
|
max_items = 2,
|
||||||
items = {
|
items = {
|
||||||
{ items = { "default:sign_wall" }},
|
{ items = { "default:sign_wall" }},
|
||||||
{ items = { "homedecor:fence_brass" }},
|
{ items = { "homedecor:fence_"..m }},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
homedecor.register("fence_wrought_iron_with_sign", {
|
end
|
||||||
description = S("Wrought Iron Fence/railing with sign"),
|
|
||||||
tiles = {
|
|
||||||
"homedecor_sign_wrought_iron_post_top.png",
|
|
||||||
"homedecor_sign_wrought_iron_post_bottom.png",
|
|
||||||
"homedecor_sign_wrought_iron_post_side.png",
|
|
||||||
"homedecor_sign_wrought_iron_post_side.png",
|
|
||||||
"homedecor_sign_wrought_iron_post_back.png",
|
|
||||||
"homedecor_sign_wrought_iron_post_front.png",
|
|
||||||
},
|
|
||||||
wield_image = "homedecor_sign_wrought_iron_post.png",
|
|
||||||
node_box = sign_post_model,
|
|
||||||
groups = {snappy=3,not_in_creative_inventory=1},
|
|
||||||
sounds = default.node_sound_wood_defaults(),
|
|
||||||
sunlight_propagates = true,
|
|
||||||
drop = {
|
|
||||||
max_items = 2,
|
|
||||||
items = {
|
|
||||||
{ items = { "default:sign_wall" }},
|
|
||||||
{ items = { "homedecor:fence_wrought_iron" }},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- other types of fences
|
-- other types of fences
|
||||||
|
|
||||||
|
|
|
@ -448,28 +448,34 @@ homedecor.register("grandfather_clock_top", {
|
||||||
selection_box = homedecor.nodebox.null,
|
selection_box = homedecor.nodebox.null,
|
||||||
})
|
})
|
||||||
|
|
||||||
homedecor.register("office_chair_upscale", {
|
local ofchairs_sbox = {
|
||||||
description = "Office chair (upscale)",
|
|
||||||
drawtype = "mesh",
|
|
||||||
tiles = { "homedecor_office_chair_upscale.png" },
|
|
||||||
mesh = "homedecor_office_chair_upscale.obj",
|
|
||||||
groups = { snappy = 3 },
|
|
||||||
sounds = default.node_sound_wood_defaults(),
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = { -8/16, -8/16, -8/16, 8/16, 29/32, 8/16 }
|
fixed = { -8/16, -8/16, -8/16, 8/16, 29/32, 8/16 }
|
||||||
},
|
}
|
||||||
collision_box = {
|
|
||||||
|
local ofchairs_cbox = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{ -5/16, 1/16, -7/16, 5/16, 4/16, 7/16 }, -- seat
|
{ -5/16, 1/16, -7/16, 5/16, 4/16, 7/16 }, -- seat
|
||||||
{ -5/16, 4/16, 4/16, 5/16, 29/32, 15/32 }, -- seatback
|
{ -5/16, 4/16, 4/16, 5/16, 29/32, 15/32 }, -- seatback
|
||||||
{ -7/16, 1/16, -9/32, -5/16, 7/16, 6/16 }, -- right arm
|
|
||||||
{ 5/16, 1/16, -9/32, 7/16, 7/16, 6/16 }, -- left arm
|
|
||||||
{ -1/16, -11/32, -1/16, 1/16, 1/16, 1/16 }, -- cylinder
|
{ -1/16, -11/32, -1/16, 1/16, 1/16, 1/16 }, -- cylinder
|
||||||
{ -8/16, -8/16, -8/16, 8/16, -11/32, 8/16 } -- legs/wheels
|
{ -8/16, -8/16, -8/16, 8/16, -11/32, 8/16 } -- legs/wheels
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
|
||||||
|
local ofchairs = {"basic", "upscale"}
|
||||||
|
|
||||||
|
for _, c in ipairs(ofchairs) do
|
||||||
|
|
||||||
|
homedecor.register("office_chair_"..c, {
|
||||||
|
description = "Office chair ("..c..")",
|
||||||
|
drawtype = "mesh",
|
||||||
|
tiles = { "homedecor_office_chair_"..c..".png" },
|
||||||
|
mesh = "homedecor_office_chair_"..c..".obj",
|
||||||
|
groups = { snappy = 3 },
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
selection_box = ofchairs_sbox,
|
||||||
|
collision_box = ofchairs_cbox,
|
||||||
expand = { top = "air" },
|
expand = { top = "air" },
|
||||||
on_rightclick = function(pos, node, clicker)
|
on_rightclick = function(pos, node, clicker)
|
||||||
pos.y = pos.y+0.14 -- player's sit position.
|
pos.y = pos.y+0.14 -- player's sit position.
|
||||||
|
@ -477,32 +483,7 @@ homedecor.register("office_chair_upscale", {
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
homedecor.register("office_chair_basic", {
|
end
|
||||||
description = "Office chair (basic)",
|
|
||||||
drawtype = "mesh",
|
|
||||||
tiles = { "homedecor_office_chair_basic.png" },
|
|
||||||
mesh = "homedecor_office_chair_basic.obj",
|
|
||||||
groups = { snappy = 3 },
|
|
||||||
sounds = default.node_sound_wood_defaults(),
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = { -8/16, -8/16, -8/16, 8/16, 29/32, 8/16 }
|
|
||||||
},
|
|
||||||
collision_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{ -5/16, 1/16, -7/16, 5/16, 4/16, 7/16 }, -- seat
|
|
||||||
{ -5/16, 4/16, 4/16, 5/16, 29/32, 15/32 }, -- seatback
|
|
||||||
{ -1/16, -11/32, -1/16, 1/16, 1/16, 1/16 }, -- cylinder
|
|
||||||
{ -8/16, -8/16, -8/16, 8/16, -11/32, 8/16 } -- legs/wheels
|
|
||||||
}
|
|
||||||
},
|
|
||||||
expand = { top = "air" },
|
|
||||||
on_rightclick = function(pos, node, clicker)
|
|
||||||
pos.y = pos.y+0.14 -- player's sit position.
|
|
||||||
homedecor.sit_exec(pos, node, clicker)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Aliases for 3dforniture mod.
|
-- Aliases for 3dforniture mod.
|
||||||
|
|
||||||
|
|
|
@ -377,55 +377,13 @@ homedecor.register("dishwasher", {
|
||||||
groups = { snappy = 3 },
|
groups = { snappy = 3 },
|
||||||
})
|
})
|
||||||
|
|
||||||
homedecor.register("dishwasher_wood", {
|
local materials = {"granite", "marble", "steel", "wood"}
|
||||||
description = "Dishwasher",
|
|
||||||
tiles = {
|
|
||||||
"homedecor_kitchen_cabinet_top.png",
|
|
||||||
"homedecor_dishwasher_bottom.png",
|
|
||||||
"homedecor_dishwasher_sides.png",
|
|
||||||
"homedecor_dishwasher_sides.png^[transformFX",
|
|
||||||
"homedecor_dishwasher_back.png",
|
|
||||||
"homedecor_dishwasher_front.png"
|
|
||||||
},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
groups = { snappy = 3 },
|
|
||||||
})
|
|
||||||
|
|
||||||
homedecor.register("dishwasher_steel", {
|
for _, m in ipairs(materials) do
|
||||||
description = "Dishwasher",
|
homedecor.register("dishwasher_"..m, {
|
||||||
|
description = "Dishwasher ("..m..")",
|
||||||
tiles = {
|
tiles = {
|
||||||
"homedecor_kitchen_cabinet_top_steel.png",
|
"homedecor_kitchen_cabinet_top_"..m..".png",
|
||||||
"homedecor_dishwasher_bottom.png",
|
|
||||||
"homedecor_dishwasher_sides.png",
|
|
||||||
"homedecor_dishwasher_sides.png^[transformFX",
|
|
||||||
"homedecor_dishwasher_back.png",
|
|
||||||
"homedecor_dishwasher_front.png"
|
|
||||||
},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
groups = { snappy = 3 },
|
|
||||||
})
|
|
||||||
|
|
||||||
homedecor.register("dishwasher_marble", {
|
|
||||||
description = "Dishwasher",
|
|
||||||
tiles = {
|
|
||||||
"homedecor_kitchen_cabinet_top_marble.png",
|
|
||||||
"homedecor_dishwasher_bottom.png",
|
|
||||||
"homedecor_dishwasher_sides.png",
|
|
||||||
"homedecor_dishwasher_sides.png^[transformFX",
|
|
||||||
"homedecor_dishwasher_back.png",
|
|
||||||
"homedecor_dishwasher_front.png"
|
|
||||||
},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
groups = { snappy = 3 },
|
|
||||||
})
|
|
||||||
|
|
||||||
homedecor.register("dishwasher_granite", {
|
|
||||||
description = "Dishwasher",
|
|
||||||
tiles = {
|
|
||||||
"homedecor_kitchen_cabinet_top_granite.png",
|
|
||||||
"homedecor_dishwasher_bottom.png",
|
"homedecor_dishwasher_bottom.png",
|
||||||
"homedecor_dishwasher_sides.png",
|
"homedecor_dishwasher_sides.png",
|
||||||
"homedecor_dishwasher_sides.png^[transformFX",
|
"homedecor_dishwasher_sides.png^[transformFX",
|
||||||
|
@ -436,3 +394,4 @@ homedecor.register("dishwasher_granite", {
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = { snappy = 3 },
|
groups = { snappy = 3 },
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
|
@ -59,7 +59,6 @@ for i in ipairs(colors) do
|
||||||
minetest.add_node(pos, {name = "homedecor:glowlight_small_cube_"..color, param2 = 20})
|
minetest.add_node(pos, {name = "homedecor:glowlight_small_cube_"..color, param2 = 20})
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end
|
|
||||||
|
|
||||||
local glowlight_nodebox = {
|
local glowlight_nodebox = {
|
||||||
half = homedecor.nodebox.slab_y(1/2),
|
half = homedecor.nodebox.slab_y(1/2),
|
||||||
|
@ -70,17 +69,15 @@ local glowlight_nodebox = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Yellow
|
homedecor.register("glowlight_half_"..color, {
|
||||||
|
description = S("Thick Glowlight ("..color..")"),
|
||||||
homedecor.register("glowlight_half_yellow", {
|
|
||||||
description = S("Yellow Glowlight (thick)"),
|
|
||||||
tiles = {
|
tiles = {
|
||||||
'homedecor_glowlight_yellow_top.png',
|
"homedecor_glowlight_"..color.."_top.png",
|
||||||
'homedecor_glowlight_yellow_bottom.png',
|
"homedecor_glowlight_"..color.."_bottom.png",
|
||||||
'homedecor_glowlight_thick_yellow_sides.png',
|
"homedecor_glowlight_thick_"..color.."_sides.png",
|
||||||
'homedecor_glowlight_thick_yellow_sides.png',
|
"homedecor_glowlight_thick_"..color.."_sides.png",
|
||||||
'homedecor_glowlight_thick_yellow_sides.png',
|
"homedecor_glowlight_thick_"..color.."_sides.png",
|
||||||
'homedecor_glowlight_thick_yellow_sides.png'
|
"homedecor_glowlight_thick_"..color.."_sides.png"
|
||||||
},
|
},
|
||||||
selection_box = glowlight_nodebox.half,
|
selection_box = glowlight_nodebox.half,
|
||||||
node_box = glowlight_nodebox.half,
|
node_box = glowlight_nodebox.half,
|
||||||
|
@ -90,53 +87,15 @@ homedecor.register("glowlight_half_yellow", {
|
||||||
on_place = minetest.rotate_node
|
on_place = minetest.rotate_node
|
||||||
})
|
})
|
||||||
|
|
||||||
homedecor.register("glowlight_quarter_yellow", {
|
homedecor.register("glowlight_quarter_"..color, {
|
||||||
description = S("Yellow Glowlight (thin)"),
|
description = S("Thin Glowlight ("..color..")"),
|
||||||
tiles = {
|
tiles = {
|
||||||
'homedecor_glowlight_yellow_top.png',
|
"homedecor_glowlight_"..color.."_top.png",
|
||||||
'homedecor_glowlight_yellow_bottom.png',
|
"homedecor_glowlight_"..color.."_bottom.png",
|
||||||
'homedecor_glowlight_thin_yellow_sides.png',
|
"homedecor_glowlight_thin_"..color.."_sides.png",
|
||||||
'homedecor_glowlight_thin_yellow_sides.png',
|
"homedecor_glowlight_thin_"..color.."_sides.png",
|
||||||
'homedecor_glowlight_thin_yellow_sides.png',
|
"homedecor_glowlight_thin_"..color.."_sides.png",
|
||||||
'homedecor_glowlight_thin_yellow_sides.png'
|
"homedecor_glowlight_thin_"..color.."_sides.png"
|
||||||
},
|
|
||||||
selection_box = glowlight_nodebox.quarter,
|
|
||||||
node_box = glowlight_nodebox.quarter,
|
|
||||||
groups = { snappy = 3 },
|
|
||||||
light_source = LIGHT_MAX-1,
|
|
||||||
sounds = default.node_sound_wood_defaults(),
|
|
||||||
on_place = minetest.rotate_node
|
|
||||||
})
|
|
||||||
|
|
||||||
-- White
|
|
||||||
|
|
||||||
homedecor.register("glowlight_half_white", {
|
|
||||||
description = S("White Glowlight (thick)"),
|
|
||||||
tiles = {
|
|
||||||
'homedecor_glowlight_white_top.png',
|
|
||||||
'homedecor_glowlight_white_bottom.png',
|
|
||||||
'homedecor_glowlight_thick_white_sides.png',
|
|
||||||
'homedecor_glowlight_thick_white_sides.png',
|
|
||||||
'homedecor_glowlight_thick_white_sides.png',
|
|
||||||
'homedecor_glowlight_thick_white_sides.png'
|
|
||||||
},
|
|
||||||
selection_box = glowlight_nodebox.half,
|
|
||||||
node_box = glowlight_nodebox.half,
|
|
||||||
groups = { snappy = 3 },
|
|
||||||
light_source = LIGHT_MAX,
|
|
||||||
sounds = default.node_sound_wood_defaults(),
|
|
||||||
on_place = minetest.rotate_node
|
|
||||||
})
|
|
||||||
|
|
||||||
homedecor.register("glowlight_quarter_white", {
|
|
||||||
description = S("White Glowlight (thin)"),
|
|
||||||
tiles = {
|
|
||||||
'homedecor_glowlight_white_top.png',
|
|
||||||
'homedecor_glowlight_white_bottom.png',
|
|
||||||
'homedecor_glowlight_thin_white_sides.png',
|
|
||||||
'homedecor_glowlight_thin_white_sides.png',
|
|
||||||
'homedecor_glowlight_thin_white_sides.png',
|
|
||||||
'homedecor_glowlight_thin_white_sides.png'
|
|
||||||
},
|
},
|
||||||
selection_box = glowlight_nodebox.quarter,
|
selection_box = glowlight_nodebox.quarter,
|
||||||
node_box = glowlight_nodebox.quarter,
|
node_box = glowlight_nodebox.quarter,
|
||||||
|
@ -148,15 +107,15 @@ homedecor.register("glowlight_quarter_white", {
|
||||||
|
|
||||||
-- Glowlight "cubes"
|
-- Glowlight "cubes"
|
||||||
|
|
||||||
homedecor.register("glowlight_small_cube_yellow", {
|
homedecor.register("glowlight_small_cube_"..color, {
|
||||||
description = S("Yellow Glowlight (small cube)"),
|
description = S("Small Glowlight Cube ("..color..")"),
|
||||||
tiles = {
|
tiles = {
|
||||||
'homedecor_glowlight_cube_yellow_tb.png',
|
"homedecor_glowlight_cube_"..color.."_tb.png",
|
||||||
'homedecor_glowlight_cube_yellow_tb.png',
|
"homedecor_glowlight_cube_"..color.."_tb.png",
|
||||||
'homedecor_glowlight_cube_yellow_sides.png',
|
"homedecor_glowlight_cube_"..color.."_sides.png",
|
||||||
'homedecor_glowlight_cube_yellow_sides.png',
|
"homedecor_glowlight_cube_"..color.."_sides.png",
|
||||||
'homedecor_glowlight_cube_yellow_sides.png',
|
"homedecor_glowlight_cube_"..color.."_sides.png",
|
||||||
'homedecor_glowlight_cube_yellow_sides.png'
|
"homedecor_glowlight_cube_"..color.."_sides.png"
|
||||||
},
|
},
|
||||||
selection_box = glowlight_nodebox.small_cube,
|
selection_box = glowlight_nodebox.small_cube,
|
||||||
node_box = glowlight_nodebox.small_cube,
|
node_box = glowlight_nodebox.small_cube,
|
||||||
|
@ -166,23 +125,7 @@ homedecor.register("glowlight_small_cube_yellow", {
|
||||||
on_place = minetest.rotate_node
|
on_place = minetest.rotate_node
|
||||||
})
|
})
|
||||||
|
|
||||||
homedecor.register("glowlight_small_cube_white", {
|
end
|
||||||
description = S("White Glowlight (small cube)"),
|
|
||||||
tiles = {
|
|
||||||
'homedecor_glowlight_cube_white_tb.png',
|
|
||||||
'homedecor_glowlight_cube_white_tb.png',
|
|
||||||
'homedecor_glowlight_cube_white_sides.png',
|
|
||||||
'homedecor_glowlight_cube_white_sides.png',
|
|
||||||
'homedecor_glowlight_cube_white_sides.png',
|
|
||||||
'homedecor_glowlight_cube_white_sides.png'
|
|
||||||
},
|
|
||||||
selection_box = glowlight_nodebox.small_cube,
|
|
||||||
node_box = glowlight_nodebox.small_cube,
|
|
||||||
groups = { snappy = 3 },
|
|
||||||
light_source = LIGHT_MAX-1,
|
|
||||||
sounds = default.node_sound_wood_defaults(),
|
|
||||||
on_place = minetest.rotate_node
|
|
||||||
})
|
|
||||||
|
|
||||||
homedecor.register("plasma_lamp", {
|
homedecor.register("plasma_lamp", {
|
||||||
description = "Plasma Lamp",
|
description = "Plasma Lamp",
|
||||||
|
@ -267,21 +210,40 @@ homedecor.register("oil_lamp", {
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
local wl_cbox = {
|
local gl_cbox = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = { -0.25, -0.5, -0.25, 0.25, 0.45, 0.25 },
|
fixed = { -0.25, -0.5, -0.25, 0.25, 0.45, 0.25 },
|
||||||
}
|
}
|
||||||
|
|
||||||
homedecor.register("wall_lantern", {
|
minetest.register_alias("homedecor:wall_lantern", "homedecor:ground_lantern")
|
||||||
description = S("Wall Lantern"),
|
|
||||||
mesh = "homedecor_wall_lantern.obj",
|
homedecor.register("ground_lantern", {
|
||||||
tiles = {"homedecor_wall_lantern.png"},
|
description = S("Ground Lantern"),
|
||||||
inventory_image = "homedecor_wall_lantern_inv.png",
|
mesh = "homedecor_ground_lantern.obj",
|
||||||
wield_image = "homedecor_wall_lantern_inv.png",
|
tiles = {"homedecor_ground_lantern.png"},
|
||||||
|
inventory_image = "homedecor_ground_lantern_inv.png",
|
||||||
|
wield_image = "homedecor_ground_lantern_inv.png",
|
||||||
groups = {snappy=3},
|
groups = {snappy=3},
|
||||||
light_source = 11,
|
light_source = 11,
|
||||||
selection_box = wl_cbox,
|
selection_box = gl_cbox,
|
||||||
collision_box = wl_cbox,
|
collision_box = gl_cbox
|
||||||
|
})
|
||||||
|
|
||||||
|
local hl_cbox = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = { -0.25, -0.4, -0.2, 0.25, 0.5, 0.5 },
|
||||||
|
}
|
||||||
|
|
||||||
|
homedecor.register("hanging_lantern", {
|
||||||
|
description = S("Hanging Lantern"),
|
||||||
|
mesh = "homedecor_hanging_lantern.obj",
|
||||||
|
tiles = {"homedecor_hanging_lantern.png"},
|
||||||
|
inventory_image = "homedecor_hanging_lantern_inv.png",
|
||||||
|
wield_image = "homedecor_hanging_lantern_inv.png",
|
||||||
|
groups = {snappy=3},
|
||||||
|
light_source = 11,
|
||||||
|
selection_box = hl_cbox,
|
||||||
|
collision_box = hl_cbox
|
||||||
})
|
})
|
||||||
|
|
||||||
homedecor.register("lattice_lantern_large", {
|
homedecor.register("lattice_lantern_large", {
|
||||||
|
@ -411,20 +373,3 @@ for _, color in ipairs(dlamp_colors) do
|
||||||
groups = {snappy=3},
|
groups = {snappy=3},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
local hl_cbox = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = { -0.25, -0.4, -0.2, 0.25, 0.5, 0.5 },
|
|
||||||
}
|
|
||||||
|
|
||||||
homedecor.register("hanging_lantern", {
|
|
||||||
description = S("Hanging Lantern"),
|
|
||||||
mesh = "homedecor_hanging_lantern.obj",
|
|
||||||
tiles = {"homedecor_hanging_lantern.png"},
|
|
||||||
inventory_image = "homedecor_hanging_lantern_inv.png",
|
|
||||||
wield_image = "homedecor_hanging_lantern_inv.png",
|
|
||||||
groups = {snappy=3},
|
|
||||||
light_source = 11,
|
|
||||||
selection_box = hl_cbox,
|
|
||||||
collision_box = hl_cbox,
|
|
||||||
})
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
-- Various misc. nodes
|
|
||||||
|
|
||||||
local S = homedecor.gettext
|
local S = homedecor.gettext
|
||||||
|
|
||||||
homedecor.register("ceiling_paint", {
|
homedecor.register("ceiling_paint", {
|
||||||
|
@ -12,12 +10,7 @@ homedecor.register("ceiling_paint", {
|
||||||
walkable = false,
|
walkable = false,
|
||||||
groups = { snappy = 3 },
|
groups = { snappy = 3 },
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
selection_box = {
|
selection_box = { type = "wallmounted" },
|
||||||
type = "wallmounted",
|
|
||||||
--wall_top = <default>
|
|
||||||
--wall_bottom = <default>
|
|
||||||
--wall_side = <default>
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
homedecor.register("ceiling_tile", {
|
homedecor.register("ceiling_tile", {
|
||||||
|
@ -30,75 +23,38 @@ homedecor.register("ceiling_tile", {
|
||||||
walkable = false,
|
walkable = false,
|
||||||
groups = { snappy = 3 },
|
groups = { snappy = 3 },
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
selection_box = {
|
selection_box = { type = "wallmounted" },
|
||||||
type = "wallmounted",
|
|
||||||
--wall_top = <default>
|
|
||||||
--wall_bottom = <default>
|
|
||||||
--wall_side = <default>
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
homedecor.register("rug_small", {
|
local rug_sizes = {"small", "large"}
|
||||||
description = S("Small Throw Rug"),
|
|
||||||
|
for _, s in ipairs(rug_sizes) do
|
||||||
|
homedecor.register("rug_"..s, {
|
||||||
|
description = S("Throw Rug ("..s..")"),
|
||||||
drawtype = 'signlike',
|
drawtype = 'signlike',
|
||||||
tiles = { 'homedecor_rug_small.png' },
|
tiles = {"homedecor_rug_"..s..".png"},
|
||||||
wield_image = 'homedecor_rug_small.png',
|
wield_image = "homedecor_rug_"..s..".png",
|
||||||
inventory_image = 'homedecor_rug_small.png',
|
inventory_image = "homedecor_rug_"..s..".png",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
groups = { snappy = 3 },
|
groups = {snappy = 3},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
selection_box = {
|
selection_box = { type = "wallmounted" },
|
||||||
type = "wallmounted",
|
|
||||||
--wall_top = <default>
|
|
||||||
--wall_bottom = <default>
|
|
||||||
--wall_side = <default>
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
homedecor.register("rug_large", {
|
local pot_colors = {"black", "green", "terracotta"}
|
||||||
description = S("Large Area Rug"),
|
|
||||||
drawtype = 'signlike',
|
|
||||||
tiles = { 'homedecor_rug_large.png' },
|
|
||||||
wield_image = 'homedecor_rug_large.png',
|
|
||||||
inventory_image = 'homedecor_rug_large.png',
|
|
||||||
sunlight_propagates = true,
|
|
||||||
paramtype2 = "wallmounted",
|
|
||||||
walkable = false,
|
|
||||||
groups = { snappy = 3 },
|
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
|
||||||
selection_box = {
|
|
||||||
type = "wallmounted",
|
|
||||||
--wall_top = <default>
|
|
||||||
--wall_bottom = <default>
|
|
||||||
--wall_side = <default>
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
homedecor.register("flower_pot_terracotta", {
|
for _, p in ipairs(pot_colors) do
|
||||||
description = S("Terracotta Flower Pot"),
|
homedecor.register("flower_pot_"..p, {
|
||||||
|
description = S("Flower Pot ("..p..")"),
|
||||||
mesh = "homedecor_flowerpot.obj",
|
mesh = "homedecor_flowerpot.obj",
|
||||||
tiles = { "homedecor_flower_pot_terracotta.png" },
|
tiles = { "homedecor_flower_pot_"..p..".png" },
|
||||||
groups = { snappy = 3, potting_soil=1},
|
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
|
||||||
})
|
|
||||||
|
|
||||||
homedecor.register("flower_pot_black", {
|
|
||||||
description = S("Black Plastic Flower Pot"),
|
|
||||||
mesh = "homedecor_flowerpot.obj",
|
|
||||||
tiles = { "homedecor_flower_pot_black.png" },
|
|
||||||
groups = { snappy = 3, potting_soil=1 },
|
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
|
||||||
})
|
|
||||||
|
|
||||||
homedecor.register("flower_pot_green", {
|
|
||||||
description = S("Green Plastic Flower Pot"),
|
|
||||||
mesh = "homedecor_flowerpot.obj",
|
|
||||||
tiles = { "homedecor_flower_pot_green.png" },
|
|
||||||
groups = { snappy = 3, potting_soil=1 },
|
groups = { snappy = 3, potting_soil=1 },
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
homedecor.register("pole_brass", {
|
homedecor.register("pole_brass", {
|
||||||
description = S("Brass Pole"),
|
description = S("Brass Pole"),
|
||||||
|
@ -510,21 +466,21 @@ local bottle_cbox = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
homedecor.register("bottle_brown", {
|
local fbottle_cbox = {
|
||||||
tiles = { "homedecor_bottle_brown.png" },
|
type = "fixed",
|
||||||
inventory_image = "homedecor_bottle_brown_inv.png",
|
fixed = {
|
||||||
description = "Brown bottle",
|
{ -0.375, -0.5, -0.3125, 0.375, 0, 0.3125 }
|
||||||
mesh = "homedecor_bottle.obj",
|
}
|
||||||
sunlight_propagates = true,
|
}
|
||||||
groups = {snappy=3},
|
|
||||||
collision_box = bottle_cbox,
|
|
||||||
selection_box = bottle_cbox
|
|
||||||
})
|
|
||||||
|
|
||||||
homedecor.register("bottle_green", {
|
local bottle_colors = {"brown", "green"}
|
||||||
tiles = { "homedecor_bottle_green.png" },
|
|
||||||
inventory_image = "homedecor_bottle_green_inv.png",
|
for _, b in ipairs(bottle_colors) do
|
||||||
description = "Green bottle",
|
|
||||||
|
homedecor.register("bottle_"..b, {
|
||||||
|
tiles = { "homedecor_bottle_"..b..".png" },
|
||||||
|
inventory_image = "homedecor_bottle_"..b.."_inv.png",
|
||||||
|
description = "Bottle ("..b..")",
|
||||||
mesh = "homedecor_bottle.obj",
|
mesh = "homedecor_bottle.obj",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
groups = {snappy=3},
|
groups = {snappy=3},
|
||||||
|
@ -534,17 +490,10 @@ homedecor.register("bottle_green", {
|
||||||
|
|
||||||
-- 4-bottle sets
|
-- 4-bottle sets
|
||||||
|
|
||||||
local fbottle_cbox = {
|
homedecor.register("4_bottles_"..b, {
|
||||||
type = "fixed",
|
tiles = { "homedecor_bottle_"..b..".png" },
|
||||||
fixed = {
|
inventory_image = "homedecor_4_bottles_"..b.."_inv.png",
|
||||||
{ -0.375, -0.5, -0.3125, 0.375, 0, 0.3125 }
|
description = "Four "..b.." bottles",
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
homedecor.register("4_bottles_brown", {
|
|
||||||
tiles = { "homedecor_bottle_brown.png" },
|
|
||||||
inventory_image = "homedecor_4_bottles_brown_inv.png",
|
|
||||||
description = "Four brown bottles",
|
|
||||||
mesh = "homedecor_4_bottles.obj",
|
mesh = "homedecor_4_bottles.obj",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
groups = {snappy=3},
|
groups = {snappy=3},
|
||||||
|
@ -552,16 +501,7 @@ homedecor.register("4_bottles_brown", {
|
||||||
selection_box = fbottle_cbox
|
selection_box = fbottle_cbox
|
||||||
})
|
})
|
||||||
|
|
||||||
homedecor.register("4_bottles_green", {
|
end
|
||||||
tiles = { "homedecor_bottle_green.png" },
|
|
||||||
inventory_image = "homedecor_4_bottles_green_inv.png",
|
|
||||||
description = "Four green bottles",
|
|
||||||
mesh = "homedecor_4_bottles.obj",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
groups = {snappy=3},
|
|
||||||
collision_box = fbottle_cbox,
|
|
||||||
selection_box = fbottle_cbox
|
|
||||||
})
|
|
||||||
|
|
||||||
homedecor.register("4_bottles_multi", {
|
homedecor.register("4_bottles_multi", {
|
||||||
tiles = { "homedecor_4_bottles_multi.png" },
|
tiles = { "homedecor_4_bottles_multi.png" },
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
-- This file supplies nightstands
|
|
||||||
|
|
||||||
local S = homedecor.gettext
|
local S = homedecor.gettext
|
||||||
|
local woods = {"mahogany", "oak"}
|
||||||
|
|
||||||
homedecor.register("nightstand_oak_one_drawer", {
|
for _, w in ipairs(woods) do
|
||||||
description = S("Oak Nightstand with One Drawer"),
|
|
||||||
tiles = { 'homedecor_nightstand_oak_top.png',
|
homedecor.register("nightstand_"..w.."_one_drawer", {
|
||||||
'homedecor_nightstand_oak_bottom.png',
|
description = S("Nightstand with One Drawer ("..w..")"),
|
||||||
'homedecor_nightstand_oak_right.png',
|
tiles = { 'homedecor_nightstand_'..w..'_top.png',
|
||||||
'homedecor_nightstand_oak_left.png',
|
'homedecor_nightstand_'..w..'_bottom.png',
|
||||||
'homedecor_nightstand_oak_back.png',
|
'homedecor_nightstand_'..w..'_right.png',
|
||||||
'homedecor_nightstand_oak_1_drawer_front.png'},
|
'homedecor_nightstand_'..w..'_left.png',
|
||||||
|
'homedecor_nightstand_'..w..'_back.png',
|
||||||
|
'homedecor_nightstand_'..w..'_1_drawer_front.png'},
|
||||||
selection_box = { type = "regular" },
|
selection_box = { type = "regular" },
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
|
@ -30,14 +31,14 @@ homedecor.register("nightstand_oak_one_drawer", {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
homedecor.register("nightstand_oak_two_drawers", {
|
homedecor.register("nightstand_"..w.."_two_drawers", {
|
||||||
description = S("Oak Nightstand with Two Drawers"),
|
description = S("Nightstand with Two Drawers ("..w..")"),
|
||||||
tiles = { 'homedecor_nightstand_oak_top.png',
|
tiles = { 'homedecor_nightstand_'..w..'_top.png',
|
||||||
'homedecor_nightstand_oak_bottom.png',
|
'homedecor_nightstand_'..w..'_bottom.png',
|
||||||
'homedecor_nightstand_oak_right.png',
|
'homedecor_nightstand_'..w..'_right.png',
|
||||||
'homedecor_nightstand_oak_left.png',
|
'homedecor_nightstand_'..w..'_left.png',
|
||||||
'homedecor_nightstand_oak_back.png',
|
'homedecor_nightstand_'..w..'_back.png',
|
||||||
'homedecor_nightstand_oak_2_drawer_front.png'},
|
'homedecor_nightstand_'..w..'_2_drawer_front.png'},
|
||||||
selection_box = { type = "regular" },
|
selection_box = { type = "regular" },
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
|
@ -56,56 +57,4 @@ homedecor.register("nightstand_oak_two_drawers", {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
homedecor.register("nightstand_mahogany_one_drawer", {
|
end
|
||||||
description = S("Mahogany Nightstand with One Drawer"),
|
|
||||||
tiles = { 'homedecor_nightstand_mahogany_top.png',
|
|
||||||
'homedecor_nightstand_mahogany_bottom.png',
|
|
||||||
'homedecor_nightstand_mahogany_right.png',
|
|
||||||
'homedecor_nightstand_mahogany_left.png',
|
|
||||||
'homedecor_nightstand_mahogany_back.png',
|
|
||||||
'homedecor_nightstand_mahogany_1_drawer_front.png'},
|
|
||||||
selection_box = { type = "regular" },
|
|
||||||
node_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{ -8/16, 0, -30/64, 8/16, 8/16, 8/16 }, -- top half
|
|
||||||
{ -7/16, 1/16, -32/64, 7/16, 7/16, -29/64}, -- drawer face
|
|
||||||
{ -8/16, -8/16, -30/64, -7/16, 0, 8/16 }, -- left
|
|
||||||
{ 7/16, -8/16, -30/64, 8/16, 0, 8/16 }, -- right
|
|
||||||
{ -8/16, -8/16, 7/16, 8/16, 0, 8/16 }, -- back
|
|
||||||
{ -8/16, -8/16, -30/64, 8/16, -7/16, 8/16 } -- bottom
|
|
||||||
}
|
|
||||||
},
|
|
||||||
groups = { snappy = 3 },
|
|
||||||
sounds = default.node_sound_wood_defaults(),
|
|
||||||
infotext=S("One-drawer Nightstand"),
|
|
||||||
inventory = {
|
|
||||||
size=8,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
homedecor.register("nightstand_mahogany_two_drawers", {
|
|
||||||
description = S("Mahogany Nightstand with Two Drawers"),
|
|
||||||
tiles = { 'homedecor_nightstand_mahogany_top.png',
|
|
||||||
'homedecor_nightstand_mahogany_bottom.png',
|
|
||||||
'homedecor_nightstand_mahogany_right.png',
|
|
||||||
'homedecor_nightstand_mahogany_left.png',
|
|
||||||
'homedecor_nightstand_mahogany_back.png',
|
|
||||||
'homedecor_nightstand_mahogany_2_drawer_front.png'},
|
|
||||||
selection_box = { type = "regular" },
|
|
||||||
node_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{ -8/16, -8/16, -30/64, 8/16, 8/16, 8/16 }, -- main body
|
|
||||||
{ -7/16, 1/16, -32/64, 7/16, 7/16, -29/64 }, -- top drawer face
|
|
||||||
{ -7/16, -7/16, -32/64, 7/16, -1/16, -29/64 }, -- bottom drawer face
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
groups = { snappy = 3 },
|
|
||||||
sounds = default.node_sound_wood_defaults(),
|
|
||||||
infotext=S("Two-drawer Nightstand"),
|
|
||||||
inventory = {
|
|
||||||
size=16,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
-- Various kidns of shingles
|
|
||||||
|
|
||||||
local S = homedecor.gettext
|
local S = homedecor.gettext
|
||||||
|
|
||||||
minetest.register_node("homedecor:skylight", {
|
minetest.register_node("homedecor:skylight", {
|
||||||
|
@ -29,42 +27,19 @@ minetest.register_node("homedecor:skylight_frosted", {
|
||||||
selection_box = homedecor.nodebox.slab_y(0.1),
|
selection_box = homedecor.nodebox.slab_y(0.1),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("homedecor:shingles_wood", {
|
local materials = {"asphalt", "terracotta", "wood"}
|
||||||
description = S("Wood Shingles"),
|
|
||||||
|
for _, s in ipairs(materials) do
|
||||||
|
minetest.register_node("homedecor:shingles_"..s, {
|
||||||
|
description = S("Shingles ("..s..")"),
|
||||||
drawtype = "raillike",
|
drawtype = "raillike",
|
||||||
tiles = { "homedecor_shingles_wood.png" },
|
tiles = { "homedecor_shingles_"..s..".png" },
|
||||||
wield_image = "homedecor_shingles_wood.png",
|
wield_image = "homedecor_shingles_"..s..".png",
|
||||||
inventory_image = "homedecor_shingles_wood_inv.png",
|
inventory_image = "homedecor_shingles_"..s.."_inv.png",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
groups = { snappy = 3 },
|
groups = { snappy = 3 },
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
selection_box = homedecor.nodebox.slab_y(0.1),
|
selection_box = homedecor.nodebox.slab_y(0.1),
|
||||||
})
|
})
|
||||||
|
end
|
||||||
minetest.register_node("homedecor:shingles_asphalt", {
|
|
||||||
description = S("Asphalt Shingles"),
|
|
||||||
drawtype = "raillike",
|
|
||||||
tiles = { "homedecor_shingles_asphalt.png" },
|
|
||||||
wield_image = "homedecor_shingles_asphalt.png",
|
|
||||||
inventory_image = "homedecor_shingles_asphalt_inv.png",
|
|
||||||
paramtype = "light",
|
|
||||||
walkable = false,
|
|
||||||
groups = { snappy = 3 },
|
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
|
||||||
selection_box = homedecor.nodebox.slab_y(0.1),
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("homedecor:shingles_terracotta", {
|
|
||||||
description = S("Terracotta Shingles"),
|
|
||||||
drawtype = "raillike",
|
|
||||||
tiles = { "homedecor_shingles_terracotta.png" },
|
|
||||||
wield_image = "homedecor_shingles_terracotta.png",
|
|
||||||
inventory_image = "homedecor_shingles_terracotta_inv.png",
|
|
||||||
paramtype = "light",
|
|
||||||
walkable = false,
|
|
||||||
groups = { snappy = 3 },
|
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
|
||||||
selection_box = homedecor.nodebox.slab_y(0.1),
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
|
@ -157,27 +157,15 @@ homedecor.register("utility_table_top", {
|
||||||
|
|
||||||
-- Various kinds of table legs
|
-- Various kinds of table legs
|
||||||
|
|
||||||
homedecor.register("table_legs_brass", {
|
local materials = {"brass", "wrought_iron"}
|
||||||
description = S("Brass Table Legs"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
tiles = {"homedecor_table_legs_brass.png"},
|
|
||||||
inventory_image = "homedecor_table_legs_brass.png",
|
|
||||||
wield_image = "homedecor_table_legs_brass.png",
|
|
||||||
walkable = false,
|
|
||||||
groups = {snappy=3},
|
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = { -0.37, -0.5, -0.37, 0.37, 0.5, 0.37 }
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
homedecor.register("table_legs_wrought_iron", {
|
for _, t in ipairs(materials) do
|
||||||
description = S("Wrought Iron Table Legs"),
|
homedecor.register("table_legs_"..t, {
|
||||||
|
description = S("Table Legs ("..t..")"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"homedecor_table_legs_wrought_iron.png"},
|
tiles = {"homedecor_table_legs_"..t..".png"},
|
||||||
inventory_image = "homedecor_table_legs_wrought_iron.png",
|
inventory_image = "homedecor_table_legs_"..t..".png",
|
||||||
wield_image = "homedecor_table_legs_wrought_iron.png",
|
wield_image = "homedecor_table_legs_"..t..".png",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
groups = {snappy=3},
|
groups = {snappy=3},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
@ -186,6 +174,7 @@ homedecor.register("table_legs_wrought_iron", {
|
||||||
fixed = { -0.37, -0.5, -0.37, 0.37, 0.5, 0.37 }
|
fixed = { -0.37, -0.5, -0.37, 0.37, 0.5, 0.37 }
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
homedecor.register("utility_table_legs", {
|
homedecor.register("utility_table_legs", {
|
||||||
description = S("Legs for Utility Table"),
|
description = S("Legs for Utility Table"),
|
||||||
|
|
BIN
homedecor/textures/homedecor_kitchen_cabinet_top_wood.png
Normal file
BIN
homedecor/textures/homedecor_kitchen_cabinet_top_wood.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 324 B |
Loading…
Reference in New Issue
Block a user