1
0
mirror of https://codeberg.org/minenux/minetest-mod-xdecor synced 2023-10-20 21:43:39 -07:00

Fix some luackeck errors

This commit is contained in:
JPG 2016-12-30 15:04:57 +01:00
parent deb24193c5
commit bcd898146c
5 changed files with 42 additions and 41 deletions

View File

@ -6,4 +6,5 @@ read_globals = {
"vector", "ItemStack", "vector", "ItemStack",
"default", "default",
"stairs", "doors", "xpanes", "stairs", "doors", "xpanes",
"xdecor", "xbg",
} }

View File

@ -49,12 +49,12 @@ function enchanting:get_tooltip(enchant, orig_caps, fleshy)
end end
local enchant_buttons = { local enchant_buttons = {
[[ image_button[3.9,0.85;4,0.92;bg_btn.png;fast;Efficiency] [[ image_button[3.9,0.85;4,0.92;bg_btn.png;fast;Efficiency]
image_button[3.9,1.77;4,1.12;bg_btn.png;durable;Durability] ]], image_button[3.9,1.77;4,1.12;bg_btn.png;durable;Durability] ]],
"image_button[3.9,0.85;4,0.92;bg_btn.png;strong;Strength]", "image_button[3.9,0.85;4,0.92;bg_btn.png;strong;Strength]",
"image_button[3.9,2.9;4,0.92;bg_btn.png;sharp;Sharpness]", "image_button[3.9,2.9;4,0.92;bg_btn.png;sharp;Sharpness]",
[[ image_button[3.9,0.85;4,0.92;bg_btn.png;strong;Strength] [[ image_button[3.9,0.85;4,0.92;bg_btn.png;strong;Strength]
image_button[3.9,1.77;4,1.12;bg_btn.png;speed;Speed] ]] image_button[3.9,1.77;4,1.12;bg_btn.png;speed;Speed] ]]
} }
function enchanting.formspec(pos, num) function enchanting.formspec(pos, num)

View File

@ -62,13 +62,13 @@ function mailbox:formspec(pos, owner, is_owner)
"listring[nodemeta:"..spos..";mailbox]".. "listring[nodemeta:"..spos..";mailbox]"..
xbg..default.get_hotbar_bg(0.75,5.25) xbg..default.get_hotbar_bg(0.75,5.25)
end end
return [[ size[8,5] return [[ size[8,5]
list[current_player;main;0,1.25;8,4;] ]].. list[current_player;main;0,1.25;8,4;] ]]..
"label[0,0;Send your goods to\n".. "label[0,0;Send your goods to\n"..
(minetest.colorize and (minetest.colorize and
minetest.colorize("#FFFF00", owner) or owner).."]".. minetest.colorize("#FFFF00", owner) or owner).."]"..
"list[nodemeta:"..spos..";drop;3.5,0;1,1;]".. "list[nodemeta:"..spos..";drop;3.5,0;1,1;]"..
xbg..default.get_hotbar_bg(0,1.25) xbg..default.get_hotbar_bg(0,1.25)
end end
function mailbox.dig(pos, player) function mailbox.dig(pos, player)

View File

@ -1,6 +1,6 @@
screwdriver = screwdriver or {} screwdriver = screwdriver or {}
function xdecor.register_pane(name, desc, def) local function register_pane(name, desc, def)
xpanes.register_pane(name, { xpanes.register_pane(name, {
description = desc, description = desc,
tiles = {"xdecor_"..name..".png"}, tiles = {"xdecor_"..name..".png"},
@ -15,21 +15,21 @@ function xdecor.register_pane(name, desc, def)
}) })
end end
xdecor.register_pane("bamboo_frame", "Bamboo Frame", { register_pane("bamboo_frame", "Bamboo Frame", {
groups = {choppy=3, oddly_breakable_by_hand=2, pane=1, flammable=2}, groups = {choppy=3, oddly_breakable_by_hand=2, pane=1, flammable=2},
recipe = {{"default:papyrus", "default:papyrus", "default:papyrus"}, recipe = {{"default:papyrus", "default:papyrus", "default:papyrus"},
{"default:papyrus", "farming:cotton", "default:papyrus"}, {"default:papyrus", "farming:cotton", "default:papyrus"},
{"default:papyrus", "default:papyrus", "default:papyrus"}} {"default:papyrus", "default:papyrus", "default:papyrus"}}
}) })
xdecor.register_pane("chainlink", "Chainlink", { register_pane("chainlink", "Chainlink", {
groups = {cracky=3, oddly_breakable_by_hand=2, pane=1}, groups = {cracky=3, oddly_breakable_by_hand=2, pane=1},
recipe = {{"default:steel_ingot", "", "default:steel_ingot"}, recipe = {{"default:steel_ingot", "", "default:steel_ingot"},
{"", "default:steel_ingot", ""}, {"", "default:steel_ingot", ""},
{"default:steel_ingot", "", "default:steel_ingot"}} {"default:steel_ingot", "", "default:steel_ingot"}}
}) })
xdecor.register_pane("rusty_bar", "Rusty Iron Bars", { register_pane("rusty_bar", "Rusty Iron Bars", {
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
groups = {cracky=2, pane=1}, groups = {cracky=2, pane=1},
recipe = {{"", "default:dirt", ""}, recipe = {{"", "default:dirt", ""},
@ -37,7 +37,7 @@ xdecor.register_pane("rusty_bar", "Rusty Iron Bars", {
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}} {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}}
}) })
xdecor.register_pane("wood_frame", "Wood Frame", { register_pane("wood_frame", "Wood Frame", {
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
groups = {choppy=2, pane=1, flammable=2}, groups = {choppy=2, pane=1, flammable=2},
recipe = {{"group:wood", "group:stick", "group:wood"}, recipe = {{"group:wood", "group:stick", "group:wood"},
@ -65,7 +65,7 @@ xdecor.register("barrel", {
sounds = default.node_sound_wood_defaults() sounds = default.node_sound_wood_defaults()
}) })
function xdecor.register_storage(name, desc, def) local function register_storage(name, desc, def)
xdecor.register(name, { xdecor.register(name, {
description = desc, description = desc,
inventory = {size=def.inv_size or 24}, inventory = {size=def.inv_size or 24},
@ -79,14 +79,14 @@ function xdecor.register_storage(name, desc, def)
}) })
end end
xdecor.register_storage("cabinet", "Wooden Cabinet", { register_storage("cabinet", "Wooden Cabinet", {
on_rotate = screwdriver.rotate_simple, on_rotate = screwdriver.rotate_simple,
tiles = {"xdecor_cabinet_sides.png", "xdecor_cabinet_sides.png", tiles = {"xdecor_cabinet_sides.png", "xdecor_cabinet_sides.png",
"xdecor_cabinet_sides.png", "xdecor_cabinet_sides.png", "xdecor_cabinet_sides.png", "xdecor_cabinet_sides.png",
"xdecor_cabinet_sides.png", "xdecor_cabinet_front.png"} "xdecor_cabinet_sides.png", "xdecor_cabinet_front.png"}
}) })
xdecor.register_storage("cabinet_half", "Half Wooden Cabinet", { register_storage("cabinet_half", "Half Wooden Cabinet", {
inv_size = 8, inv_size = 8,
node_box = xdecor.nodebox.slab_y(0.5, 0.5), node_box = xdecor.nodebox.slab_y(0.5, 0.5),
on_rotate = screwdriver.rotate_simple, on_rotate = screwdriver.rotate_simple,
@ -95,12 +95,12 @@ xdecor.register_storage("cabinet_half", "Half Wooden Cabinet", {
"xdecor_half_cabinet_sides.png", "xdecor_half_cabinet_front.png"} "xdecor_half_cabinet_sides.png", "xdecor_half_cabinet_front.png"}
}) })
xdecor.register_storage("empty_shelf", "Empty Shelf", { register_storage("empty_shelf", "Empty Shelf", {
on_rotate = screwdriver.rotate_simple, on_rotate = screwdriver.rotate_simple,
tiles = {"default_wood.png", "default_wood.png^xdecor_empty_shelf.png"} tiles = {"default_wood.png", "default_wood.png^xdecor_empty_shelf.png"}
}) })
xdecor.register_storage("multishelf", "Multi Shelf", { register_storage("multishelf", "Multi Shelf", {
on_rotate = screwdriver.rotate_simple, on_rotate = screwdriver.rotate_simple,
tiles = {"default_wood.png", "default_wood.png^xdecor_multishelf.png"}, tiles = {"default_wood.png", "default_wood.png^xdecor_multishelf.png"},
}) })
@ -399,7 +399,7 @@ xdecor.register("stonepath", {
selection_box = xdecor.nodebox.slab_y(0.05) selection_box = xdecor.nodebox.slab_y(0.05)
}) })
function xdecor.register_hard_node(name, desc, def) local function register_hard_node(name, desc, def)
xdecor.register(name, { xdecor.register(name, {
description = desc, description = desc,
tiles = {"xdecor_"..name..".png"}, tiles = {"xdecor_"..name..".png"},
@ -408,18 +408,18 @@ function xdecor.register_hard_node(name, desc, def)
}) })
end end
xdecor.register_hard_node("cactusbrick", "Cactus Brick", {}) register_hard_node("cactusbrick", "Cactus Brick", {})
xdecor.register_hard_node("coalstone_tile", "Coal Stone Tile", {}) register_hard_node("coalstone_tile", "Coal Stone Tile", {})
xdecor.register_hard_node("desertstone_tile", "Desert Stone Tile", {}) register_hard_node("desertstone_tile", "Desert Stone Tile", {})
xdecor.register_hard_node("hard_clay", "Hardened Clay", {}) register_hard_node("hard_clay", "Hardened Clay", {})
xdecor.register_hard_node("moonbrick", "Moon Brick", {}) register_hard_node("moonbrick", "Moon Brick", {})
xdecor.register_hard_node("stone_tile", "Stone Tile", {}) register_hard_node("stone_tile", "Stone Tile", {})
xdecor.register_hard_node("stone_rune", "Runestone", {}) register_hard_node("stone_rune", "Runestone", {})
xdecor.register_hard_node("packed_ice", "Packed Ice", { register_hard_node("packed_ice", "Packed Ice", {
groups = {cracky=1, puts_out_fire=1}, groups = {cracky=1, puts_out_fire=1},
sounds = default.node_sound_glass_defaults() sounds = default.node_sound_glass_defaults()
}) })
xdecor.register_hard_node("wood_tile", "Wooden Tile", { register_hard_node("wood_tile", "Wooden Tile", {
groups = {choppy=1, wood=1, flammable=2}, groups = {choppy=1, wood=1, flammable=2},
sounds = default.node_sound_wood_defaults() sounds = default.node_sound_wood_defaults()
}) })