function enchanting.construct(pos)
local meta = minetest.get_meta(pos)
- meta:set_string("formspec", "size[8,7;]"..xdecor.fancy_gui..
+ meta:set_string("formspec", "size[8,7;]"..bg..
"label[0.85,-0.15;Enchant]".."image[0.6,0.2;2,2;xdecor_enchbook.png]"..
"list[current_name;tool;0.5,2;1,1;]"..
"list[current_name;mese;1.5,2;1,1;]".."image[1.5,2;1,1;mese_layout.png]"..
"xdecor_enchantment_side.png", "xdecor_enchantment_side.png"
},
groups = {cracky=1},
- sounds = xdecor.stone,
+ sounds = sound.stone,
can_dig = enchanting.dig,
on_construct = enchanting.construct,
on_receive_fields = enchanting.fields,
-xdecor = xdecor or {}
-
local default_can_dig = function(pos, _)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
return inv:is_empty("main")
end
-xdecor.wood = default.node_sound_wood_defaults()
-xdecor.glass = default.node_sound_glass_defaults()
-xdecor.leaves = default.node_sound_leaves_defaults()
-xdecor.stone = default.node_sound_stone_defaults()
-xdecor.fancy_gui = default.gui_bg..default.gui_bg_img..default.gui_slots
+sound = {}
+sound.wood = default.node_sound_wood_defaults()
+sound.glass = default.node_sound_glass_defaults()
+sound.leaves = default.node_sound_leaves_defaults()
+sound.stone = default.node_sound_stone_defaults()
+
+bg = default.gui_bg..default.gui_bg_img..default.gui_slots
local default_inventory_size = 32
local default_inventory_formspecs = {
- ["8"] = "size[8,6]"..xdecor.fancy_gui..
+ ["8"] = "size[8,6]"..bg..
"list[context;main;0,0;8,1;]"..
"list[current_player;main;0,2;8,4;]",
- ["16"] = "size[8,7]"..xdecor.fancy_gui..
+ ["16"] = "size[8,7]"..bg..
"list[context;main;0,0;8,2;]"..
"list[current_player;main;0,3;8,4;]",
- ["24"] = "size[8,8]"..xdecor.fancy_gui..
+ ["24"] = "size[8,8]"..bg..
"list[context;main;0,0;8,3;]"..
"list[current_player;main;0,4;8,4;]",
- ["32"] = "size[8,9]"..xdecor.fancy_gui..
+ ["32"] = "size[8,9]"..bg..
"list[context;main;0,0.3;8,4;]"..
"list[current_player;main;0,4.85;8,1;]"..
"list[current_player;main;0,6.08;8,3;8]"..
function hive.construct(pos)
local meta = minetest.get_meta(pos)
- meta:set_string("formspec", "size[8,5;]"..xdecor.fancy_gui..
+ meta:set_string("formspec", "size[8,5;]"..bg..
"label[1.35,0;Bees are making honey\nwith pollen around...]"..
"image[0.2,-0.1;1,1;flowers_dandelion_white.png]"..
"image[7,0.1;1,1;flowers_viola.png]"..
xdecor.register("frame", {
description = "Item frame",
groups = {choppy=3, snappy=2},
- sounds = xdecor.wood,
+ sounds = sound.wood,
on_rotate = screwdriver.disallow,
node_box = {
type = "fixed",
function mailbox.get_formspec(pos)
local spos = pos.x..","..pos.y..","..pos.z
local formspec =
- "size[8,9]"..xdecor.fancy_gui..
+ "size[8,9]"..bg..
"label[0,0;You received...]"..
"list[nodemeta:"..spos..";main;0,0.75;8,4;]"..
"list[current_player;main;0,5.25;8,4;]"
function mailbox.get_insert_formspec(pos, owner)
local spos = pos.x..","..pos.y..","..pos.z
local formspec =
- "size[8,5]"..xdecor.fancy_gui..
+ "size[8,5]"..bg..
"label[0.5,0;Send your goods\nto "..owner.." :]"..
"list[nodemeta:"..spos..";drop;3.5,0;1,1;]"..
"list[current_player;main;0,1.25;8,4;]"
infotext = "Barrel",
tiles = {"xdecor_barrel_top.png", "xdecor_barrel_sides.png"},
groups = {choppy=3, flammable=2},
- sounds = xdecor.wood
+ sounds = sound.wood
})
xdecor.register("cabinet", {
inventory = {size=24},
infotext = "Cabinet",
groups = {choppy=3, flammable=2},
- sounds = xdecor.wood,
+ sounds = sound.wood,
tiles = {
"default_wood.png", "default_wood.png",
"default_wood.png", "default_wood.png",
inventory = {size=8},
infotext = "Half Cabinet",
groups = {choppy=3, flammable=3},
- sounds = xdecor.wood,
+ sounds = sound.wood,
node_box = xdecor.nodebox.slab_y(0.5, 0.5),
tiles = {
"default_wood.png", "default_wood.png",
xdecor.register("chair", {
description = "Chair",
tiles = {"xdecor_wood.png"},
- sounds = xdecor.wood,
+ sounds = sound.wood,
groups = {choppy=3, flammable=2},
sunlight_propagates = true,
node_box = {
description = "Coalstone Tile",
tiles = {"xdecor_coalstone_tile.png"},
groups = {cracky=2, stone=1},
- sounds = xdecor.stone
+ sounds = sound.stone
})
xdecor.register("cobweb", {
walkable = false,
selection_box = {type = "regular"},
groups = {dig_immediate=3, liquid=3, flammable=3},
- sounds = xdecor.leaves
+ sounds = sound.leaves
})
local colors = {"red"} -- Add more curtains colors simply here.
tiles_bottom = {"xdecor_"..d[1].."_door_b.png", "xdecor_"..d[2]..".png"},
tiles_top = {"xdecor_"..d[1].."_door_a.png", "xdecor_"..d[2]..".png"},
only_placer_can_open = door_access(d[1]),
- sounds = xdecor.wood,
+ sounds = sound.wood,
sunlight = false
})
end
infotext = "Empty Shelf",
tiles = {"default_wood.png", "xdecor_empty_shelf.png"},
groups = {choppy=3, flammable=2},
- sounds = xdecor.wood
+ sounds = sound.wood
})
xdecor.register("enderchest", {
"xdecor_enderchest_front.png"
},
groups = {cracky=2},
- sounds = xdecor.stone,
+ sounds = sound.stone,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec",
tiles = {"xdecor_ivy.png"},
inventory_image = "xdecor_ivy.png",
wield_image = "xdecor_ivy.png",
- sounds = xdecor.leaves
+ sounds = sound.leaves
})
xdecor.register("lantern", {
tiles = {"xdecor_lightbox.png"},
groups = {cracky=3},
light_source = 13,
- sounds = xdecor.glass
+ sounds = sound.glass
})
local flowerstype = { "dandelion_white", "dandelion_yellow", "geranium",
tiles = {"xdecor_"..f.."_pot.png"},
inventory_image = "xdecor_"..f.."_pot.png",
drawtype = "plantlike",
- sounds = xdecor.leaves,
+ sounds = sound.leaves,
selection_box = xdecor.nodebox.slab_y(0.5, 0)
})
description = "Moonbrick",
tiles = {"xdecor_moonbrick.png"},
groups = {cracky=2},
- sounds = xdecor.stone
+ sounds = sound.stone
})
xdecor.register("multishelf", {
infotext = "Multi Shelf",
tiles = {"default_wood.png", "xdecor_multishelf.png"},
groups = {choppy=3, flammable=2},
- sounds = xdecor.wood
+ sounds = sound.wood
})
xpanes.register_pane("rust_bar", {
tiles = {"xdecor_stone_rune.png"},
drawtype = "normal",
groups = {cracky=2, stone=1},
- sounds = xdecor.stone
+ sounds = sound.stone
})
xdecor.register("stonepath", {
description = "Garden Stone Path",
tiles = {"default_stone.png"},
groups = {snappy=3, stone=1},
- sounds = xdecor.stone,
+ sounds = sound.stone,
sunlight_propagates = true,
node_box = {
type = "fixed",
tiles = {"xdecor_stone_tile.png"},
drawtype = "normal",
groups = {cracky=2, stone=1},
- sounds = xdecor.stone
+ sounds = sound.stone
})
xdecor.register("table", {
description = "Table",
tiles = {"xdecor_wood.png"},
groups = {choppy=3, flammable=2},
- sounds = xdecor.wood,
+ sounds = sound.wood,
node_box = {
type = "fixed",
fixed = {
tiles = {"xdecor_wood.png"},
groups = {choppy=3, flammable=2},
sunlight_propagates = true,
- sounds = xdecor.wood,
+ sounds = sound.wood,
node_box = {
type = "fixed",
fixed = {
drawtype = "glasslike_framed",
tiles = {"xdecor_framed_glass.png", "xdecor_framed_glass_detail.png"},
groups = {cracky=3},
- sounds = xdecor.glass
+ sounds = sound.glass
})
xdecor.register("wood_tile", {
tiles = {"xdecor_wood_tile.png"},
drawtype = "normal",
groups = {choppy=2, wood=1, flammable=2},
- sounds = xdecor.wood
+ sounds = sound.wood
})
end
nodebtn = table.concat(nodebtn)
- meta:set_string("formspec", "size[8,7;]"..xdecor.fancy_gui..
+ meta:set_string("formspec", "size[8,7;]"..bg..
"label[0,0;Cut your material into...]"..nodebtn..
"label[0,1.5;Input]".."list[current_name;input;0,2;1,1;]"..
"image[1,2;1,1;xdecor_saw.png]"..
xdecor.register("worktable", {
description = "Work Table",
groups = {cracky=2, choppy=2},
- sounds = xdecor.wood,
+ sounds = sound.wood,
tiles = {
"xdecor_worktable_top.png", "xdecor_worktable_top.png",
"xdecor_worktable_sides.png", "xdecor_worktable_sides.png",
def = {
description = string.sub(name:gsub("%l", string.upper, 7), 8, -6).." Wall",
textures = {tiles, tiles, tiles, tiles},
- sounds = xdecor.stone,
+ sounds = sound.stone,
groups = {cracky=3, stone=1, pane=1},
sunlight_propagates = true,
collision_box = {