initial commit
subgame + mods
85
mods/homedecor_modpack/lrfurn/README.txt
Normal file
@ -0,0 +1,85 @@
|
||||
Living Room Furniture (lrfurn) mod for Minetest
|
||||
|
||||
|
||||
by thefamilygrog66
|
||||
|
||||
Description:
|
||||
Coloured Long Sofas (3 blocks wide), Sofas (2 blocks wide), Armchairs, Coffee Tables and End Tables, loosely based on PilzAdam's beds mod. There are 9 colours in all: red, orange, yellow, green, blue, violet, black, grey and white.
|
||||
|
||||
When you right-click on a long sofa, sofa or armchair, it transports you onto it, and replenishes your HP. Good if you've just escaped nasty mobs, didn't fare so well in battle, or just had a bad fall. The coffee table - which isn't coloured, just wooden - is pretty much just for decoration. It stands half a block high and nearly 2 blocks long. The end table is similar to the coffee table, though roughly half the length (i.e. only one block) and square.
|
||||
|
||||
Recipes:
|
||||
|
||||
Long Sofa
|
||||
|
||||
+---------------+---------------+---------------+
|
||||
| coloured wool | coloured wool | coloured wool |
|
||||
+---------------+---------------+---------------+
|
||||
| wood slab | wood slab | wood slab |
|
||||
+---------------+---------------+---------------+
|
||||
| stick | stick | stick |
|
||||
+---------------+---------------+---------------+
|
||||
|
||||
Sofa
|
||||
|
||||
+---------------+---------------+-------+
|
||||
| coloured wool | coloured wool | |
|
||||
+---------------+---------------+-------+
|
||||
| wood slab | wood slab | |
|
||||
+---------------+---------------+-------+
|
||||
| stick | stick | |
|
||||
+---------------+---------------+-------+
|
||||
|
||||
Armchair
|
||||
|
||||
+---------------+-------+-------+
|
||||
| coloured wool | | |
|
||||
+---------------+-------+-------+
|
||||
| wood slab | | |
|
||||
+---------------+-------+-------+
|
||||
| stick | | |
|
||||
+---------------+-------+-------+
|
||||
|
||||
Coffee Table (only wood texture)
|
||||
|
||||
+-----------+-----------+-----------+
|
||||
| | | |
|
||||
+-----------+-----------+-----------+
|
||||
| wood slab | wood slab | wood slab |
|
||||
+-----------+-----------+-----------+
|
||||
| stick | | stick |
|
||||
+-----------+-----------+-----------+
|
||||
|
||||
End Table (only wood texture)
|
||||
|
||||
+-----------+-----------+-----------+
|
||||
| | | |
|
||||
+-----------+-----------+-----------+
|
||||
| wood slab | wood slab | |
|
||||
+-----------+-----------+-----------+
|
||||
| stick | stick | |
|
||||
+-----------+-----------+-----------+
|
||||
|
||||
|
||||
Mod dependencies: default, wool
|
||||
|
||||
License:
|
||||
Sourcecode: WTFPL (see below)
|
||||
Graphics: WTFPL (see below)
|
||||
|
||||
See also:
|
||||
http://minetest.net/
|
||||
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
Version 2, December 2004
|
||||
|
||||
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim or modified
|
||||
copies of this license document, and changing it is allowed as long
|
||||
as the name is changed.
|
||||
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. You just DO WHAT THE FUCK YOU WANT TO.
|
94
mods/homedecor_modpack/lrfurn/armchairs.lua
Normal file
@ -0,0 +1,94 @@
|
||||
local armchairs_list = {
|
||||
{ "Red Armchair", "red"},
|
||||
{ "Orange Armchair", "orange"},
|
||||
{ "Yellow Armchair", "yellow"},
|
||||
{ "Green Armchair", "green"},
|
||||
{ "Blue Armchair", "blue"},
|
||||
{ "Violet Armchair", "violet"},
|
||||
{ "Black Armchair", "black"},
|
||||
{ "Grey Armchair", "grey"},
|
||||
{ "White Armchair", "white"},
|
||||
}
|
||||
|
||||
for i in ipairs(armchairs_list) do
|
||||
local armchairdesc = armchairs_list[i][1]
|
||||
local colour = armchairs_list[i][2]
|
||||
|
||||
minetest.register_node("lrfurn:armchair_"..colour, {
|
||||
description = armchairdesc,
|
||||
drawtype = "nodebox",
|
||||
tiles = {"lrfurn_armchair_top_"..colour..".png", "lrfurn_coffeetable_back.png", "lrfurn_sofa_left_side_"..colour..".png", "lrfurn_sofa_right_side_"..colour..".png", "lrfurn_sofa_back_"..colour..".png", "lrfurn_armchair_front_"..colour..".png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
stack_max = 1,
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
--legs
|
||||
{-0.4375, -0.5, -0.4375, -0.375, -0.375, -0.375},
|
||||
{0.375, -0.5, -0.4375, 0.4375, -0.375, -0.375},
|
||||
{-0.4375, -0.5, 0.375, -0.375, -0.375, 0.4375},
|
||||
{0.375, -0.5, 0.375, 0.4375, -0.375, 0.4375},
|
||||
|
||||
--base/cushion
|
||||
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
|
||||
|
||||
--back
|
||||
{-0.5, 0, 0.3125, 0.5, 0.5, 0.5},
|
||||
|
||||
--arms
|
||||
{-0.5, 0, -0.5, -0.3125, 0.25, 0.3125},
|
||||
{0.3125, 0, -0.5, 0.5, 0.25, 0.3125},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
}
|
||||
},
|
||||
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
if not clicker:is_player() then
|
||||
return
|
||||
end
|
||||
pos.y = pos.y-0.5
|
||||
clicker:setpos(pos)
|
||||
clicker:set_hp(20)
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "lrfurn:armchair_"..colour,
|
||||
recipe = {
|
||||
{"wool:"..colour, "", "", },
|
||||
{"stairs:slab_wood", "", "", },
|
||||
{"group:stick", "", "", }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "lrfurn:armchair_"..colour,
|
||||
recipe = {
|
||||
{"wool:"..colour, "", "", },
|
||||
{"moreblocks:slab_wood", "", "", },
|
||||
{"group:stick", "", "", }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "lrfurn:armchair_"..colour,
|
||||
recipe = {
|
||||
{"wool:"..colour, "", "", },
|
||||
{"group:wood_slab", "", "", },
|
||||
{"group:stick", "", "", }
|
||||
}
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
if minetest.setting_get("log_mods") then
|
||||
minetest.log("action", "armchairs loaded")
|
||||
end
|
123
mods/homedecor_modpack/lrfurn/coffeetable.lua
Normal file
@ -0,0 +1,123 @@
|
||||
minetest.register_node("lrfurn:coffeetable_back", {
|
||||
description = "Coffee Table",
|
||||
drawtype = "nodebox",
|
||||
tiles = {"lrfurn_coffeetable_back.png", "lrfurn_coffeetable_back.png", "lrfurn_coffeetable_back.png", "lrfurn_coffeetable_back.png", "lrfurn_coffeetable_back.png", "lrfurn_coffeetable_back.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
stack_max = 1,
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
--legs
|
||||
{-0.375, -0.5, -0.375, -0.3125, -0.0625, -0.3125},
|
||||
{0.3125, -0.5, -0.375, 0.375, -0.0625, -0.3125},
|
||||
|
||||
--tabletop
|
||||
{-0.4375, -0.0625, -0.4375, 0.4375, 0, 0.5},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.4375, -0.5, -0.4375, 0.4375, 0.0, 1.4375},
|
||||
}
|
||||
},
|
||||
|
||||
on_construct = function(pos)
|
||||
local node = minetest.env:get_node(pos)
|
||||
local param2 = node.param2
|
||||
node.name = "lrfurn:coffeetable_front"
|
||||
if param2 == 0 then
|
||||
pos.z = pos.z+1
|
||||
elseif param2 == 1 then
|
||||
pos.x = pos.x+1
|
||||
elseif param2 == 2 then
|
||||
pos.z = pos.z-1
|
||||
elseif param2 == 3 then
|
||||
pos.x = pos.x-1
|
||||
end
|
||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).name == "air" ) then
|
||||
minetest.env:set_node(pos, node)
|
||||
end
|
||||
end,
|
||||
|
||||
on_destruct = function(pos)
|
||||
local node = minetest.env:get_node(pos)
|
||||
local param2 = node.param2
|
||||
if param2 == 0 then
|
||||
pos.z = pos.z+1
|
||||
elseif param2 == 1 then
|
||||
pos.x = pos.x+1
|
||||
elseif param2 == 2 then
|
||||
pos.z = pos.z-1
|
||||
elseif param2 == 3 then
|
||||
pos.x = pos.x-1
|
||||
end
|
||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:coffeetable_front" ) then
|
||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
|
||||
minetest.env:remove_node(pos)
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("lrfurn:coffeetable_front", {
|
||||
drawtype = "nodebox",
|
||||
tiles = {"lrfurn_coffeetable_front.png", "lrfurn_coffeetable_front.png", "lrfurn_coffeetable_front.png", "lrfurn_coffeetable_front.png", "lrfurn_coffeetable_front.png", "lrfurn_coffeetable_front.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
--legs
|
||||
{-0.375, -0.5, 0.3125, -0.3125, -0.0625, 0.375},
|
||||
{0.3125, -0.5, 0.3125, 0.375, -0.0625, 0.375},
|
||||
|
||||
--tabletop
|
||||
{-0.4375, -0.0625, -0.5, 0.4375, 0, 0.4375},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{0, 0, 0, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_alias("lrfurn:coffeetable", "lrfurn:coffeetable_back")
|
||||
|
||||
minetest.register_craft({
|
||||
output = "lrfurn:coffeetable",
|
||||
recipe = {
|
||||
{"", "", "", },
|
||||
{"stairs:slab_wood", "stairs:slab_wood", "stairs:slab_wood", },
|
||||
{"group:stick", "", "group:stick", }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "lrfurn:coffeetable",
|
||||
recipe = {
|
||||
{"", "", "", },
|
||||
{"moreblocks:slab_wood", "moreblocks:slab_wood", "moreblocks:slab_wood", },
|
||||
{"group:stick", "", "group:stick", }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "lrfurn:coffeetable",
|
||||
recipe = {
|
||||
{"", "", "", },
|
||||
{"group:wood_slab", "group:wood_slab", "group:wood_slab", },
|
||||
{"group:stick", "", "group:stick", }
|
||||
}
|
||||
})
|
||||
|
||||
if minetest.setting_get("log_mods") then
|
||||
minetest.log("action", "coffeetable loaded")
|
||||
end
|
2
mods/homedecor_modpack/lrfurn/depends.txt
Normal file
@ -0,0 +1,2 @@
|
||||
default
|
||||
wool
|
60
mods/homedecor_modpack/lrfurn/endtable.lua
Normal file
@ -0,0 +1,60 @@
|
||||
minetest.register_node("lrfurn:endtable", {
|
||||
description = "End Table",
|
||||
drawtype = "nodebox",
|
||||
tiles = {"lrfurn_coffeetable_back.png", "lrfurn_coffeetable_back.png", "lrfurn_coffeetable_back.png", "lrfurn_coffeetable_back.png", "lrfurn_coffeetable_back.png", "lrfurn_coffeetable_back.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
stack_max = 1,
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
--legs
|
||||
{-0.375, -0.5, -0.375, -0.3125, -0.0625, -0.3125},
|
||||
{0.3125, -0.5, -0.375, 0.375, -0.0625, -0.3125},
|
||||
{-0.375, -0.5, 0.3125, -0.3125, -0.0625, 0.375},
|
||||
{0.3125, -0.5, 0.3125, 0.375, -0.0625, 0.375},
|
||||
|
||||
--tabletop
|
||||
{-0.4375, -0.0625, -0.4375, 0.4375, 0, 0.4375},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.4375, -0.5, -0.4375, 0.4375, 0.0, 0.4375},
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "lrfurn:endtable",
|
||||
recipe = {
|
||||
{"", "", "", },
|
||||
{"stairs:slab_wood", "stairs:slab_wood", "", },
|
||||
{"group:stick", "group:stick", "", }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "lrfurn:endtable",
|
||||
recipe = {
|
||||
{"", "", "", },
|
||||
{"moreblocks:slab_wood", "moreblocks:slab_wood", "", },
|
||||
{"group:stick", "group:stick", "", }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "lrfurn:endtable",
|
||||
recipe = {
|
||||
{"", "", "", },
|
||||
{"group:wood_slab", "group:wood_slab", "", },
|
||||
{"group:stick", "group:stick", "", }
|
||||
}
|
||||
})
|
||||
|
||||
if minetest.setting_get("log_mods") then
|
||||
minetest.log("action", "endtable loaded")
|
||||
end
|
5
mods/homedecor_modpack/lrfurn/init.lua
Normal file
@ -0,0 +1,5 @@
|
||||
dofile(minetest.get_modpath("lrfurn").."/longsofas.lua")
|
||||
dofile(minetest.get_modpath("lrfurn").."/sofas.lua")
|
||||
dofile(minetest.get_modpath("lrfurn").."/armchairs.lua")
|
||||
dofile(minetest.get_modpath("lrfurn").."/coffeetable.lua")
|
||||
dofile(minetest.get_modpath("lrfurn").."/endtable.lua")
|
218
mods/homedecor_modpack/lrfurn/longsofas.lua
Normal file
@ -0,0 +1,218 @@
|
||||
local longsofas_list = {
|
||||
{ "Red Long Sofa", "red"},
|
||||
{ "Orange Long Sofa", "orange"},
|
||||
{ "Yellow Long Sofa", "yellow"},
|
||||
{ "Green Long Sofa", "green"},
|
||||
{ "Blue Long Sofa", "blue"},
|
||||
{ "Violet Long Sofa", "violet"},
|
||||
{ "Black Long Sofa", "black"},
|
||||
{ "Grey Long Sofa", "grey"},
|
||||
{ "White Long Sofa", "white"},
|
||||
}
|
||||
|
||||
for i in ipairs(longsofas_list) do
|
||||
local longsofadesc = longsofas_list[i][1]
|
||||
local colour = longsofas_list[i][2]
|
||||
|
||||
minetest.register_node("lrfurn:longsofa_right_"..colour, {
|
||||
description = longsofadesc,
|
||||
drawtype = "nodebox",
|
||||
tiles = {"lrfurn_sofa_right_top_"..colour..".png", "lrfurn_coffeetable_back.png", "lrfurn_sofa_right_front_"..colour..".png", "lrfurn_sofa_back_"..colour..".png", "lrfurn_sofa_left_side_"..colour..".png", "lrfurn_sofa_right_side_"..colour..".png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
stack_max = 1,
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
--legs
|
||||
{-0.4375, -0.5, -0.4375, -0.375, -0.375, -0.375},
|
||||
{0.375, -0.5, -0.4375, 0.4375, -0.375, -0.375},
|
||||
|
||||
--base/cushion
|
||||
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
|
||||
|
||||
--back
|
||||
{-0.5, 0, -0.5, -0.3125, 0.5, 0.5},
|
||||
|
||||
--arm
|
||||
{-0.3125, 0, -0.5, 0.5, 0.25, -0.3125},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 2.5},
|
||||
}
|
||||
},
|
||||
|
||||
on_construct = function(pos)
|
||||
local node = minetest.env:get_node(pos)
|
||||
local param2 = node.param2
|
||||
node.name = "lrfurn:longsofa_middle_"..colour
|
||||
if param2 == 0 then
|
||||
pos.z = pos.z+1
|
||||
elseif param2 == 1 then
|
||||
pos.x = pos.x+1
|
||||
elseif param2 == 2 then
|
||||
pos.z = pos.z-1
|
||||
elseif param2 == 3 then
|
||||
pos.x = pos.x-1
|
||||
end
|
||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).name == "air" ) then
|
||||
minetest.env:set_node(pos, node)
|
||||
node.name = "lrfurn:longsofa_left_"..colour
|
||||
if param2 == 0 then
|
||||
pos.z = pos.z+1
|
||||
elseif param2 == 1 then
|
||||
pos.x = pos.x+1
|
||||
elseif param2 == 2 then
|
||||
pos.z = pos.z-1
|
||||
elseif param2 == 3 then
|
||||
pos.x = pos.x-1
|
||||
end
|
||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).name == "air" ) then
|
||||
minetest.env:set_node(pos, node)
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
||||
on_destruct = function(pos)
|
||||
local node = minetest.env:get_node(pos)
|
||||
local param2 = node.param2
|
||||
if param2 == 0 then
|
||||
pos.z = pos.z+1
|
||||
elseif param2 == 1 then
|
||||
pos.x = pos.x+1
|
||||
elseif param2 == 2 then
|
||||
pos.z = pos.z-1
|
||||
elseif param2 == 3 then
|
||||
pos.x = pos.x-1
|
||||
end
|
||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:longsofa_middle_"..colour ) then
|
||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
|
||||
minetest.env:remove_node(pos)
|
||||
if param2 == 0 then
|
||||
pos.z = pos.z+1
|
||||
elseif param2 == 1 then
|
||||
pos.x = pos.x+1
|
||||
elseif param2 == 2 then
|
||||
pos.z = pos.z-1
|
||||
elseif param2 == 3 then
|
||||
pos.x = pos.x-1
|
||||
end
|
||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:longsofa_left_"..colour ) then
|
||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
|
||||
minetest.env:remove_node(pos)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
if not clicker:is_player() then
|
||||
return
|
||||
end
|
||||
pos.y = pos.y-0.5
|
||||
clicker:setpos(pos)
|
||||
clicker:set_hp(20)
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("lrfurn:longsofa_middle_"..colour, {
|
||||
drawtype = "nodebox",
|
||||
tiles = {"lrfurn_longsofa_middle_top_"..colour..".png", "lrfurn_coffeetable_back.png", "lrfurn_longsofa_middle_front_"..colour..".png", "lrfurn_sofa_back_"..colour..".png", "lrfurn_sofa_left_side_"..colour..".png", "lrfurn_sofa_right_side_"..colour..".png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
--legs
|
||||
{-0.4375, -0.5, -0.03125, -0.375, -0.375, 0.03125},
|
||||
{0.375, -0.5, -0.03125, 0.4375, -0.375, 0.03125},
|
||||
|
||||
--base/cushion
|
||||
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
|
||||
|
||||
--back
|
||||
{-0.5, 0, -0.5, -0.3125, 0.5, 0.5},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{0, 0, 0, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("lrfurn:longsofa_left_"..colour, {
|
||||
drawtype = "nodebox",
|
||||
tiles = {"lrfurn_sofa_left_top_"..colour..".png", "lrfurn_coffeetable_back.png", "lrfurn_sofa_left_front_"..colour..".png", "lrfurn_sofa_back_"..colour..".png", "lrfurn_sofa_left_side_"..colour..".png", "lrfurn_sofa_right_side_"..colour..".png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
--legs
|
||||
{-0.4375, -0.5, 0.375, -0.375, -0.375, 0.4375},
|
||||
{0.375, -0.5, 0.375, 0.4375, -0.375, 0.4375},
|
||||
|
||||
--base/cushion
|
||||
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
|
||||
|
||||
--back
|
||||
{-0.5, 0, -0.5, -0.3125, 0.5, 0.5},
|
||||
|
||||
--arm
|
||||
{-0.3125, 0, 0.3125, 0.5, 0.25, 0.5},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{0, 0, 0, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_alias("lrfurn:longsofa_"..colour, "lrfurn:longsofa_right_"..colour)
|
||||
|
||||
minetest.register_craft({
|
||||
output = "lrfurn:longsofa_"..colour,
|
||||
recipe = {
|
||||
{"wool:"..colour, "wool:"..colour, "wool:"..colour, },
|
||||
{"stairs:slab_wood", "stairs:slab_wood", "stairs:slab_wood", },
|
||||
{"group:stick", "group:stick", "group:stick", }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "lrfurn:longsofa_"..colour,
|
||||
recipe = {
|
||||
{"wool:"..colour, "wool:"..colour, "wool:"..colour, },
|
||||
{"moreblocks:slab_wood", "moreblocks:slab_wood", "moreblocks:slab_wood", },
|
||||
{"group:stick", "group:stick", "group:stick", }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "lrfurn:longsofa_"..colour,
|
||||
recipe = {
|
||||
{"wool:"..colour, "wool:"..colour, "wool:"..colour, },
|
||||
{"group:wood_slab", "group:wood_slab", "group:wood_slab", },
|
||||
{"group:stick", "group:stick", "group:stick", }
|
||||
}
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
if minetest.setting_get("log_mods") then
|
||||
minetest.log("action", "long sofas loaded")
|
||||
end
|
162
mods/homedecor_modpack/lrfurn/sofas.lua
Normal file
@ -0,0 +1,162 @@
|
||||
local sofas_list = {
|
||||
{ "Red Sofa", "red"},
|
||||
{ "Orange Sofa", "orange"},
|
||||
{ "Yellow Sofa", "yellow"},
|
||||
{ "Green Sofa", "green"},
|
||||
{ "Blue Sofa", "blue"},
|
||||
{ "Violet Sofa", "violet"},
|
||||
{ "Black Sofa", "black"},
|
||||
{ "Grey Sofa", "grey"},
|
||||
{ "White Sofa", "white"},
|
||||
}
|
||||
|
||||
for i in ipairs(sofas_list) do
|
||||
local sofadesc = sofas_list[i][1]
|
||||
local colour = sofas_list[i][2]
|
||||
|
||||
minetest.register_node("lrfurn:sofa_right_"..colour, {
|
||||
description = sofadesc,
|
||||
drawtype = "nodebox",
|
||||
tiles = {"lrfurn_sofa_right_top_"..colour..".png", "lrfurn_coffeetable_back.png", "lrfurn_sofa_right_front_"..colour..".png", "lrfurn_sofa_back_"..colour..".png", "lrfurn_sofa_left_side_"..colour..".png", "lrfurn_sofa_right_side_"..colour..".png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
stack_max = 1,
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
--legs
|
||||
{-0.4375, -0.5, -0.4375, -0.375, -0.375, -0.375},
|
||||
{0.375, -0.5, -0.4375, 0.4375, -0.375, -0.375},
|
||||
|
||||
--base/cushion
|
||||
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
|
||||
|
||||
--back
|
||||
{-0.5, 0, -0.5, -0.3125, 0.5, 0.5},
|
||||
|
||||
--arm
|
||||
{-0.3125, 0, -0.5, 0.5, 0.25, -0.3125},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 1.5},
|
||||
}
|
||||
},
|
||||
|
||||
on_construct = function(pos)
|
||||
local node = minetest.env:get_node(pos)
|
||||
local param2 = node.param2
|
||||
node.name = "lrfurn:sofa_left_"..colour
|
||||
if param2 == 0 then
|
||||
pos.z = pos.z+1
|
||||
elseif param2 == 1 then
|
||||
pos.x = pos.x+1
|
||||
elseif param2 == 2 then
|
||||
pos.z = pos.z-1
|
||||
elseif param2 == 3 then
|
||||
pos.x = pos.x-1
|
||||
end
|
||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).name == "air" ) then
|
||||
minetest.env:set_node(pos, node)
|
||||
end
|
||||
end,
|
||||
|
||||
on_destruct = function(pos)
|
||||
local node = minetest.env:get_node(pos)
|
||||
local param2 = node.param2
|
||||
if param2 == 0 then
|
||||
pos.z = pos.z+1
|
||||
elseif param2 == 1 then
|
||||
pos.x = pos.x+1
|
||||
elseif param2 == 2 then
|
||||
pos.z = pos.z-1
|
||||
elseif param2 == 3 then
|
||||
pos.x = pos.x-1
|
||||
end
|
||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:sofa_left_"..colour ) then
|
||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
|
||||
minetest.env:remove_node(pos)
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
if not clicker:is_player() then
|
||||
return
|
||||
end
|
||||
pos.y = pos.y-0.5
|
||||
clicker:setpos(pos)
|
||||
clicker:set_hp(20)
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("lrfurn:sofa_left_"..colour, {
|
||||
drawtype = "nodebox",
|
||||
tiles = {"lrfurn_sofa_left_top_"..colour..".png", "lrfurn_coffeetable_back.png", "lrfurn_sofa_left_front_"..colour..".png", "lrfurn_sofa_back_"..colour..".png", "lrfurn_sofa_left_side_"..colour..".png", "lrfurn_sofa_right_side_"..colour..".png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
--legs
|
||||
{-0.4375, -0.5, 0.375, -0.375, -0.375, 0.4375},
|
||||
{0.375, -0.5, 0.375, 0.4375, -0.375, 0.4375},
|
||||
|
||||
--base/cushion
|
||||
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
|
||||
|
||||
--back
|
||||
{-0.5, 0, -0.5, -0.3125, 0.5, 0.5},
|
||||
|
||||
--arm
|
||||
{-0.3125, 0, 0.3125, 0.5, 0.25, 0.5},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{0, 0, 0, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_alias("lrfurn:sofa_"..colour, "lrfurn:sofa_right_"..colour)
|
||||
|
||||
minetest.register_craft({
|
||||
output = "lrfurn:sofa_"..colour,
|
||||
recipe = {
|
||||
{"wool:"..colour, "wool:"..colour, "", },
|
||||
{"stairs:slab_wood", "stairs:slab_wood", "", },
|
||||
{"group:stick", "group:stick", "", }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "lrfurn:sofa_"..colour,
|
||||
recipe = {
|
||||
{"wool:"..colour, "wool:"..colour, "", },
|
||||
{"moreblocks:slab_wood", "moreblocks:slab_wood", "", },
|
||||
{"group:stick", "group:stick", "", }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "lrfurn:sofa_"..colour,
|
||||
recipe = {
|
||||
{"wool:"..colour, "wool:"..colour, "", },
|
||||
{"group:wood_slab", "group:wood_slab", "", },
|
||||
{"group:stick", "group:stick", "", }
|
||||
}
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
if minetest.setting_get("log_mods") then
|
||||
minetest.log("action", "sofas loaded")
|
||||
end
|
After Width: | Height: | Size: 430 B |
After Width: | Height: | Size: 464 B |
After Width: | Height: | Size: 442 B |
After Width: | Height: | Size: 426 B |
After Width: | Height: | Size: 483 B |
After Width: | Height: | Size: 466 B |
After Width: | Height: | Size: 492 B |
After Width: | Height: | Size: 441 B |
After Width: | Height: | Size: 426 B |
After Width: | Height: | Size: 301 B |
After Width: | Height: | Size: 417 B |
After Width: | Height: | Size: 408 B |
After Width: | Height: | Size: 330 B |
After Width: | Height: | Size: 448 B |
After Width: | Height: | Size: 408 B |
After Width: | Height: | Size: 471 B |
After Width: | Height: | Size: 319 B |
After Width: | Height: | Size: 314 B |
After Width: | Height: | Size: 523 B |
After Width: | Height: | Size: 532 B |
After Width: | Height: | Size: 408 B |
After Width: | Height: | Size: 444 B |
After Width: | Height: | Size: 425 B |
After Width: | Height: | Size: 400 B |
After Width: | Height: | Size: 461 B |
After Width: | Height: | Size: 442 B |
After Width: | Height: | Size: 471 B |
After Width: | Height: | Size: 418 B |
After Width: | Height: | Size: 404 B |
After Width: | Height: | Size: 266 B |
After Width: | Height: | Size: 316 B |
After Width: | Height: | Size: 318 B |
After Width: | Height: | Size: 259 B |
After Width: | Height: | Size: 445 B |
After Width: | Height: | Size: 321 B |
After Width: | Height: | Size: 465 B |
After Width: | Height: | Size: 266 B |
After Width: | Height: | Size: 259 B |
After Width: | Height: | Size: 270 B |
BIN
mods/homedecor_modpack/lrfurn/textures/lrfurn_sofa_back_blue.png
Normal file
After Width: | Height: | Size: 277 B |
After Width: | Height: | Size: 273 B |
BIN
mods/homedecor_modpack/lrfurn/textures/lrfurn_sofa_back_grey.png
Normal file
After Width: | Height: | Size: 271 B |
After Width: | Height: | Size: 280 B |
BIN
mods/homedecor_modpack/lrfurn/textures/lrfurn_sofa_back_red.png
Normal file
After Width: | Height: | Size: 278 B |
After Width: | Height: | Size: 275 B |
After Width: | Height: | Size: 271 B |
After Width: | Height: | Size: 271 B |
After Width: | Height: | Size: 430 B |
After Width: | Height: | Size: 467 B |
After Width: | Height: | Size: 445 B |
After Width: | Height: | Size: 421 B |
After Width: | Height: | Size: 486 B |
After Width: | Height: | Size: 470 B |
After Width: | Height: | Size: 497 B |
After Width: | Height: | Size: 440 B |
After Width: | Height: | Size: 422 B |
After Width: | Height: | Size: 412 B |
After Width: | Height: | Size: 447 B |
After Width: | Height: | Size: 433 B |
After Width: | Height: | Size: 405 B |
After Width: | Height: | Size: 466 B |
After Width: | Height: | Size: 422 B |
After Width: | Height: | Size: 464 B |
After Width: | Height: | Size: 421 B |
After Width: | Height: | Size: 504 B |
After Width: | Height: | Size: 301 B |
After Width: | Height: | Size: 374 B |
After Width: | Height: | Size: 383 B |
After Width: | Height: | Size: 290 B |
After Width: | Height: | Size: 422 B |
After Width: | Height: | Size: 317 B |
After Width: | Height: | Size: 520 B |
After Width: | Height: | Size: 295 B |
After Width: | Height: | Size: 298 B |
After Width: | Height: | Size: 429 B |
After Width: | Height: | Size: 467 B |
After Width: | Height: | Size: 446 B |
After Width: | Height: | Size: 425 B |
After Width: | Height: | Size: 488 B |
After Width: | Height: | Size: 470 B |
After Width: | Height: | Size: 499 B |
After Width: | Height: | Size: 440 B |
After Width: | Height: | Size: 422 B |
After Width: | Height: | Size: 408 B |
After Width: | Height: | Size: 444 B |
After Width: | Height: | Size: 431 B |
After Width: | Height: | Size: 406 B |
After Width: | Height: | Size: 464 B |
After Width: | Height: | Size: 421 B |
After Width: | Height: | Size: 463 B |
After Width: | Height: | Size: 419 B |
After Width: | Height: | Size: 402 B |