Updated homedecor mod to remove global vars and use meshs
@ -152,7 +152,6 @@ minetest.register_node("computer:monitor_on", {
|
|||||||
on_rightclick = function ( pos, node, clicker, itemstack)
|
on_rightclick = function ( pos, node, clicker, itemstack)
|
||||||
node.name = "computer:monitor";
|
node.name = "computer:monitor";
|
||||||
minetest.set_node(pos, node);
|
minetest.set_node(pos, node);
|
||||||
nodeupdate(pos)
|
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -286,7 +285,6 @@ minetest.register_node("computer:monitor", {
|
|||||||
on_rightclick = function ( pos, node, clicker, itemstack)
|
on_rightclick = function ( pos, node, clicker, itemstack)
|
||||||
node.name = "computer:monitor_on";
|
node.name = "computer:monitor_on";
|
||||||
minetest.set_node(pos, node);
|
minetest.set_node(pos, node);
|
||||||
nodeupdate(pos)
|
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -343,7 +341,6 @@ minetest.register_node("computer:tower_on", {
|
|||||||
on_rightclick = function ( pos, node, clicker, itemstack)
|
on_rightclick = function ( pos, node, clicker, itemstack)
|
||||||
node.name = "computer:tower";
|
node.name = "computer:tower";
|
||||||
minetest.set_node(pos, node);
|
minetest.set_node(pos, node);
|
||||||
nodeupdate(pos)
|
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -375,7 +372,6 @@ minetest.register_node("computer:tower", {
|
|||||||
on_rightclick = function ( pos, node, clicker, itemstack)
|
on_rightclick = function ( pos, node, clicker, itemstack)
|
||||||
node.name = "computer:tower_on";
|
node.name = "computer:tower_on";
|
||||||
minetest.set_node(pos, node);
|
minetest.set_node(pos, node);
|
||||||
nodeupdate(pos)
|
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -436,7 +432,6 @@ minetest.register_node("computer:server", {
|
|||||||
on_rightclick = function ( pos, node, clicker, itemstack)
|
on_rightclick = function ( pos, node, clicker, itemstack)
|
||||||
node.name = "computer:server_on";
|
node.name = "computer:server_on";
|
||||||
minetest.set_node(pos, node);
|
minetest.set_node(pos, node);
|
||||||
nodeupdate(pos)
|
|
||||||
end,
|
end,
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
local pos = pointed_thing.above
|
local pos = pointed_thing.above
|
||||||
@ -478,6 +473,5 @@ minetest.register_node("computer:server_on", {
|
|||||||
on_rightclick = function ( pos, node, clicker, itemstack)
|
on_rightclick = function ( pos, node, clicker, itemstack)
|
||||||
node.name = "computer:server";
|
node.name = "computer:server";
|
||||||
minetest.set_node(pos, node);
|
minetest.set_node(pos, node);
|
||||||
nodeupdate(pos)
|
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
@ -31,7 +31,6 @@ computer.register = function ( name, def )
|
|||||||
end
|
end
|
||||||
node.name = OFFSTATE;
|
node.name = OFFSTATE;
|
||||||
minetest.set_node(pos, node);
|
minetest.set_node(pos, node);
|
||||||
nodeupdate(pos);
|
|
||||||
end;
|
end;
|
||||||
});
|
});
|
||||||
minetest.register_node(OFFSTATE, {
|
minetest.register_node(OFFSTATE, {
|
||||||
@ -56,7 +55,6 @@ computer.register = function ( name, def )
|
|||||||
end
|
end
|
||||||
node.name = ONSTATE;
|
node.name = ONSTATE;
|
||||||
minetest.set_node(pos, node);
|
minetest.set_node(pos, node);
|
||||||
nodeupdate(pos);
|
|
||||||
end;
|
end;
|
||||||
drop = ONSTATE;
|
drop = ONSTATE;
|
||||||
});
|
});
|
||||||
|
@ -2746,6 +2746,24 @@ minetest.register_craft({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "homedecor:office_chair_basic",
|
||||||
|
recipe = {
|
||||||
|
{ "", "", "wool:black" },
|
||||||
|
{ "", "wool:black", "default:steel_ingot" },
|
||||||
|
{ "group:stick", "homedecor:pole_wrought_iron", "group:stick" }
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "homedecor:office_chair_upscale",
|
||||||
|
recipe = {
|
||||||
|
{ "dye:black", "building_blocks:sticks", "group:wool" },
|
||||||
|
{ "homedecor:plastic_sheeting", "group:wool", "default:steel_ingot" },
|
||||||
|
{ "building_blocks:sticks", "homedecor:pole_wrought_iron", "building_blocks:sticks" }
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "homedecor:wall_shelf 2",
|
output = "homedecor:wall_shelf 2",
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -623,7 +623,7 @@ homedecor.register("jpn_door_bottom", {
|
|||||||
},
|
},
|
||||||
expand = { top = "homedecor:jpn_door_top" },
|
expand = { top = "homedecor:jpn_door_top" },
|
||||||
on_rightclick = function(pos, node, clicker)
|
on_rightclick = function(pos, node, clicker)
|
||||||
fdir = minetest.get_node(pos).param2
|
local fdir = minetest.get_node(pos).param2
|
||||||
minetest.set_node(pos, {name = "homedecor:jpn_door_bottom_open", param2 = fdir})
|
minetest.set_node(pos, {name = "homedecor:jpn_door_bottom_open", param2 = fdir})
|
||||||
minetest.set_node({x = pos.x, y=pos.y + 1, z = pos.z}, {name = "homedecor:jpn_door_top_open", param2 = fdir})
|
minetest.set_node({x = pos.x, y=pos.y + 1, z = pos.z}, {name = "homedecor:jpn_door_top_open", param2 = fdir})
|
||||||
end
|
end
|
||||||
@ -689,7 +689,7 @@ minetest.register_node("homedecor:jpn_door_bottom_open", {
|
|||||||
fixed = {-1.5, -0.5, -0.0625, 0.5, 1.5, 0},
|
fixed = {-1.5, -0.5, -0.0625, 0.5, 1.5, 0},
|
||||||
},
|
},
|
||||||
on_rightclick = function(pos, node, clicker)
|
on_rightclick = function(pos, node, clicker)
|
||||||
fdir = minetest.get_node(pos).param2
|
local fdir = minetest.get_node(pos).param2
|
||||||
minetest.set_node(pos, {name = "homedecor:jpn_door_bottom", param2 = fdir})
|
minetest.set_node(pos, {name = "homedecor:jpn_door_bottom", param2 = fdir})
|
||||||
minetest.set_node({x = pos.x, y=pos.y + 1, z = pos.z}, {name = "homedecor:jpn_door_top", param2 = fdir})
|
minetest.set_node({x = pos.x, y=pos.y + 1, z = pos.z}, {name = "homedecor:jpn_door_top", param2 = fdir})
|
||||||
end,
|
end,
|
||||||
|
@ -34,6 +34,46 @@ for _, i in ipairs(table_colors) do
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function sit(pos, node, clicker)
|
||||||
|
local name = clicker:get_player_name()
|
||||||
|
local meta = minetest:get_meta(pos)
|
||||||
|
local param2 = node.param2
|
||||||
|
if clicker:get_player_name() == meta:get_string("player") then
|
||||||
|
meta:set_string("player", "")
|
||||||
|
pos.y = pos.y-0.5
|
||||||
|
clicker:setpos(pos)
|
||||||
|
clicker:set_eye_offset({x=0,y=0,z=0}, {x=0,y=0,z=0})
|
||||||
|
clicker:set_physics_override(1, 1, 1)
|
||||||
|
default.player_attached[name] = false
|
||||||
|
default.player_set_animation(clicker, "stand", 30)
|
||||||
|
else
|
||||||
|
meta:set_string("player", clicker:get_player_name())
|
||||||
|
clicker:set_eye_offset({x=0,y=-7,z=2}, {x=0,y=0,z=0})
|
||||||
|
clicker:set_physics_override(0, 0, 0)
|
||||||
|
default.player_attached[name] = true
|
||||||
|
if param2 == 1 then
|
||||||
|
clicker:set_look_yaw(7.9)
|
||||||
|
elseif param2 == 3 then
|
||||||
|
clicker:set_look_yaw(4.75)
|
||||||
|
elseif param2 == 0 then
|
||||||
|
clicker:set_look_yaw(3.15)
|
||||||
|
else
|
||||||
|
clicker:set_look_yaw(6.28)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function sit_exec(pos, node, clicker) -- don't move these functions inside sit()
|
||||||
|
if not clicker or not clicker:is_player()
|
||||||
|
or clicker:get_player_control().up == true or clicker:get_player_control().down == true
|
||||||
|
or clicker:get_player_control().left == true or clicker:get_player_control().right == true
|
||||||
|
or clicker:get_player_control().jump == true then -- make sure that the player is immobile.
|
||||||
|
return end
|
||||||
|
sit(pos, node, clicker)
|
||||||
|
clicker:setpos(pos)
|
||||||
|
default.player_set_animation(clicker, "sit", 30)
|
||||||
|
end
|
||||||
|
|
||||||
local chaircolors = {
|
local chaircolors = {
|
||||||
{ "", "plain" },
|
{ "", "plain" },
|
||||||
{ "black", "Black" },
|
{ "black", "Black" },
|
||||||
@ -81,6 +121,10 @@ for i in ipairs(chaircolors) do
|
|||||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3},
|
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3},
|
||||||
},
|
},
|
||||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
||||||
|
on_rightclick = function(pos, node, clicker)
|
||||||
|
pos.y = pos.y-0 -- player's sit position.
|
||||||
|
sit_exec(pos, node, clicker)
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
if color ~= "" then
|
if color ~= "" then
|
||||||
@ -110,6 +154,11 @@ for i in ipairs(chaircolors) do
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
||||||
|
on_rightclick = function(pos, node, clicker)
|
||||||
|
pos.y = pos.y-0.1 -- player's sit position.
|
||||||
|
sit_exec(pos, node, clicker)
|
||||||
|
clicker:set_hp(20)
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
@ -233,8 +282,8 @@ for _, color in ipairs(bedcolors) do
|
|||||||
{-0.5, -0.5, -0.5, -0.375, 0.1875, -0.4375}, -- NodeBox1
|
{-0.5, -0.5, -0.5, -0.375, 0.1875, -0.4375}, -- NodeBox1
|
||||||
{0.375, -0.5, -0.5, 0.5, 0.1875, -0.4375}, -- NodeBox2
|
{0.375, -0.5, -0.5, 0.5, 0.1875, -0.4375}, -- NodeBox2
|
||||||
{-0.5, 0, -0.5, 0.5, 0.125, -0.4375}, -- NodeBox3
|
{-0.5, 0, -0.5, 0.5, 0.125, -0.4375}, -- NodeBox3
|
||||||
{-0.5, -0.375, -0.5, 0.5, -0.125, 0.5}, -- NodeBox5
|
{-0.5, -0.375, -0.5, 0.5, -0.125, 0.5}, -- NodeBox4
|
||||||
{-0.4375, -0.3125, -0.4375, 0.4375, -0.0625, 0.5}, -- NodeBox6
|
{-0.4375, -0.3125, -0.4375, 0.4375, -0.0625, 0.5}, -- NodeBox5
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selection_box = {
|
selection_box = {
|
||||||
@ -346,15 +395,19 @@ homedecor.register("simple_bench", {
|
|||||||
"homedecor_bench_large_2_left_back.png^[transformFX"
|
"homedecor_bench_large_2_left_back.png^[transformFX"
|
||||||
},
|
},
|
||||||
description = "Simple Bench",
|
description = "Simple Bench",
|
||||||
groups = {snappy=3},
|
groups = {snappy=3},
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.5, -0.15, 0, 0.5, -0.05, 0.4},
|
{-0.5, -0.15, 0, 0.5, -0.05, 0.4},
|
||||||
{-0.4, -0.5, 0.1, -0.3, -0.15, 0.3},
|
{-0.4, -0.5, 0.1, -0.3, -0.15, 0.3},
|
||||||
{ 0.3, -0.5, 0.1, 0.4, -0.15, 0.3},
|
{ 0.3, -0.5, 0.1, 0.4, -0.15, 0.3},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
on_rightclick = function(pos, node, clicker)
|
||||||
|
pos.y = pos.y-0 -- player's sit position.
|
||||||
|
sit_exec(pos, node, clicker)
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
homedecor.register("bench_large_1_left", {
|
homedecor.register("bench_large_1_left", {
|
||||||
@ -386,6 +439,10 @@ homedecor.register("bench_large_1_left", {
|
|||||||
fixed = { -0.5, -0.5, -0.09375, 1.5, 0.5, 0.5 }
|
fixed = { -0.5, -0.5, -0.09375, 1.5, 0.5, 0.5 }
|
||||||
},
|
},
|
||||||
expand = { right="homedecor:bench_large_1_right" },
|
expand = { right="homedecor:bench_large_1_right" },
|
||||||
|
on_rightclick = function(pos, node, clicker)
|
||||||
|
pos.y = pos.y-0 -- player's sit position.
|
||||||
|
sit_exec(pos, node, clicker)
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
homedecor.register("bench_large_1_right", {
|
homedecor.register("bench_large_1_right", {
|
||||||
@ -452,6 +509,10 @@ homedecor.register("bench_large_2_left", {
|
|||||||
fixed = { -0.5, -0.5, -0.15625, 1.5, 0.5, 0.5 }
|
fixed = { -0.5, -0.5, -0.15625, 1.5, 0.5, 0.5 }
|
||||||
},
|
},
|
||||||
expand = { right="homedecor:bench_large_2_right" },
|
expand = { right="homedecor:bench_large_2_right" },
|
||||||
|
on_rightclick = function(pos, node, clicker)
|
||||||
|
pos.y = pos.y-0 -- player's sit position.
|
||||||
|
sit_exec(pos, node, clicker)
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
homedecor.register("bench_large_2_right", {
|
homedecor.register("bench_large_2_right", {
|
||||||
@ -497,7 +558,7 @@ homedecor.register("deckchair_head", {
|
|||||||
"homedecor_deckchair_sides.png",
|
"homedecor_deckchair_sides.png",
|
||||||
"homedecor_deckchair_front.png"
|
"homedecor_deckchair_front.png"
|
||||||
},
|
},
|
||||||
groups = { snappy = 3, not_in_creative_inventory = 1 },
|
groups = { snappy = 3, not_in_creative_inventory = 1 },
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
@ -530,7 +591,7 @@ homedecor.register("deckchair_foot", {
|
|||||||
},
|
},
|
||||||
description = "Deck chair",
|
description = "Deck chair",
|
||||||
inventory_image = "homedecor_deckchair_inv.png",
|
inventory_image = "homedecor_deckchair_inv.png",
|
||||||
groups = { snappy = 3 },
|
groups = { snappy = 3 },
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
@ -615,6 +676,62 @@ homedecor.register("grandfather_clock_top", {
|
|||||||
selection_box = homedecor.nodebox.null,
|
selection_box = homedecor.nodebox.null,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
homedecor.register("office_chair_upscale", {
|
||||||
|
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",
|
||||||
|
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
|
||||||
|
{ -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
|
||||||
|
{ -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.
|
||||||
|
sit_exec(pos, node, clicker)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
homedecor.register("office_chair_basic", {
|
||||||
|
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.
|
||||||
|
sit_exec(pos, node, clicker)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
-- Aliases for 3dforniture mod.
|
-- Aliases for 3dforniture mod.
|
||||||
|
|
||||||
minetest.register_alias("3dforniture:table", "homedecor:table")
|
minetest.register_alias("3dforniture:table", "homedecor:table")
|
||||||
|
@ -111,13 +111,11 @@ function homedecor.register(name, def)
|
|||||||
if expand then
|
if expand then
|
||||||
def.on_place = def.on_place or function(itemstack, placer, pointed_thing)
|
def.on_place = def.on_place or function(itemstack, placer, pointed_thing)
|
||||||
if expand.top then
|
if expand.top then
|
||||||
homedecor.stack_vertically(itemstack, placer, pointed_thing, itemstack:get_name(), expand.top)
|
return homedecor.stack_vertically(itemstack, placer, pointed_thing, itemstack:get_name(), expand.top)
|
||||||
end
|
elseif expand.right then
|
||||||
if expand.right then
|
return homedecor.stack_sideways(itemstack, placer, pointed_thing, itemstack:get_name(), expand.right, true)
|
||||||
homedecor.stack_sideways(itemstack, placer, pointed_thing, itemstack:get_name(), expand.right, true)
|
elseif expand.forward then
|
||||||
end
|
return homedecor.stack_sideways(itemstack, placer, pointed_thing, itemstack:get_name(), expand.forward, false)
|
||||||
if expand.forward then
|
|
||||||
homedecor.stack_sideways(itemstack, placer, pointed_thing, itemstack:get_name(), expand.forward, false)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
def.after_dig_node = def.after_dig_node or function(pos, oldnode, oldmetadata, digger)
|
def.after_dig_node = def.after_dig_node or function(pos, oldnode, oldmetadata, digger)
|
||||||
|
@ -349,7 +349,6 @@ local function reg_lamp(suffix, nxt, tilesuffix, light, color)
|
|||||||
on_punch = function(pos, node, puncher)
|
on_punch = function(pos, node, puncher)
|
||||||
node.name = "homedecor:table_lamp"..lampcolor.."_"..repl[suffix]
|
node.name = "homedecor:table_lamp"..lampcolor.."_"..repl[suffix]
|
||||||
minetest.set_node(pos, node)
|
minetest.set_node(pos, node)
|
||||||
nodeupdate(pos)
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -370,7 +369,6 @@ local function reg_lamp(suffix, nxt, tilesuffix, light, color)
|
|||||||
on_punch = function(pos, node, puncher)
|
on_punch = function(pos, node, puncher)
|
||||||
node.name = "homedecor:standing_lamp"..lampcolor.."_"..repl[suffix]
|
node.name = "homedecor:standing_lamp"..lampcolor.."_"..repl[suffix]
|
||||||
minetest.set_node(pos, node)
|
minetest.set_node(pos, node)
|
||||||
nodeupdate(pos)
|
|
||||||
end,
|
end,
|
||||||
expand = { top="air" },
|
expand = { top="air" },
|
||||||
})
|
})
|
||||||
|
@ -498,36 +498,20 @@ homedecor.register("pool_table_2", {
|
|||||||
selection_box = homedecor.nodebox.null,
|
selection_box = homedecor.nodebox.null,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local trash_cbox = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = { -0.25, -0.5, -0.25, 0.25, 0.125, 0.25 }
|
||||||
|
}
|
||||||
|
|
||||||
homedecor.register("trash_can", {
|
homedecor.register("trash_can", {
|
||||||
tiles = {
|
drawtype = "mesh",
|
||||||
"homedecor_trashcan_tb.png",
|
mesh = "homedecor_trash_can.obj",
|
||||||
"homedecor_trashcan_tb.png",
|
tiles = { "homedecor_trash_can.png" },
|
||||||
"homedecor_trashcan_sides.png",
|
inventory_image = "homedecor_trash_can_inv.png",
|
||||||
"homedecor_trashcan_sides.png",
|
|
||||||
"homedecor_trashcan_sides.png",
|
|
||||||
"homedecor_trashcan_sides.png"
|
|
||||||
},
|
|
||||||
inventory_image = "homedecor_trashcan_inv.png",
|
|
||||||
description = "Trash Can",
|
description = "Trash Can",
|
||||||
groups = {snappy=3},
|
groups = {snappy=3},
|
||||||
node_box = {
|
selection_box = trash_cbox,
|
||||||
type = "fixed",
|
collision_box = trash_cbox,
|
||||||
fixed = {
|
|
||||||
{-0.25, -0.5, -0.125, -0.1875, 0.125, 0.125}, -- NodeBox1
|
|
||||||
{0.1875, -0.5, -0.125, 0.25, 0.125, 0.125}, -- NodeBox2
|
|
||||||
{-0.125, -0.5, -0.25, 0.125, 0.125, -0.1875}, -- NodeBox3
|
|
||||||
{-0.125, -0.5, 0.1875, 0.125, 0.125, 0.25}, -- NodeBox4
|
|
||||||
{-0.1875, -0.5, 0.125, -0.125, 0.125, 0.1875}, -- NodeBox5
|
|
||||||
{-0.1875, -0.5, -0.1875, -0.125, 0.125, -0.125}, -- NodeBox6
|
|
||||||
{0.125, -0.5, -0.1875, 0.1875, 0.125, -0.125}, -- NodeBox7
|
|
||||||
{0.125, -0.5, 0.125, 0.1875, 0.125, 0.1875}, -- NodeBox8
|
|
||||||
{-0.1875, -0.5, -0.1875, 0.1875, -0.4375, 0.1875}, -- NodeBox9
|
|
||||||
}
|
|
||||||
},
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = { -0.25, -0.5, -0.25, 0.25, 0.125, 0.25 }
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
homedecor.register("well_base", {
|
homedecor.register("well_base", {
|
||||||
@ -667,47 +651,23 @@ homedecor.register("coat_tree", {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local cutlery_cbox = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{ -5/16, -8/16, -6/16, 5/16, -7/16, 2/16 },
|
||||||
|
{ -2/16, -8/16, 2/16, 2/16, -4/16, 6/16 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
homedecor.register("cutlery_set", {
|
homedecor.register("cutlery_set", {
|
||||||
tiles = {
|
drawtype = "mesh",
|
||||||
"homedecor_cutlery_set_top.png",
|
mesh = "homedecor_cutlery_set.obj",
|
||||||
"homedecor_cutlery_set_sides.png",
|
tiles = { "homedecor_cutlery_set.png" },
|
||||||
"homedecor_cutlery_set_sides.png"
|
|
||||||
},
|
|
||||||
inventory_image = "homedecor_cutlery_set_inv.png",
|
inventory_image = "homedecor_cutlery_set_inv.png",
|
||||||
description = "Cutlery set",
|
description = "Cutlery set",
|
||||||
groups = {snappy=3},
|
groups = {snappy=3},
|
||||||
node_box = {
|
selection_box = cutlery_cbox,
|
||||||
type = "fixed",
|
collision_box = cutlery_cbox
|
||||||
fixed = {
|
|
||||||
{-0.125, -0.5, -0.4375, 0.125, -0.49, -0.1875}, -- NodeBox1
|
|
||||||
{0.035, -0.5, -0.12, 0.042, -0.375, -0.036}, -- NodeBox2
|
|
||||||
{-0.042, -0.5, -0.12, -0.035, -0.375, -0.036}, -- NodeBox3
|
|
||||||
{-0.042, -0.5, -0.12, 0.042, -0.375, -0.112}, -- NodeBox4
|
|
||||||
{-0.042, -0.5, -0.044, 0.042, -0.375, -0.036}, -- NodeBox5
|
|
||||||
{-0.042, -0.40, -0.12, 0.042, -0.5, -0.036}, -- NodeBox6
|
|
||||||
{-0.22, -0.5, -0.45, -0.205, -0.49, -0.245}, -- NodeBox7
|
|
||||||
{-0.23, -0.5, -0.245, -0.195, -0.49, -0.24}, -- NodeBox8
|
|
||||||
{-0.23, -0.5, -0.24, -0.225, -0.49, -0.1875}, -- NodeBox9
|
|
||||||
{-0.22, -0.5, -0.24, -0.215, -0.49, -0.1875}, -- NodeBox10
|
|
||||||
{-0.21, -0.5, -0.24, -0.205, -0.49, -0.1875}, -- NodeBox11
|
|
||||||
{-0.2, -0.5, -0.24, -0.195, -0.49, -0.1875}, -- NodeBox12
|
|
||||||
{0.205, -0.5, -0.45, 0.22, -0.49, -0.3125}, -- NodeBox13
|
|
||||||
{0.193, -0.5, -0.3125, 0.22, -0.49, -0.185839}, -- NodeBox14
|
|
||||||
{0.2, -0.5, -0.322, 0.22, -0.49, -0.175}, -- NodeBox15
|
|
||||||
{-0.1095, -0.5, -0.1875, 0.1095, -0.48, -0.172}, -- NodeBox16
|
|
||||||
{-0.1095, -0.5, -0.453, 0.1095, -0.48, -0.4375}, -- NodeBox17
|
|
||||||
{-0.14, -0.5, -0.422, -0.125, -0.48, -0.203}, -- NodeBox18
|
|
||||||
{0.125, -0.5, -0.422, 0.14, -0.48, -0.203}, -- NodeBox19
|
|
||||||
{-0.125, -0.5, -0.203, -0.1095, -0.48, -0.1875}, -- NodeBox20
|
|
||||||
{0.1095, -0.5, -0.203, 0.125, -0.48, -0.1875}, -- NodeBox21
|
|
||||||
{-0.125, -0.5, -0.4375, -0.1095, -0.48, -0.422}, -- NodeBox22
|
|
||||||
{0.1095, -0.5, -0.4375, 0.125, -0.48, -0.422}, -- NodeBox23
|
|
||||||
}
|
|
||||||
},
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = { -0.25, -0.5, -0.5, 0.25, -0.375, 0 }
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
local bottle_cbox = {
|
local bottle_cbox = {
|
||||||
@ -1090,33 +1050,21 @@ homedecor.register("beer_tap", {
|
|||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local beer_cbox = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = { -5/32, -8/16, -9/32 , 7/32, -2/16, 1/32 }
|
||||||
|
}
|
||||||
|
|
||||||
homedecor.register("beer_mug", {
|
homedecor.register("beer_mug", {
|
||||||
description = "Beer mug",
|
description = "Beer mug",
|
||||||
tiles = {
|
drawtype = "mesh",
|
||||||
"homedecor_beer_top.png",
|
mesh = "homedecor_beer_mug.obj",
|
||||||
"homedecor_beer_bottom.png",
|
tiles = { "homedecor_beer_mug.png" },
|
||||||
"homedecor_beer_right.png",
|
inventory_image = "homedecor_beer_mug_inv.png",
|
||||||
"homedecor_beer_right.png^[transformFX",
|
|
||||||
"homedecor_beer_front.png^[transformFX",
|
|
||||||
"homedecor_beer_front.png"
|
|
||||||
},
|
|
||||||
inventory_image = "homedecor_beer_inv.png",
|
|
||||||
use_texture_alpha = true,
|
|
||||||
groups = { snappy=3, oddly_breakable_by_hand=3 },
|
groups = { snappy=3, oddly_breakable_by_hand=3 },
|
||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
node_box = {
|
selection_box = beer_cbox,
|
||||||
type = "fixed",
|
collision_box = beer_cbox
|
||||||
fixed = {
|
|
||||||
{-0.125, -0.5, -0.25, 0.0625, -0.25, -0.0625}, -- NodeBox1
|
|
||||||
{0.0625, -0.3125, -0.18, 0.135, -0.285, -0.14}, -- NodeBox2
|
|
||||||
{0.1, -0.465, -0.18, 0.135, -0.285, -0.14}, -- NodeBox3
|
|
||||||
{0.0625, -0.465, -0.18, 0.135, -0.4375, -0.14}, -- NodeBox4
|
|
||||||
}
|
|
||||||
},
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = { -0.125, -0.5, -0.25, 0.135, -0.25, -0.0625 }
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
homedecor.register("tool_cabinet_bottom", {
|
homedecor.register("tool_cabinet_bottom", {
|
||||||
|
@ -16,25 +16,33 @@ local shutters = {
|
|||||||
{"white", "White"},
|
{"white", "White"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local shutter_cbox = {
|
||||||
|
type = "wallmounted",
|
||||||
|
wall_top = { -0.5, 0.4375, -0.5, 0.5, 0.5, 0.5 },
|
||||||
|
wall_bottom = { -0.5, -0.5, -0.5, 0.5, -0.4375, 0.5 },
|
||||||
|
wall_side = { -0.5, -0.5, -0.5, -0.4375, 0.5, 0.5 },
|
||||||
|
}
|
||||||
|
|
||||||
for i in ipairs(shutters) do
|
for i in ipairs(shutters) do
|
||||||
local name = shutters[i][1]
|
local name = shutters[i][1]
|
||||||
local desc = shutters[i][2]
|
local desc = shutters[i][2]
|
||||||
|
|
||||||
homedecor.register("shutter_"..name, {
|
homedecor.register("shutter_"..name, {
|
||||||
mesh = "homedecor_window_shutter.obj",
|
mesh = "homedecor_window_shutter.obj",
|
||||||
tiles = { "homedecor_window_shutter_"..name..".png" },
|
tiles = { "homedecor_window_shutter_"..name..".png" },
|
||||||
description = S("Wooden Shutter ("..desc..")"),
|
description = S("Wooden Shutter ("..desc..")"),
|
||||||
inventory_image = "homedecor_window_shutter_"..name.."_inv.png",
|
inventory_image = "homedecor_window_shutter_"..name.."_inv.png",
|
||||||
wield_image = "homedecor_window_shutter_"..name.."_inv.png",
|
wield_image = "homedecor_window_shutter_"..name.."_inv.png",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
groups = { snappy = 3 },
|
groups = { snappy = 3 },
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
selection_box = {
|
selection_box = shutter_cbox,
|
||||||
type = "wallmounted",
|
node_box = shutter_cbox,
|
||||||
-- wall_side = { -0.5, -0.5, 0.44, 0.5, 0.5, 0.5 }
|
-- collision_box doesn't accept type="wallmounted", but node_box
|
||||||
},
|
-- does. Said nodeboxes create a custom collision box but are
|
||||||
})
|
-- invisible themselves because drawtype="mesh".
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_alias("homedecor:shutter_purple", "homedecor:shutter_violet")
|
minetest.register_alias("homedecor:shutter_purple", "homedecor:shutter_violet")
|
||||||
|
Before Width: | Height: | Size: 92 B |
Before Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 3.5 KiB |
BIN
mods/homedecor_modpack/homedecor/textures/homedecor_beer_mug.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 97 B |
After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 848 B |
After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 483 B |
Before Width: | Height: | Size: 168 B |