Change some global variables names
This commit is contained in:
parent
192eabd709
commit
5722aca858
@ -2,7 +2,7 @@ local enchanting = {}
|
||||
|
||||
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]"..
|
||||
@ -78,7 +78,7 @@ xdecor.register("enchantment_table", {
|
||||
"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,
|
||||
|
@ -1,5 +1,3 @@
|
||||
xdecor = xdecor or {}
|
||||
|
||||
local default_can_dig = function(pos, _)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
@ -7,27 +5,29 @@ local default_can_dig = function(pos, _)
|
||||
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]"..
|
||||
|
2
hive.lua
2
hive.lua
@ -2,7 +2,7 @@ local hive = {}
|
||||
|
||||
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]"..
|
||||
|
@ -82,7 +82,7 @@ end
|
||||
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",
|
||||
|
@ -62,7 +62,7 @@ xdecor.register("mailbox", {
|
||||
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;]"
|
||||
@ -72,7 +72,7 @@ end
|
||||
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;]"
|
||||
|
42
nodes.lua
42
nodes.lua
@ -32,7 +32,7 @@ xdecor.register("barrel", {
|
||||
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", {
|
||||
@ -40,7 +40,7 @@ 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",
|
||||
@ -53,7 +53,7 @@ xdecor.register("cabinet_half", {
|
||||
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",
|
||||
@ -155,7 +155,7 @@ xpanes.register_pane("chainlink", {
|
||||
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 = {
|
||||
@ -187,7 +187,7 @@ xdecor.register("coalstone_tile", {
|
||||
description = "Coalstone Tile",
|
||||
tiles = {"xdecor_coalstone_tile.png"},
|
||||
groups = {cracky=2, stone=1},
|
||||
sounds = xdecor.stone
|
||||
sounds = sound.stone
|
||||
})
|
||||
|
||||
xdecor.register("cobweb", {
|
||||
@ -204,7 +204,7 @@ 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.
|
||||
@ -279,7 +279,7 @@ for _, d in pairs(door_types) do
|
||||
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
|
||||
@ -290,7 +290,7 @@ xdecor.register("empty_shelf", {
|
||||
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", {
|
||||
@ -304,7 +304,7 @@ 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",
|
||||
@ -389,7 +389,7 @@ xdecor.register("ivy", {
|
||||
tiles = {"xdecor_ivy.png"},
|
||||
inventory_image = "xdecor_ivy.png",
|
||||
wield_image = "xdecor_ivy.png",
|
||||
sounds = xdecor.leaves
|
||||
sounds = sound.leaves
|
||||
})
|
||||
|
||||
xdecor.register("lantern", {
|
||||
@ -417,7 +417,7 @@ xdecor.register("lightbox", {
|
||||
tiles = {"xdecor_lightbox.png"},
|
||||
groups = {cracky=3},
|
||||
light_source = 13,
|
||||
sounds = xdecor.glass
|
||||
sounds = sound.glass
|
||||
})
|
||||
|
||||
local flowerstype = { "dandelion_white", "dandelion_yellow", "geranium",
|
||||
@ -431,7 +431,7 @@ for _, f in pairs(flowerstype) do
|
||||
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)
|
||||
})
|
||||
|
||||
@ -480,7 +480,7 @@ xdecor.register("moonbrick", {
|
||||
description = "Moonbrick",
|
||||
tiles = {"xdecor_moonbrick.png"},
|
||||
groups = {cracky=2},
|
||||
sounds = xdecor.stone
|
||||
sounds = sound.stone
|
||||
})
|
||||
|
||||
xdecor.register("multishelf", {
|
||||
@ -489,7 +489,7 @@ 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", {
|
||||
@ -522,14 +522,14 @@ xdecor.register("stone_rune", {
|
||||
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",
|
||||
@ -555,14 +555,14 @@ xdecor.register("stone_tile", {
|
||||
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 = {
|
||||
@ -590,7 +590,7 @@ xdecor.register("trash_can", {
|
||||
tiles = {"xdecor_wood.png"},
|
||||
groups = {choppy=3, flammable=2},
|
||||
sunlight_propagates = true,
|
||||
sounds = xdecor.wood,
|
||||
sounds = sound.wood,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
@ -642,7 +642,7 @@ xdecor.register("woodframed_glass", {
|
||||
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", {
|
||||
@ -650,5 +650,5 @@ xdecor.register("wood_tile", {
|
||||
tiles = {"xdecor_wood_tile.png"},
|
||||
drawtype = "normal",
|
||||
groups = {choppy=2, wood=1, flammable=2},
|
||||
sounds = xdecor.wood
|
||||
sounds = sound.wood
|
||||
})
|
||||
|
@ -34,7 +34,7 @@ function worktable.construct(pos)
|
||||
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]"..
|
||||
@ -118,7 +118,7 @@ end
|
||||
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",
|
||||
|
@ -184,7 +184,7 @@ function xwall.register_wall(name, tiles, def)
|
||||
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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user