hades_furniture: Indent
parent
a7aadbdf3e
commit
d5381cf87b
|
@ -36,329 +36,329 @@ local S = minetest.get_translator("hades_furniture")
|
||||||
|
|
||||||
--[[ ----- Basic furniture ----- ]]
|
--[[ ----- Basic furniture ----- ]]
|
||||||
|
|
||||||
-- Table and chair
|
-- Table and chair
|
||||||
local furniture_colors = {
|
local furniture_colors = {
|
||||||
{"_uncolored", S("Uncolored Table"), S("Uncolored Chair")},
|
{"_uncolored", S("Uncolored Table"), S("Uncolored Chair")},
|
||||||
{"_black", S("Black Table"), S("Black Chair")},
|
{"_black", S("Black Table"), S("Black Chair")},
|
||||||
{"_white", S("White Table"), S("White Chair")},
|
{"_white", S("White Table"), S("White Chair")},
|
||||||
}
|
}
|
||||||
for f=1, #furniture_colors do
|
for f=1, #furniture_colors do
|
||||||
local append = furniture_colors[f][1]
|
local append = furniture_colors[f][1]
|
||||||
local desc_t = furniture_colors[f][2]
|
local desc_t = furniture_colors[f][2]
|
||||||
local desc_c = furniture_colors[f][3]
|
local desc_c = furniture_colors[f][3]
|
||||||
|
|
||||||
-- Table
|
-- Table
|
||||||
minetest.register_node("hades_furniture:table"..append,
|
minetest.register_node("hades_furniture:table"..append,
|
||||||
{description = desc_t,
|
{description = desc_t,
|
||||||
tiles = {
|
|
||||||
"hades_furniture_wood"..append..".png",
|
|
||||||
},
|
|
||||||
drawtype = "nodebox",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
paramtype = 'light',
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
is_ground_content = false,
|
|
||||||
node_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.4,-0.5,-0.4, -0.3,0.4,-0.3},
|
|
||||||
{0.3,-0.5,-0.4, 0.4,0.4,-0.3},
|
|
||||||
{-0.4,-0.5,0.3, -0.3,0.4,0.4},
|
|
||||||
{0.3,-0.5,0.3, 0.4,0.4,0.4},
|
|
||||||
{-0.5,0.4,-0.5, 0.5,0.5,0.5},
|
|
||||||
{-0.4,-0.2,-0.3, -0.3,-0.1,0.3},
|
|
||||||
{0.3,-0.2,-0.4, 0.4,-0.1,0.3},
|
|
||||||
{-0.3,-0.2,-0.4, 0.4,-0.1,-0.3},
|
|
||||||
{-0.3,-0.2,0.3, 0.3,-0.1,0.4},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
groups = {table=1, choppy=3,oddly_breakable_by_hand=2},
|
|
||||||
sounds = hades_sounds.node_sound_wood_defaults(),
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Chair
|
|
||||||
minetest.register_node("hades_furniture:chair"..append,
|
|
||||||
{ description = desc_c,
|
|
||||||
tiles = {
|
|
||||||
"hades_furniture_wood"..append..".png",
|
|
||||||
},
|
|
||||||
drawtype = "nodebox",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
paramtype = 'light',
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
is_ground_content = false,
|
|
||||||
_hades_itemshow_offset = { x=-0.118, y=0, z=-0.118 },
|
|
||||||
node_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.3,-0.5,0.2, -0.2,0.5,0.3},
|
|
||||||
{0.2,-0.5,0.2, 0.3,0.5,0.3},
|
|
||||||
{-0.3,-0.5,-0.3, -0.2,-0.1,-0.2},
|
|
||||||
{0.2,-0.5,-0.3, 0.3,-0.1,-0.2},
|
|
||||||
{-0.3,-0.1,-0.3, 0.3,0,0.2},
|
|
||||||
{-0.2,0.1,0.25, 0.2,0.4,0.26}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3},
|
|
||||||
},
|
|
||||||
groups = {chair=1, choppy=3,oddly_breakable_by_hand=2},
|
|
||||||
sounds = hades_sounds.node_sound_wood_defaults(),
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
local armchair_colors = {
|
|
||||||
{"", S("Black Armchair")},
|
|
||||||
{"_white", S("White Armchair")},
|
|
||||||
{"_red", S("Red Armchair")},
|
|
||||||
{"_brown", S("Brown Armchair")},
|
|
||||||
{"_blue", S("Blue Armchair")},
|
|
||||||
{"_dark_green", S("Dark Green Armchair")},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Armchair
|
|
||||||
for a=1, #armchair_colors do
|
|
||||||
local append = armchair_colors[a][1]
|
|
||||||
local desc = armchair_colors[a][2]
|
|
||||||
minetest.register_node("hades_furniture:armchair"..append,
|
|
||||||
{ description = desc,
|
|
||||||
tiles = {
|
|
||||||
"hades_furniture_armchair_top"..append..".png",
|
|
||||||
"hades_furniture_armchair_top"..append..".png",
|
|
||||||
"hades_furniture_armchair_lat1"..append..".png",
|
|
||||||
"hades_furniture_armchair_lat1"..append..".png",
|
|
||||||
"hades_furniture_armchair_lat2"..append..".png",
|
|
||||||
"hades_furniture_armchair_lat2"..append..".png",
|
|
||||||
},
|
|
||||||
drawtype = "nodebox",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
paramtype = 'light',
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
is_ground_content = false,
|
|
||||||
node_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
--lat 1
|
|
||||||
{-0.5,-0.5,-0.45, -0.3,0.05,0.3},
|
|
||||||
{-0.45,-0.5,-0.5, -0.35,0.05,-0.45},
|
|
||||||
{-0.45,0.05,-0.45, -0.35,0.1,0.15},
|
|
||||||
--lat 2
|
|
||||||
{0.3,-0.5,-0.45, 0.5,0.05,0.3},{0.35,-0.5,-0.5,0.45,0.05,-0.45},{0.35,0.05,-0.45, 0.45,0.1,0.15},
|
|
||||||
--respaldo
|
|
||||||
{-0.5,-0.5,0.3, 0.5,0.45,0.5},{-0.45,0.45,0.35,0.45,0.5,0.45},
|
|
||||||
--base
|
|
||||||
{-0.3,-0.45,-0.35, 0.3,-0.1,0.3},{-0.3,-0.45,-0.4, 0.3,-0.15,-0.35},
|
|
||||||
|
|
||||||
--oreja 1
|
|
||||||
{-0.5,0.05,0.15, -0.3,0.45, 0.3},{-0.45,0.1,0.1, -0.35,0.45,0.15},{-0.45,0.45,0.15,-0.35,0.5,0.35},
|
|
||||||
--oreja 2
|
|
||||||
{0.3,0.05,0.15, 0.5,0.45,0.3},{0.35,0.1,0.1, 0.45,0.45,0.15},{0.35,0.45,0.15,0.45,0.5,0.35},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}
|
|
||||||
},
|
|
||||||
groups = {armchair=1, choppy=3,oddly_breakable_by_hand=2},
|
|
||||||
sounds = hades_sounds.node_sound_wood_defaults({
|
|
||||||
footstep = hades_sounds.node_sound_cloth_defaults().footstep,
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Table Lamp
|
|
||||||
local lamps = {
|
|
||||||
{ "off", "max", },
|
|
||||||
{ "low", "off", 4 },
|
|
||||||
{ "med", "low", 8 },
|
|
||||||
{ "hi", "med", 12 },
|
|
||||||
{ "max", "hi", minetest.LIGHT_MAX },
|
|
||||||
}
|
|
||||||
for l=1, #lamps do
|
|
||||||
local drop, not_in_creative_inventory, tt, desc
|
|
||||||
if l ~= 1 then
|
|
||||||
drop = "hades_furniture:table_lamp_off"
|
|
||||||
not_in_creative_inventory = 1
|
|
||||||
desc = S("Table Lamp (level @1)", l)
|
|
||||||
else
|
|
||||||
tt = S("4 different luminance levels")
|
|
||||||
desc = S("Table Lamp")
|
|
||||||
end
|
|
||||||
minetest.register_node("hades_furniture:table_lamp_"..lamps[l][1], {
|
|
||||||
description = desc,
|
|
||||||
_tt_help = tt,
|
|
||||||
drawtype = "nodebox",
|
|
||||||
tiles = {
|
|
||||||
"hades_furniture_table_lamp_s.png",
|
|
||||||
"hades_furniture_table_lamp_s.png",
|
|
||||||
"hades_furniture_table_lamp_l.png",
|
|
||||||
},
|
|
||||||
use_texture_alpha = "clip",
|
|
||||||
paramtype = 'light',
|
|
||||||
paramtype2 = 'facedir',
|
|
||||||
is_ground_content = false,
|
|
||||||
node_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
--Lamp Base
|
|
||||||
{-0.15,-0.5,-0.15, 0.15,-0.45,0.15},
|
|
||||||
{-0.05,-0.45,-0.05, 0.05,-0.4,0.05},
|
|
||||||
{-0.025,-0.4,-0.025, 0.025,-0.1,0.025},
|
|
||||||
{-0.0125,-0.125,-0.2, 0.0125,-0.1,0.2},
|
|
||||||
{-0.2,-0.125,-0.0125, 0.2,-0.1,0.0125},
|
|
||||||
|
|
||||||
--Lamp Shade
|
|
||||||
{-0.2,-0.1,-0.2, -0.175,0.3,0.2},
|
|
||||||
{0.175,-0.1,-0.2, 0.2,0.3,0.2},
|
|
||||||
{-0.175,-0.1,-0.2, 0.175,0.3,-0.175},
|
|
||||||
{-0.175,-0.1,0.175, 0.175,0.3,0.2},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
light_source = lamps[l][3],
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.2, -0.5, -0.2, 0.2, 0.3, 0.2},
|
|
||||||
},
|
|
||||||
groups = {cracky=2,oddly_breakable_by_hand=1,not_in_creative_inventory=not_in_creative_inventory},
|
|
||||||
drop = drop,
|
|
||||||
sounds = hades_sounds.node_sound_wood_defaults(),
|
|
||||||
on_rightclick = function(pos, node, clicker)
|
|
||||||
minetest.sound_play({name="hades_furniture_table_lamp_switch"}, {pos=pos, gain=0.35, max_hear_distance=6})
|
|
||||||
minetest.set_node(pos, {name="hades_furniture:table_lamp_"..lamps[l][2]})
|
|
||||||
end,
|
|
||||||
on_rotate = "simple",
|
|
||||||
})
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
--[[ ----- Medieval theme -----]]
|
|
||||||
|
|
||||||
-- Steel Bars (only straight section)
|
|
||||||
minetest.register_node("hades_furniture:bars", {
|
|
||||||
description = S("Straight Steel Bars"),
|
|
||||||
tiles = {
|
tiles = {
|
||||||
"hades_furniture_black_metal_s1.png",
|
"hades_furniture_wood"..append..".png",
|
||||||
"hades_furniture_black_metal_s1.png",
|
|
||||||
},
|
},
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
paramtype = 'light',
|
paramtype = 'light',
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
is_ground_content = false,
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.4,-0.5,-0.4, -0.3,0.4,-0.3},
|
||||||
|
{0.3,-0.5,-0.4, 0.4,0.4,-0.3},
|
||||||
|
{-0.4,-0.5,0.3, -0.3,0.4,0.4},
|
||||||
|
{0.3,-0.5,0.3, 0.4,0.4,0.4},
|
||||||
|
{-0.5,0.4,-0.5, 0.5,0.5,0.5},
|
||||||
|
{-0.4,-0.2,-0.3, -0.3,-0.1,0.3},
|
||||||
|
{0.3,-0.2,-0.4, 0.4,-0.1,0.3},
|
||||||
|
{-0.3,-0.2,-0.4, 0.4,-0.1,-0.3},
|
||||||
|
{-0.3,-0.2,0.3, 0.3,-0.1,0.4},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
groups = {table=1, choppy=3,oddly_breakable_by_hand=2},
|
||||||
|
sounds = hades_sounds.node_sound_wood_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Chair
|
||||||
|
minetest.register_node("hades_furniture:chair"..append,
|
||||||
|
{ description = desc_c,
|
||||||
|
tiles = {
|
||||||
|
"hades_furniture_wood"..append..".png",
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
sunlight_propagates = true,
|
||||||
|
paramtype = 'light',
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
is_ground_content = false,
|
||||||
|
_hades_itemshow_offset = { x=-0.118, y=0, z=-0.118 },
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.3,-0.5,0.2, -0.2,0.5,0.3},
|
||||||
|
{0.2,-0.5,0.2, 0.3,0.5,0.3},
|
||||||
|
{-0.3,-0.5,-0.3, -0.2,-0.1,-0.2},
|
||||||
|
{0.2,-0.5,-0.3, 0.3,-0.1,-0.2},
|
||||||
|
{-0.3,-0.1,-0.3, 0.3,0,0.2},
|
||||||
|
{-0.2,0.1,0.25, 0.2,0.4,0.26}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3},
|
||||||
|
},
|
||||||
|
groups = {chair=1, choppy=3,oddly_breakable_by_hand=2},
|
||||||
|
sounds = hades_sounds.node_sound_wood_defaults(),
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
local armchair_colors = {
|
||||||
|
{"", S("Black Armchair")},
|
||||||
|
{"_white", S("White Armchair")},
|
||||||
|
{"_red", S("Red Armchair")},
|
||||||
|
{"_brown", S("Brown Armchair")},
|
||||||
|
{"_blue", S("Blue Armchair")},
|
||||||
|
{"_dark_green", S("Dark Green Armchair")},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Armchair
|
||||||
|
for a=1, #armchair_colors do
|
||||||
|
local append = armchair_colors[a][1]
|
||||||
|
local desc = armchair_colors[a][2]
|
||||||
|
minetest.register_node("hades_furniture:armchair"..append,
|
||||||
|
{ description = desc,
|
||||||
|
tiles = {
|
||||||
|
"hades_furniture_armchair_top"..append..".png",
|
||||||
|
"hades_furniture_armchair_top"..append..".png",
|
||||||
|
"hades_furniture_armchair_lat1"..append..".png",
|
||||||
|
"hades_furniture_armchair_lat1"..append..".png",
|
||||||
|
"hades_furniture_armchair_lat2"..append..".png",
|
||||||
|
"hades_furniture_armchair_lat2"..append..".png",
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
sunlight_propagates = true,
|
||||||
|
paramtype = 'light',
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
is_ground_content = false,
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
--lat 1
|
||||||
|
{-0.5,-0.5,-0.45, -0.3,0.05,0.3},
|
||||||
|
{-0.45,-0.5,-0.5, -0.35,0.05,-0.45},
|
||||||
|
{-0.45,0.05,-0.45, -0.35,0.1,0.15},
|
||||||
|
--lat 2
|
||||||
|
{0.3,-0.5,-0.45, 0.5,0.05,0.3},{0.35,-0.5,-0.5,0.45,0.05,-0.45},{0.35,0.05,-0.45, 0.45,0.1,0.15},
|
||||||
|
--respaldo
|
||||||
|
{-0.5,-0.5,0.3, 0.5,0.45,0.5},{-0.45,0.45,0.35,0.45,0.5,0.45},
|
||||||
|
--base
|
||||||
|
{-0.3,-0.45,-0.35, 0.3,-0.1,0.3},{-0.3,-0.45,-0.4, 0.3,-0.15,-0.35},
|
||||||
|
|
||||||
|
--oreja 1
|
||||||
|
{-0.5,0.05,0.15, -0.3,0.45, 0.3},{-0.45,0.1,0.1, -0.35,0.45,0.15},{-0.45,0.45,0.15,-0.35,0.5,0.35},
|
||||||
|
--oreja 2
|
||||||
|
{0.3,0.05,0.15, 0.5,0.45,0.3},{0.35,0.1,0.1, 0.45,0.45,0.15},{0.35,0.45,0.15,0.45,0.5,0.35},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}
|
||||||
|
},
|
||||||
|
groups = {armchair=1, choppy=3,oddly_breakable_by_hand=2},
|
||||||
|
sounds = hades_sounds.node_sound_wood_defaults({
|
||||||
|
footstep = hades_sounds.node_sound_cloth_defaults().footstep,
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Table Lamp
|
||||||
|
local lamps = {
|
||||||
|
{ "off", "max", },
|
||||||
|
{ "low", "off", 4 },
|
||||||
|
{ "med", "low", 8 },
|
||||||
|
{ "hi", "med", 12 },
|
||||||
|
{ "max", "hi", minetest.LIGHT_MAX },
|
||||||
|
}
|
||||||
|
for l=1, #lamps do
|
||||||
|
local drop, not_in_creative_inventory, tt, desc
|
||||||
|
if l ~= 1 then
|
||||||
|
drop = "hades_furniture:table_lamp_off"
|
||||||
|
not_in_creative_inventory = 1
|
||||||
|
desc = S("Table Lamp (level @1)", l)
|
||||||
|
else
|
||||||
|
tt = S("4 different luminance levels")
|
||||||
|
desc = S("Table Lamp")
|
||||||
|
end
|
||||||
|
minetest.register_node("hades_furniture:table_lamp_"..lamps[l][1], {
|
||||||
|
description = desc,
|
||||||
|
_tt_help = tt,
|
||||||
|
drawtype = "nodebox",
|
||||||
|
tiles = {
|
||||||
|
"hades_furniture_table_lamp_s.png",
|
||||||
|
"hades_furniture_table_lamp_s.png",
|
||||||
|
"hades_furniture_table_lamp_l.png",
|
||||||
|
},
|
||||||
|
use_texture_alpha = "clip",
|
||||||
|
paramtype = 'light',
|
||||||
paramtype2 = 'facedir',
|
paramtype2 = 'facedir',
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.1,-0.5,-0.1, 0.1,0.5,0.1}, -- center bar
|
--Lamp Base
|
||||||
{0.4,-0.5,-0.1, 0.5,0.5,0.1}, -- right bar
|
{-0.15,-0.5,-0.15, 0.15,-0.45,0.15},
|
||||||
{0.1,-0.5,-0.05, 0.4,-0.45,0.05}, -- right low rail
|
{-0.05,-0.45,-0.05, 0.05,-0.4,0.05},
|
||||||
{0.1,0.45,-0.05, 0.4,0.5,0.05}, -- right high rail
|
{-0.025,-0.4,-0.025, 0.025,-0.1,0.025},
|
||||||
{-0.5,-0.5,-0.1, -0.4,0.5,0.1}, -- left bar
|
{-0.0125,-0.125,-0.2, 0.0125,-0.1,0.2},
|
||||||
{-0.4,-0.5,-0.05, -0.1,-0.45,0.05}, -- left low rail
|
{-0.2,-0.125,-0.0125, 0.2,-0.1,0.0125},
|
||||||
{-0.4,0.45,-0.05, -0.1,0.5,0.05}, -- left high rail
|
|
||||||
|
--Lamp Shade
|
||||||
|
{-0.2,-0.1,-0.2, -0.175,0.3,0.2},
|
||||||
|
{0.175,-0.1,-0.2, 0.2,0.3,0.2},
|
||||||
|
{-0.175,-0.1,-0.2, 0.175,0.3,-0.175},
|
||||||
|
{-0.175,-0.1,0.175, 0.175,0.3,0.2},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
collision_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.5,-0.5,-0.15, 0.5,0.5,0.15},
|
|
||||||
},
|
|
||||||
groups = {cracky=1},
|
|
||||||
sounds = hades_sounds.node_sound_metal_defaults(),
|
|
||||||
on_rotate = "simple",
|
|
||||||
_hades_shaper_next = "hades_furniture:L_binding_bars",
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Binding steel bars (for corners and junctions).
|
|
||||||
-- Also, center bar is slightly thicker
|
|
||||||
minetest.register_node("hades_furniture:L_binding_bars",
|
|
||||||
{ description =S("Binding Steel Bars"),
|
|
||||||
tiles = {
|
|
||||||
"hades_furniture_black_metal_s1.png",
|
|
||||||
"hades_furniture_black_metal_s1.png",
|
|
||||||
},
|
|
||||||
drawtype = "nodebox",
|
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
paramtype = 'light',
|
walkable = false,
|
||||||
is_ground_content = false,
|
light_source = lamps[l][3],
|
||||||
connects_to = {"hades_furniture:bars", "hades_furniture:L_binding_bars", "hades_core:steelblock"},
|
selection_box = {
|
||||||
connect_sides = { "left", "right", "front", "back" },
|
type = "fixed",
|
||||||
node_box = {
|
fixed = {-0.2, -0.5, -0.2, 0.2, 0.3, 0.2},
|
||||||
type = "connected",
|
|
||||||
fixed = {
|
|
||||||
{-0.15,-0.5,-0.15, 0.15,0.5,0.15}, -- center bar
|
|
||||||
},
|
|
||||||
connect_right = {
|
|
||||||
{0.4,-0.5,-0.1, 0.5,0.5,0.1}, -- bar
|
|
||||||
{0.15,-0.5,-0.05, 0.4,-0.45,0.05}, -- low rail
|
|
||||||
{0.15,0.45,-0.05, 0.4,0.5,0.05}, -- high rail
|
|
||||||
},
|
|
||||||
connect_left = {
|
|
||||||
{-0.5,-0.5,-0.1, -0.4,0.5,0.1}, -- bar
|
|
||||||
{-0.4,-0.5,-0.05, -0.15,-0.45,0.05}, -- low rail
|
|
||||||
{-0.4,0.45,-0.05, -0.15,0.5,0.05}, -- high rail
|
|
||||||
},
|
|
||||||
connect_front = {
|
|
||||||
{-0.1,-0.5,-0.5,0.1,0.5,-0.4}, -- bar
|
|
||||||
{-0.05,-0.5,-0.4, 0.05,-0.45,-0.15}, -- low rail
|
|
||||||
{-0.05,0.45,-0.4, 0.05,0.5,-0.15}, -- high rail
|
|
||||||
},
|
|
||||||
connect_back = {
|
|
||||||
{-0.1,-0.5,0.4,0.1,0.5,0.5}, -- bar
|
|
||||||
{-0.05,-0.5,0.15, 0.05,-0.45,0.4}, -- low rail
|
|
||||||
{-0.05,0.45,0.15, 0.05,0.5,0.4}, -- high rail
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
collision_box = {
|
groups = {cracky=2,oddly_breakable_by_hand=1,not_in_creative_inventory=not_in_creative_inventory},
|
||||||
type = "connected",
|
drop = drop,
|
||||||
fixed = {
|
sounds = hades_sounds.node_sound_wood_defaults(),
|
||||||
{-0.15,-0.5,-0.15, 0.15,0.5,0.15}, -- center bar
|
on_rightclick = function(pos, node, clicker)
|
||||||
},
|
minetest.sound_play({name="hades_furniture_table_lamp_switch"}, {pos=pos, gain=0.35, max_hear_distance=6})
|
||||||
connect_right = {
|
minetest.set_node(pos, {name="hades_furniture:table_lamp_"..lamps[l][2]})
|
||||||
{0.15,-0.5,-0.15, 0.5,0.5,0.15},
|
end,
|
||||||
},
|
on_rotate = "simple",
|
||||||
connect_left = {
|
|
||||||
{-0.5,-0.5,-0.15, -0.15,0.5,0.15},
|
|
||||||
},
|
|
||||||
connect_back = {
|
|
||||||
{-0.15,-0.5,-0.15, 0.15,0.5,0.5},
|
|
||||||
},
|
|
||||||
connect_front = {
|
|
||||||
{-0.15,-0.5,-0.5, 0.15,0.5,-0.15},
|
|
||||||
},
|
|
||||||
|
|
||||||
},
|
|
||||||
groups = {cracky=1,},
|
|
||||||
sounds = hades_sounds.node_sound_metal_defaults(),
|
|
||||||
_hades_shaper_next = "hades_furniture:bars",
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("hades_furniture:plant_pot", {
|
end
|
||||||
description = S("Plant Pot"),
|
|
||||||
paramtype = "light",
|
--[[ ----- Medieval theme -----]]
|
||||||
tiles = {"hades_furniture_plant_pot_top.png", "hades_furniture_plant_pot_bottom.png", "hades_furniture_plant_pot_sides.png"},
|
|
||||||
is_ground_content = false,
|
-- Steel Bars (only straight section)
|
||||||
drawtype = "nodebox",
|
minetest.register_node("hades_furniture:bars", {
|
||||||
is_ground_content = false,
|
description = S("Straight Steel Bars"),
|
||||||
node_box = {
|
tiles = {
|
||||||
type = "fixed",
|
"hades_furniture_black_metal_s1.png",
|
||||||
fixed = {
|
"hades_furniture_black_metal_s1.png",
|
||||||
{-0.5,-0.5,-3/16, 0.5,0.5,3/16},
|
},
|
||||||
{-7/16,-0.5,-5/16, 7/16,0.5,5/16},
|
drawtype = "nodebox",
|
||||||
{-6/16,-0.5,-6/16, 6/16,0.5,6/16},
|
sunlight_propagates = true,
|
||||||
{-5/16,-0.5,-7/16, 5/16,0.5,7/16},
|
paramtype = 'light',
|
||||||
{-3/16,-0.5,-0.5, 3/16,0.5,0.5},
|
paramtype2 = 'facedir',
|
||||||
},
|
is_ground_content = false,
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.1,-0.5,-0.1, 0.1,0.5,0.1}, -- center bar
|
||||||
|
{0.4,-0.5,-0.1, 0.5,0.5,0.1}, -- right bar
|
||||||
|
{0.1,-0.5,-0.05, 0.4,-0.45,0.05}, -- right low rail
|
||||||
|
{0.1,0.45,-0.05, 0.4,0.5,0.05}, -- right high rail
|
||||||
|
{-0.5,-0.5,-0.1, -0.4,0.5,0.1}, -- left bar
|
||||||
|
{-0.4,-0.5,-0.05, -0.1,-0.45,0.05}, -- left low rail
|
||||||
|
{-0.4,0.45,-0.05, -0.1,0.5,0.05}, -- left high rail
|
||||||
},
|
},
|
||||||
collision_box = {
|
},
|
||||||
type = "fixed",
|
collision_box = {
|
||||||
fixed = {{ -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }},
|
type = "fixed",
|
||||||
|
fixed = {-0.5,-0.5,-0.15, 0.5,0.5,0.15},
|
||||||
|
},
|
||||||
|
groups = {cracky=1},
|
||||||
|
sounds = hades_sounds.node_sound_metal_defaults(),
|
||||||
|
on_rotate = "simple",
|
||||||
|
_hades_shaper_next = "hades_furniture:L_binding_bars",
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Binding steel bars (for corners and junctions).
|
||||||
|
-- Also, center bar is slightly thicker
|
||||||
|
minetest.register_node("hades_furniture:L_binding_bars",
|
||||||
|
{ description =S("Binding Steel Bars"),
|
||||||
|
tiles = {
|
||||||
|
"hades_furniture_black_metal_s1.png",
|
||||||
|
"hades_furniture_black_metal_s1.png",
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
sunlight_propagates = true,
|
||||||
|
paramtype = 'light',
|
||||||
|
is_ground_content = false,
|
||||||
|
connects_to = {"hades_furniture:bars", "hades_furniture:L_binding_bars", "hades_core:steelblock"},
|
||||||
|
connect_sides = { "left", "right", "front", "back" },
|
||||||
|
node_box = {
|
||||||
|
type = "connected",
|
||||||
|
fixed = {
|
||||||
|
{-0.15,-0.5,-0.15, 0.15,0.5,0.15}, -- center bar
|
||||||
},
|
},
|
||||||
groups = {cracky=3},
|
connect_right = {
|
||||||
sounds = hades_sounds.node_sound_stone_defaults({
|
{0.4,-0.5,-0.1, 0.5,0.5,0.1}, -- bar
|
||||||
footstep = hades_sounds.node_sound_dirt_defaults().footstep,
|
{0.15,-0.5,-0.05, 0.4,-0.45,0.05}, -- low rail
|
||||||
}),
|
{0.15,0.45,-0.05, 0.4,0.5,0.05}, -- high rail
|
||||||
})
|
},
|
||||||
|
connect_left = {
|
||||||
|
{-0.5,-0.5,-0.1, -0.4,0.5,0.1}, -- bar
|
||||||
|
{-0.4,-0.5,-0.05, -0.15,-0.45,0.05}, -- low rail
|
||||||
|
{-0.4,0.45,-0.05, -0.15,0.5,0.05}, -- high rail
|
||||||
|
},
|
||||||
|
connect_front = {
|
||||||
|
{-0.1,-0.5,-0.5,0.1,0.5,-0.4}, -- bar
|
||||||
|
{-0.05,-0.5,-0.4, 0.05,-0.45,-0.15}, -- low rail
|
||||||
|
{-0.05,0.45,-0.4, 0.05,0.5,-0.15}, -- high rail
|
||||||
|
},
|
||||||
|
connect_back = {
|
||||||
|
{-0.1,-0.5,0.4,0.1,0.5,0.5}, -- bar
|
||||||
|
{-0.05,-0.5,0.15, 0.05,-0.45,0.4}, -- low rail
|
||||||
|
{-0.05,0.45,0.15, 0.05,0.5,0.4}, -- high rail
|
||||||
|
},
|
||||||
|
},
|
||||||
|
collision_box = {
|
||||||
|
type = "connected",
|
||||||
|
fixed = {
|
||||||
|
{-0.15,-0.5,-0.15, 0.15,0.5,0.15}, -- center bar
|
||||||
|
},
|
||||||
|
connect_right = {
|
||||||
|
{0.15,-0.5,-0.15, 0.5,0.5,0.15},
|
||||||
|
},
|
||||||
|
connect_left = {
|
||||||
|
{-0.5,-0.5,-0.15, -0.15,0.5,0.15},
|
||||||
|
},
|
||||||
|
connect_back = {
|
||||||
|
{-0.15,-0.5,-0.15, 0.15,0.5,0.5},
|
||||||
|
},
|
||||||
|
connect_front = {
|
||||||
|
{-0.15,-0.5,-0.5, 0.15,0.5,-0.15},
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
groups = {cracky=1,},
|
||||||
|
sounds = hades_sounds.node_sound_metal_defaults(),
|
||||||
|
_hades_shaper_next = "hades_furniture:bars",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("hades_furniture:plant_pot", {
|
||||||
|
description = S("Plant Pot"),
|
||||||
|
paramtype = "light",
|
||||||
|
tiles = {"hades_furniture_plant_pot_top.png", "hades_furniture_plant_pot_bottom.png", "hades_furniture_plant_pot_sides.png"},
|
||||||
|
is_ground_content = false,
|
||||||
|
drawtype = "nodebox",
|
||||||
|
is_ground_content = false,
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.5,-0.5,-3/16, 0.5,0.5,3/16},
|
||||||
|
{-7/16,-0.5,-5/16, 7/16,0.5,5/16},
|
||||||
|
{-6/16,-0.5,-6/16, 6/16,0.5,6/16},
|
||||||
|
{-5/16,-0.5,-7/16, 5/16,0.5,7/16},
|
||||||
|
{-3/16,-0.5,-0.5, 3/16,0.5,0.5},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
collision_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {{ -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }},
|
||||||
|
},
|
||||||
|
groups = {cracky=3},
|
||||||
|
sounds = hades_sounds.node_sound_stone_defaults({
|
||||||
|
footstep = hades_sounds.node_sound_dirt_defaults().footstep,
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue