xdecor-libre/nodes.lua

566 lines
18 KiB
Lua
Raw Normal View History

screwdriver = screwdriver or {}
2015-07-02 16:26:19 +03:00
xpanes.register_pane("bamboo_frame", {
description = "Bamboo Frame",
tiles = {"xdecor_bamboo_frame.png"},
drawtype = "airlike",
paramtype = "light",
2015-08-29 02:06:34 +03:00
textures = {"xdecor_bamboo_frame.png", "xdecor_bamboo_frame.png", "xpanes_space.png"},
2015-07-02 16:26:19 +03:00
inventory_image = "xdecor_bamboo_frame.png",
wield_image = "xdecor_bamboo_frame.png",
2015-11-16 00:55:12 +03:00
groups = {choppy=3, oddly_breakable_by_hand=2, pane=1, flammable=2},
recipe = { {"default:papyrus", "default:papyrus", "default:papyrus"},
{"default:papyrus", "farming:cotton", "default:papyrus"},
{"default:papyrus", "default:papyrus", "default:papyrus"} }
2015-07-02 16:26:19 +03:00
})
xdecor.register("baricade", {
description = "Baricade",
drawtype = "plantlike",
walkable = false,
inventory_image = "xdecor_baricade.png",
tiles = {"xdecor_baricade.png"},
2015-11-16 00:55:12 +03:00
groups = {choppy=2, oddly_breakable_by_hand=1, flammable=3},
2015-08-04 23:33:16 +03:00
damage_per_second = 4,
2015-08-16 22:14:01 +03:00
selection_box = xdecor.nodebox.slab_y(0.3)
2015-07-02 16:26:19 +03:00
})
2015-06-10 14:26:04 +03:00
xdecor.register("barrel", {
2015-06-25 18:25:36 +03:00
description = "Barrel",
inventory = {size=24},
infotext = "Barrel",
tiles = {"xdecor_barrel_top.png", "xdecor_barrel_sides.png"},
2015-11-16 00:55:12 +03:00
groups = {choppy=2, oddly_breakable_by_hand=1, flammable=3},
sounds = default.node_sound_wood_defaults()
2015-06-25 18:25:36 +03:00
})
2015-06-10 14:26:04 +03:00
xdecor.register("cabinet", {
2015-09-01 12:14:05 +03:00
description = "Wood Cabinet",
2015-06-25 18:25:36 +03:00
inventory = {size=24},
2015-09-01 12:14:05 +03:00
infotext = "Wood Cabinet",
2015-11-16 00:55:12 +03:00
groups = {choppy=2, oddly_breakable_by_hand=1, flammable=3},
2015-08-28 15:13:51 +03:00
sounds = default.node_sound_wood_defaults(),
on_rotate = screwdriver.rotate_simple,
tiles = {"xdecor_cabinet_sides.png", "xdecor_cabinet_sides.png",
"xdecor_cabinet_sides.png", "xdecor_cabinet_sides.png",
"xdecor_cabinet_sides.png", "xdecor_cabinet_front.png"}
2015-06-25 18:25:36 +03:00
})
2015-06-10 14:26:04 +03:00
xdecor.register("cabinet_half", {
2015-09-01 12:14:05 +03:00
description = "Half Wood Cabinet",
2015-06-25 18:25:36 +03:00
inventory = {size=8},
2015-09-01 12:14:05 +03:00
infotext = "Half Wood Cabinet",
2015-11-16 00:55:12 +03:00
groups = {choppy=3, oddly_breakable_by_hand=2, flammable=3},
2015-08-28 15:13:51 +03:00
sounds = default.node_sound_wood_defaults(),
2015-06-25 18:25:36 +03:00
node_box = xdecor.nodebox.slab_y(0.5, 0.5),
tiles = {"xdecor_cabinet_sides.png", "xdecor_cabinet_sides.png",
"xdecor_half_cabinet_sides.png", "xdecor_half_cabinet_sides.png",
"xdecor_half_cabinet_sides.png", "xdecor_half_cabinet_front.png"}
2015-06-25 18:25:36 +03:00
})
2015-06-10 14:26:04 +03:00
xdecor.register("candle", {
2015-06-25 18:25:36 +03:00
description = "Candle",
light_source = 12,
drawtype = "torchlike",
inventory_image = "xdecor_candle_inv.png",
2015-08-17 21:19:58 +03:00
wield_image = "xdecor_candle_wield.png",
2015-06-25 18:25:36 +03:00
paramtype2 = "wallmounted",
legacy_wallmounted = true,
walkable = false,
groups = {dig_immediate=3, attached_node=1},
tiles = {{name = "xdecor_candle_floor.png",
animation = {type="vertical_frames", length=1.5}},
{name = "xdecor_candle_ceiling.png",
animation = {type="vertical_frames", length=1.5}},
{name = "xdecor_candle_wall.png",
animation = {type="vertical_frames", length=1.5}}
2015-06-25 18:25:36 +03:00
},
selection_box = {
type = "wallmounted",
wall_top = {-0.3, -0.4, -0.3, 0.3, 0.5, 0.3},
2015-06-25 18:25:36 +03:00
wall_bottom = {-0.25, -0.5, -0.25, 0.25, 0.1, 0.25},
wall_side = {-0.5, -0.35, -0.15, -0.15, 0.4, 0.15}
}
})
2015-06-10 14:26:04 +03:00
xdecor.register("chair", {
description = "Chair",
tiles = {"xdecor_wood.png"},
sounds = default.node_sound_wood_defaults(),
groups = {choppy=3, oddly_breakable_by_hand=2, flammable=3},
on_rotate = screwdriver.rotate_simple,
node_box = xdecor.pixelbox(16, {
{3, 0, 11, 2, 16, 2},
{11, 0, 11, 2, 16, 2},
{5, 9, 11.5, 6, 6, 1},
{3, 0, 3, 2, 6, 2},
{11, 0, 3, 2, 6, 2},
{3, 6, 3, 10, 2, 8}
}),
can_dig = xdecor.sit_dig,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
pos.y = pos.y + 0 -- Sitting position.
xdecor.sit(pos, node, clicker, pointed_thing)
end
})
2015-08-16 13:30:54 +03:00
xpanes.register_pane("chainlink", {
description = "Chain Link",
tiles = {"xdecor_chainlink.png"},
drawtype = "airlike",
paramtype = "light",
2015-08-29 02:06:34 +03:00
textures = {"xdecor_chainlink.png", "xdecor_chainlink.png", "xpanes_space.png"},
2015-08-16 13:30:54 +03:00
inventory_image = "xdecor_chainlink.png",
wield_image = "xdecor_chainlink.png",
2015-11-16 00:55:12 +03:00
groups = {cracky=3, oddly_breakable_by_hand=2, pane=1},
recipe = { {"default:steel_ingot", "", "default:steel_ingot"},
{"", "default:steel_ingot", ""},
{"default:steel_ingot", "", "default:steel_ingot"} }
2015-08-16 13:30:54 +03:00
})
2016-01-22 14:41:58 +03:00
-- The following nodedef is licensed under WTFPL for granting a possible re-use
-- in Minetest Game (https://github.com/minetest/minetest_game).
xdecor.register("cobweb", {
description = "Cobweb",
drawtype = "plantlike",
tiles = {"xdecor_cobweb.png"},
inventory_image = "xdecor_cobweb.png",
liquid_viscosity = 8,
liquidtype = "source",
liquid_alternative_flowing = "xdecor:cobweb",
liquid_alternative_source = "xdecor:cobweb",
liquid_renewable = false,
liquid_range = 0,
walkable = false,
2015-07-28 23:08:23 +03:00
selection_box = {type = "regular"},
groups = {dig_immediate=3, liquid=3, flammable=3},
2015-08-28 15:13:51 +03:00
sounds = default.node_sound_leaves_defaults()
})
2015-12-04 13:38:18 +03:00
for _, c in pairs({"red"}) do -- Add more curtains colors simply here.
2015-06-25 18:25:36 +03:00
xdecor.register("curtain_"..c, {
2015-08-24 22:12:38 +03:00
description = c:gsub("^%l", string.upper).." Curtain",
2015-06-25 18:25:36 +03:00
walkable = false,
tiles = {"wool_white.png^[colorize:"..c..":170"},
inventory_image = "wool_white.png^[colorize:"..c..":170^xdecor_curtain_open_overlay.png^[makealpha:255,126,126",
wield_image = "wool_white.png^[colorize:"..c..":170",
2015-06-25 18:25:36 +03:00
drawtype = "signlike",
paramtype2 = "wallmounted",
2015-07-04 12:23:20 +03:00
groups = {dig_immediate=3, flammable=3},
2015-06-25 18:25:36 +03:00
selection_box = {type="wallmounted"},
2016-01-08 00:33:54 +03:00
on_rightclick = function(pos, node)
minetest.set_node(pos, {name="xdecor:curtain_open_"..c, param2=node.param2})
2015-06-25 18:25:36 +03:00
end
})
xdecor.register("curtain_open_"..c, {
tiles = {"wool_white.png^[colorize:"..c..":170^xdecor_curtain_open_overlay.png^[makealpha:255,126,126"},
2015-06-25 18:25:36 +03:00
drawtype = "signlike",
paramtype2 = "wallmounted",
walkable = false,
2015-07-04 12:23:20 +03:00
groups = {dig_immediate=3, flammable=3, not_in_creative_inventory=1},
2015-06-25 18:25:36 +03:00
selection_box = {type="wallmounted"},
drop = "xdecor:curtain_"..c,
2016-01-08 00:33:54 +03:00
on_rightclick = function(pos, node)
minetest.set_node(pos, {name="xdecor:curtain_"..c, param2=node.param2})
2015-06-25 18:25:36 +03:00
end
})
minetest.register_craft({
output = "xdecor:curtain_"..c.." 4",
recipe = { {"", "wool:"..c, ""},
{"", "wool:"..c, ""} }
2015-06-25 18:25:36 +03:00
})
2015-06-10 14:26:04 +03:00
end
2016-02-14 14:08:11 +03:00
minetest.register_alias("xdecor:crate", "default:chess")
2015-11-20 13:59:21 +03:00
xdecor.register("cushion", {
description = "Cushion",
tiles = {"xdecor_cushion.png"},
groups = {snappy=3, flammable=3, fall_damage_add_percent=-50},
on_place = minetest.rotate_node,
node_box = xdecor.nodebox.slab_y(0.5),
can_dig = xdecor.sit_dig,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
pos.y = pos.y + 0
xdecor.sit(pos, node, clicker, pointed_thing)
local wield_item = clicker:get_wielded_item():get_name()
if wield_item == "xdecor:cushion" and clicker:get_player_control().sneak then
local player_name = clicker:get_player_name()
if minetest.is_protected(pos, player_name) then
minetest.record_protection_violation(pos, player_name) return
end
minetest.set_node(pos, {name="xdecor:cushion_block", param2=node.param2})
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
end
})
xdecor.register("cushion_block", {
tiles = {"xdecor_cushion.png"},
groups = {snappy=3, flammable=3, fall_damage_add_percent=-75, not_in_creative_inventory=1}
})
local function door_access(name) return name:find("prison") end
local xdecor_doors = {
japanese = {
{"group:wood", "default:paper"},
{"default:paper", "group:wood"},
{"group:wood", "default:paper"}
},
prison = {
{"xpanes:bar", "xpanes:bar"},
{"xpanes:bar", "xpanes:bar"},
{"xpanes:bar", "xpanes:bar"}
},
rusty_prison = {
{"xpanes:rusty_bar", "xpanes:rusty_bar"},
{"xpanes:rusty_bar", "xpanes:rusty_bar"},
{"xpanes:rusty_bar", "xpanes:rusty_bar"}
},
screen = {
{"group:wood", "group:wood"},
{"xpanes:chainlink", "xpanes:chainlink"},
{"group:wood", "group:wood"}
},
slide = {
{"default:paper", "default:paper"},
{"default:paper", "default:paper"},
{"group:wood", "group:wood"}
},
woodglass = {
{"default:glass", "default:glass"},
{"group:wood", "group:wood"},
{"group:wood", "group:wood"}
}
}
for name, recipe in pairs(xdecor_doors) do
if not doors.register then break end
doors.register(name.."_door", {
tiles = {{name = "xdecor_"..name.."_door.png", backface_culling=true}},
description = string.gsub(" "..name, "%W%l", string.upper):sub(2):gsub("_", " ").." Door",
inventory_image = "xdecor_"..name.."_door_inv.png",
protected = door_access(name),
2015-11-16 00:55:12 +03:00
groups = {choppy=3, cracky=3, oddly_breakable_by_hand=1, flammable=2, door=1},
recipe = recipe
2015-07-02 16:26:19 +03:00
})
minetest.register_alias("xdecor:"..name.."_door", "doors:"..name.."_door")
2016-02-25 18:42:58 +03:00
minetest.register_alias("xdecor:"..name.."_door_t_1", "air")
minetest.register_alias("xdecor:"..name.."_door_t_2", "air")
minetest.register_alias("xdecor:"..name.."_door_b_1", "doors:"..name.."_door_a")
minetest.register_alias("xdecor:"..name.."_door_b_2", "doors:"..name.."_door_b")
2015-07-02 16:26:19 +03:00
end
2016-02-13 21:18:55 +03:00
minetest.register_alias("xdecor:prison_rust_door", "doors:rusty_prison_door")
2016-02-25 18:42:58 +03:00
minetest.register_alias("xdecor:prison_rust_door_t_1", "air")
minetest.register_alias("xdecor:prison_rust_door_t_2", "air")
minetest.register_alias("xdecor:prison_rust_door_b_1", "doors:rusty_prison_door_a")
minetest.register_alias("xdecor:prison_rust_door_b_2", "doors:rusty_prison_door_b")
2016-02-13 21:18:55 +03:00
2015-06-11 01:09:37 +03:00
xdecor.register("empty_shelf", {
2015-06-25 18:25:36 +03:00
description = "Empty Shelf",
inventory = {size=24},
infotext = "Empty Shelf",
2015-09-01 02:03:07 +03:00
tiles = {"default_wood.png", "default_wood.png^xdecor_empty_shelf.png"},
2015-11-16 00:55:12 +03:00
groups = {choppy=2, oddly_breakable_by_hand=1, flammable=3},
sounds = default.node_sound_wood_defaults(),
on_rotate = screwdriver.rotate_simple
2015-06-25 18:25:36 +03:00
})
2015-07-05 17:40:33 +03:00
xdecor.register("enderchest", {
description = "Ender Chest",
tiles = {"xdecor_enderchest_top.png", "xdecor_enderchest_top.png",
"xdecor_enderchest_side.png", "xdecor_enderchest_side.png",
"xdecor_enderchest_side.png", "xdecor_enderchest_front.png"},
2015-11-16 00:55:12 +03:00
groups = {cracky=1, choppy=1, oddly_breakable_by_hand=1},
2015-08-28 15:13:51 +03:00
sounds = default.node_sound_stone_defaults(),
on_rotate = screwdriver.rotate_simple,
2015-07-05 17:40:33 +03:00
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", [[ size[8,9]
list[current_player;enderchest;0,0;8,4;]
list[current_player;main;0,5;8,4;]
listring[current_player;enderchest]
listring[current_player;main] ]]
..xbg..default.get_hotbar_bg(0,5))
2015-07-05 17:40:33 +03:00
meta:set_string("infotext", "Ender Chest")
end
})
minetest.register_on_joinplayer(function(player)
local inv = player:get_inventory()
inv:set_size("enderchest", 8*4)
end)
2015-06-10 14:26:04 +03:00
xdecor.register("fire", {
2015-07-04 12:23:20 +03:00
description = "Fancy Fire",
drawtype = "plantlike",
2015-06-25 18:25:36 +03:00
light_source = 14,
walkable = false,
tiles = {{ name = "xdecor_fire_anim.png",
animation = {type="vertical_frames", length=1.5 }}},
damage_per_second = 4,
2015-06-25 18:25:36 +03:00
drop = "",
selection_box = xdecor.pixelbox(16, {{4, 0, 4, 8, 3, 8}}),
2015-07-04 12:23:20 +03:00
groups = {dig_immediate=3, hot=3, not_in_creative_inventory=1}
2015-06-25 18:25:36 +03:00
})
2015-06-10 14:26:04 +03:00
2015-07-04 14:20:00 +03:00
xdecor.register("ivy", {
description = "Ivy",
drawtype = "signlike",
walkable = false,
climbable = true,
2015-08-29 02:06:34 +03:00
groups = {dig_immediate=3, flammable=3, plant=1},
2015-07-04 14:20:00 +03:00
paramtype2 = "wallmounted",
selection_box = {type="wallmounted"},
2015-07-04 14:20:00 +03:00
legacy_wallmounted = true,
tiles = {"xdecor_ivy.png"},
inventory_image = "xdecor_ivy.png",
wield_image = "xdecor_ivy.png",
2015-08-28 15:13:51 +03:00
sounds = default.node_sound_leaves_defaults()
2015-07-04 14:20:00 +03:00
})
xdecor.register("lantern", {
2015-06-25 18:25:36 +03:00
description = "Lantern",
light_source = 12,
drawtype = "torchlike",
inventory_image = "xdecor_lantern_floor.png",
wield_image = "xdecor_lantern_floor.png",
2015-06-25 18:25:36 +03:00
paramtype2 = "wallmounted",
legacy_wallmounted = true,
walkable = false,
groups = {dig_immediate=3, attached_node=1},
tiles = {"xdecor_lantern_floor.png", "xdecor_lantern_ceiling.png", "xdecor_lantern.png"},
2015-06-25 18:25:36 +03:00
selection_box = {
type = "wallmounted",
wall_top = {-0.25, -0.4, -0.25, 0.25, 0.5, 0.25},
wall_bottom = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25},
2015-06-25 18:25:36 +03:00
wall_side = {-0.5, -0.5, -0.15, 0.5, 0.5, 0.15}
}
})
2016-01-17 01:59:49 +03:00
for _, l in pairs({"iron", "wooden"}) do
xdecor.register(l.."_lightbox", {
description = l:gsub("^%l", string.upper).." Light Box",
tiles = {"xdecor_"..l.."_lightbox.png"},
groups = {cracky=3, choppy=3, oddly_breakable_by_hand=2},
light_source = 13,
sounds = default.node_sound_glass_defaults()
})
end
minetest.register_alias("xdecor:lightbox", "xdecor:wooden_lightbox")
2015-08-08 01:37:31 +03:00
2015-08-17 21:35:32 +03:00
xdecor.register("packed_ice", {
drawtype = "normal",
description = "Packed Ice",
tiles = {"xdecor_packed_ice.png"},
2015-11-16 00:55:12 +03:00
groups = {cracky=1, puts_out_fire=1},
2015-08-28 15:13:51 +03:00
sounds = default.node_sound_glass_defaults()
2015-08-17 21:35:32 +03:00
})
for _, f in pairs({"dandelion_white", "dandelion_yellow", "geranium",
"rose", "tulip", "viola"}) do
2015-06-25 18:25:36 +03:00
xdecor.register("potted_"..f, {
description = string.gsub("Potted Flowers ("..f..")", "_", " "),
2015-06-25 18:25:36 +03:00
walkable = false,
2015-07-05 02:38:12 +03:00
groups = {dig_immediate=3, flammable=3, plant=1, flower=1},
2015-06-25 18:25:36 +03:00
tiles = {"xdecor_"..f.."_pot.png"},
inventory_image = "xdecor_"..f.."_pot.png",
drawtype = "plantlike",
2015-08-28 15:13:51 +03:00
sounds = default.node_sound_leaves_defaults(),
2015-08-16 22:14:01 +03:00
selection_box = xdecor.nodebox.slab_y(0.3)
2015-06-25 18:25:36 +03:00
})
minetest.register_craft({
2015-08-21 18:23:36 +03:00
output = "xdecor:potted_"..f,
recipe = { {"default:clay_brick", "flowers:"..f, "default:clay_brick"},
{"", "default:clay_brick", ""} }
2015-06-25 18:25:36 +03:00
})
2015-06-10 14:26:04 +03:00
end
2015-12-03 14:45:35 +03:00
xdecor.register("painting_1", {
2015-06-25 18:25:36 +03:00
description = "Painting",
2015-12-03 14:45:35 +03:00
tiles = {"xdecor_painting_1.png"},
inventory_image = "xdecor_painting_empty.png",
wield_image = "xdecor_painting_empty.png",
2015-06-25 18:25:36 +03:00
paramtype2 = "wallmounted",
legacy_wallmounted = true,
2015-12-03 19:03:14 +03:00
wield_image = "xdecor_painting_empty.png",
sunlight_propagates = true,
groups = {choppy=3, oddly_breakable_by_hand=2, flammable=3, attached_node=1},
2015-12-05 00:29:12 +03:00
sounds = default.node_sound_wood_defaults(),
node_box = {
type = "wallmounted",
wall_top = {-0.4375, 0.4375, -0.3125, 0.4375, 0.5, 0.3125},
wall_bottom = {-0.4375, -0.5, -0.3125, 0.4375, -0.4375, 0.3125},
wall_side = {-0.5, -0.3125, -0.4375, -0.4375, 0.3125, 0.4375}
},
2015-12-18 17:36:12 +03:00
on_construct = function(pos)
2015-12-03 14:45:35 +03:00
local node = minetest.get_node(pos)
local random = math.random(4)
if random == 1 then return end
minetest.set_node(pos, {name="xdecor:painting_"..random, param2=node.param2})
2015-12-03 14:45:35 +03:00
end
2015-06-25 18:25:36 +03:00
})
2015-06-10 14:26:04 +03:00
2015-12-03 14:45:35 +03:00
for i = 2, 4 do
xdecor.register("painting_"..i, {
tiles = {"xdecor_painting_"..i..".png"},
paramtype2 = "wallmounted",
legacy_wallmounted = true,
drop = "xdecor:painting_1",
sunlight_propagates = true,
groups = {choppy=3, oddly_breakable_by_hand=2, flammable=3, attached_node=1, not_in_creative_inventory=1},
2015-12-05 00:29:12 +03:00
sounds = default.node_sound_wood_defaults(),
node_box = {
type = "wallmounted",
wall_top = {-0.4375, 0.4375, -0.3125, 0.4375, 0.5, 0.3125},
wall_bottom = {-0.4375, -0.5, -0.3125, 0.4375, -0.4375, 0.3125},
wall_side = {-0.5, -0.3125, -0.4375, -0.4375, 0.3125, 0.4375}
}
2015-12-03 14:45:35 +03:00
})
end
2015-09-22 00:07:37 +03:00
for _, b in pairs({{"cactus", "cactus"}, {"moon", "stone"}}) do
xdecor.register(b[1].."brick", {
drawtype = "normal",
description = b[1]:gsub("^%l", string.upper).." Brick",
tiles = {"xdecor_"..b[1].."brick.png"},
groups = {cracky=2},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_craft({
output = "xdecor:"..b[1].."brick",
2016-02-25 18:42:58 +03:00
type = "shapeless",
recipe = {"default:brick", "default:"..b[2]}
})
2015-09-22 00:07:37 +03:00
end
2015-06-10 14:26:04 +03:00
xdecor.register("multishelf", {
2015-06-25 18:25:36 +03:00
description = "Multi Shelf",
inventory = {size=24},
infotext = "Multi Shelf",
on_rotate = screwdriver.rotate_simple,
2015-09-01 02:03:07 +03:00
tiles = {"default_wood.png", "default_wood.png^xdecor_multishelf.png"},
2015-11-16 00:55:12 +03:00
groups = {choppy=2, oddly_breakable_by_hand=1, flammable=3},
2015-08-28 15:13:51 +03:00
sounds = default.node_sound_wood_defaults()
2015-06-25 18:25:36 +03:00
})
2016-02-13 21:18:55 +03:00
xpanes.register_pane("rusty_bar", {
description = "Rusty Iron Bars",
tiles = {"xdecor_rusty_bars.png"},
2015-07-05 02:38:12 +03:00
drawtype = "airlike",
paramtype = "light",
2016-02-13 21:18:55 +03:00
textures = {"xdecor_rusty_bars.png", "xdecor_rusty_bars.png", "xpanes_space.png"},
inventory_image = "xdecor_rusty_bars.png",
wield_image = "xdecor_rusty_bars.png",
2015-11-16 00:55:12 +03:00
groups = {cracky=3, oddly_breakable_by_hand=2, pane=1},
recipe = { {"", "default:dirt", ""},
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"} }
2015-07-05 02:38:12 +03:00
})
2016-02-13 21:18:55 +03:00
minetest.register_alias("xpanes:rust_bar", "xpanes:rusty_bar")
for i = 1, 15 do
minetest.register_alias("xpanes:rust_bar_"..i, "xpanes:rusty_bar_"..i)
end
2015-07-05 02:38:12 +03:00
2015-07-02 16:26:19 +03:00
xdecor.register("stonepath", {
description = "Garden Stone Path",
2015-07-04 12:23:20 +03:00
tiles = {"default_stone.png"},
2015-09-01 15:21:43 +03:00
groups = {snappy=3},
on_rotate = screwdriver.rotate_simple,
2015-08-28 15:13:51 +03:00
sounds = default.node_sound_stone_defaults(),
sunlight_propagates = true,
2016-02-04 18:02:28 +03:00
node_box = xdecor.pixelbox(16, {
{8, 0, 8, 6, .5, 6},
{1, 0, 1, 6, .5, 6},
{1, 0, 10, 5, .5, 5},
{10, 0, 2, 4, .5, 4}
2016-01-16 19:25:00 +03:00
}),
2015-08-16 22:14:01 +03:00
selection_box = xdecor.nodebox.slab_y(0.05)
2015-07-02 16:26:19 +03:00
})
for _, t in pairs({"desertstone_tile", "stone_tile", "stone_rune",
"coalstone_tile", "hard_clay"}) do
2015-08-29 02:06:34 +03:00
xdecor.register(t, {
drawtype = "normal",
2016-01-08 00:33:54 +03:00
description = string.gsub(" "..t, "%W%l", string.upper):sub(2):gsub("_", " "),
2015-08-29 02:06:34 +03:00
tiles = {"xdecor_"..t..".png"},
2015-11-16 00:55:12 +03:00
groups = {cracky=1},
2015-08-29 02:06:34 +03:00
sounds = default.node_sound_stone_defaults()
})
2015-08-21 18:08:18 +03:00
end
2015-06-10 14:26:04 +03:00
xdecor.register("table", {
2015-06-25 18:25:36 +03:00
description = "Table",
tiles = {"xdecor_wood.png"},
2015-11-16 00:55:12 +03:00
groups = {choppy=3, oddly_breakable_by_hand=2, flammable=3},
2015-08-28 15:13:51 +03:00
sounds = default.node_sound_wood_defaults(),
2016-02-04 18:02:28 +03:00
node_box = xdecor.pixelbox(16, {
{0, 14, 0, 16, 2, 16}, {5.5, 0, 5.5, 5, 14, 6}
2016-01-16 19:25:00 +03:00
})
2015-06-25 18:25:36 +03:00
})
2015-06-10 14:26:04 +03:00
2015-07-02 16:26:19 +03:00
xdecor.register("tatami", {
description = "Tatami",
tiles = {"xdecor_tatami.png"},
2015-08-04 17:12:23 +03:00
wield_image = "xdecor_tatami.png",
2015-08-29 02:06:34 +03:00
groups = {snappy=3, flammable=3},
2016-01-16 19:25:00 +03:00
node_box = xdecor.nodebox.slab_y(0.0625)
2015-07-02 16:26:19 +03:00
})
2015-06-10 14:26:04 +03:00
xdecor.register("tv", {
2015-06-25 18:25:36 +03:00
description = "Television",
light_source = 11,
2015-08-23 20:04:09 +03:00
groups = {snappy=3},
on_rotate = screwdriver.rotate_simple,
tiles = { "xdecor_television_left.png^[transformR270",
"xdecor_television_left.png^[transformR90",
"xdecor_television_left.png^[transformFX",
"xdecor_television_left.png", "xdecor_television_back.png",
{name = "xdecor_television_front_animated.png",
animation = {type="vertical_frames", length=80.0}} }
2015-06-25 18:25:36 +03:00
})
2015-09-27 15:35:20 +03:00
xpanes.register_pane("wood_frame", {
description = "Wood Frame",
tiles = {"xdecor_wood_frame.png"},
drawtype = "airlike",
paramtype = "light",
textures = {"xdecor_wood_frame.png", "xdecor_wood_frame.png", "xpanes_space.png"},
inventory_image = "xdecor_wood_frame.png",
wield_image = "xdecor_wood_frame.png",
2015-11-16 00:55:12 +03:00
groups = {choppy=3, oddly_breakable_by_hand=2, pane=1, flammable=3},
2015-09-27 15:35:20 +03:00
sounds = default.node_sound_wood_defaults(),
recipe = { {"group:wood", "group:stick", "group:wood"},
{"group:stick", "group:stick", "group:stick"},
{"group:wood", "group:stick", "group:wood"} }
2015-09-27 15:35:20 +03:00
})
2015-06-12 13:37:35 +03:00
xdecor.register("woodframed_glass", {
2015-06-25 18:25:36 +03:00
description = "Wood Framed Glass",
drawtype = "glasslike_framed",
2015-09-17 17:12:01 +03:00
tiles = {"xdecor_woodframed_glass.png", "xdecor_woodframed_glass_detail.png"},
2015-11-16 00:55:12 +03:00
groups = {cracky=3, oddly_breakable_by_hand=2},
2015-08-28 15:13:51 +03:00
sounds = default.node_sound_glass_defaults()
2015-06-25 18:25:36 +03:00
})
2015-06-10 14:26:04 +03:00
xdecor.register("wood_tile", {
2015-06-25 18:25:36 +03:00
description = "Wood Tile",
tiles = {"xdecor_wood_tile.png"},
drawtype = "normal",
2015-11-16 00:55:12 +03:00
groups = {choppy=1, oddly_breakable_by_hand=1, wood=1, flammable=2},
2015-08-28 15:13:51 +03:00
sounds = default.node_sound_wood_defaults()
2015-06-25 18:25:36 +03:00
})
2016-02-27 22:54:38 +03:00