From e51a683fe345a5c0fc0f14c302fe3edb417e72ba Mon Sep 17 00:00:00 2001 From: kilbith Date: Sun, 16 Aug 2015 21:14:01 +0200 Subject: [PATCH] Re-adjust some selection boxes --- enchanting.lua | 2 +- handlers/registration.lua | 10 +++++----- hive.lua | 2 +- mailbox.lua | 4 ++-- nodes.lua | 9 +++------ worktable.lua | 2 +- 6 files changed, 13 insertions(+), 16 deletions(-) diff --git a/enchanting.lua b/enchanting.lua index 09f0404..03f2789 100644 --- a/enchanting.lua +++ b/enchanting.lua @@ -2,7 +2,7 @@ local enchanting = {} function enchanting.construct(pos) local meta = minetest.get_meta(pos) - meta:set_string("formspec", "size[8,7;]"..bg.. + meta:set_string("formspec", "size[8,7;]"..xbg.. "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]".. diff --git a/handlers/registration.lua b/handlers/registration.lua index 3487439..8487d40 100644 --- a/handlers/registration.lua +++ b/handlers/registration.lua @@ -11,23 +11,23 @@ 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 +xbg = default.gui_bg..default.gui_bg_img..default.gui_slots local default_inventory_size = 32 local default_inventory_formspecs = { - ["8"] = "size[8,6]"..bg.. + ["8"] = "size[8,6]"..xbg.. "list[context;main;0,0;8,1;]".. "list[current_player;main;0,2;8,4;]", - ["16"] = "size[8,7]"..bg.. + ["16"] = "size[8,7]"..xbg.. "list[context;main;0,0;8,2;]".. "list[current_player;main;0,3;8,4;]", - ["24"] = "size[8,8]"..bg.. + ["24"] = "size[8,8]"..xbg.. "list[context;main;0,0;8,3;]".. "list[current_player;main;0,4;8,4;]", - ["32"] = "size[8,9]"..bg.. + ["32"] = "size[8,9]"..xbg.. "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]".. diff --git a/hive.lua b/hive.lua index 9497d15..baea942 100644 --- a/hive.lua +++ b/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;]"..bg.. + meta:set_string("formspec", "size[8,5;]"..xbg.. "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]".. diff --git a/mailbox.lua b/mailbox.lua index 0a36257..09754b0 100644 --- a/mailbox.lua +++ b/mailbox.lua @@ -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]"..bg.. + "size[8,9]"..xbg.. "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]"..bg.. + "size[8,5]"..xbg.. "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;]" diff --git a/nodes.lua b/nodes.lua index 15b9fdd..b2945ea 100644 --- a/nodes.lua +++ b/nodes.lua @@ -23,7 +23,7 @@ xdecor.register("baricade", { tiles = {"xdecor_baricade.png"}, groups = {snappy=3, flammable=2}, damage_per_second = 4, - selection_box = xdecor.nodebox.slab_y(0.5, 0) + selection_box = xdecor.nodebox.slab_y(0.3) }) xdecor.register("barrel", { @@ -432,7 +432,7 @@ for _, f in pairs(flowerstype) do inventory_image = "xdecor_"..f.."_pot.png", drawtype = "plantlike", sounds = sound.leaves, - selection_box = xdecor.nodebox.slab_y(0.5, 0) + selection_box = xdecor.nodebox.slab_y(0.3) }) minetest.register_craft({ @@ -544,10 +544,7 @@ xdecor.register("stonepath", { {0.125, -0.5, -0.4375, 0.25, -0.48, -0.3125} } }, - selection_box = { - type = "fixed", - fixed = {-0.4375, -0.5, -0.4375, 0.4375, -0.4, 0.4375} - } + selection_box = xdecor.nodebox.slab_y(0.05) }) xdecor.register("stone_tile", { diff --git a/worktable.lua b/worktable.lua index 6545c10..6b7c839 100644 --- a/worktable.lua +++ b/worktable.lua @@ -34,7 +34,7 @@ function worktable.construct(pos) end nodebtn = table.concat(nodebtn) - meta:set_string("formspec", "size[8,7;]"..bg.. + meta:set_string("formspec", "size[8,7;]"..xbg.. "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]"..