]> git.lizzy.rs Git - xdecor.git/commitdiff
Add list rings to formspecs
authorjp <jeanpatrick.guerrero@gmail.com>
Thu, 26 Nov 2015 13:22:09 +0000 (14:22 +0100)
committerjp <jeanpatrick.guerrero@gmail.com>
Thu, 26 Nov 2015 13:37:25 +0000 (14:37 +0100)
handlers/registration.lua
mailbox.lua
nodes.lua
worktable.lua

index bcc5c462c63640e678ff3adebfb85b4dc61e6437..218a9eebf3f5127339f4b831f7a062a7f8b8c6f7 100644 (file)
@@ -12,22 +12,30 @@ local default_inventory_formspecs = {
        ["8"] = "size[8,6]"..xbg..
        "list[context;main;0,0;8,1;]"..
        "list[current_player;main;0,2;8,4;]"..
+       "listring[current_player;main]"..
+       "listring[context;main]"..
        default.get_hotbar_bg(0, 2),
 
        ["16"] = "size[8,7]"..xbg..
        "list[context;main;0,0;8,2;]"..
        "list[current_player;main;0,3;8,4;]"..
+       "listring[current_player;main]"..
+       "listring[context;main]"..
        default.get_hotbar_bg(0, 3),
 
        ["24"] = "size[8,8]"..xbg..
        "list[context;main;0,0;8,3;]"..
        "list[current_player;main;0,4;8,4;]"..
+       "listring[current_player;main]"..
+       "listring[context;main]"..
        default.get_hotbar_bg(0, 4),
 
        ["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]"..
+       "listring[current_player;main]"..
+       "listring[context;main]"..
        default.get_hotbar_bg(0, 4.85)
 }
 
index e3bb6678c59ed6ba855935034075e39039888d4a..94658cae0f40eb4cbacb56620c6c3d1993be7c8c 100644 (file)
@@ -106,7 +106,7 @@ function mailbox.formspec(pos, owner, num)
                        default.get_hotbar_bg(0.75,5.25)..
                        "label[0,0;Mailbox :]"..
                        "label[6,0;Last donators :]"..
-                       "box[6,0.72;3.3,3.92;#555555]"..
+                       "box[6,0.72;3.3,3.5;#555555]"..
                        "tablecolumns[color;text;image,"..
                                "1="..img_col(def_stack1)..","..
                                "2="..img_col(def_stack2)..","..
@@ -118,7 +118,9 @@ function mailbox.formspec(pos, owner, num)
                        "tableoptions[background=#00000000;highlight=#00000000;border=false]"..
                        "table[6,0.75;3.3,4;givers;"..giver.."]"..
                        "list[nodemeta:"..spos..";mailbox;0,0.75;6,4;]"..
-                       "list[current_player;main;0.75,5.25;8,4;]"
+                       "list[current_player;main;0.75,5.25;8,4;]"..
+                       "listring[nodemeta:"..spos..";mailbox]"..
+                       "listring[current_player;main]"
        else
                return "size[8,5]"..xbg..
                        default.get_hotbar_bg(0,1.25)..
index 00195e85bfae66f9b48be056c8125fbcb4a15163..8cda504d92ef2d6539ba6f880b5c76d758244728 100644 (file)
--- a/nodes.lua
+++ b/nodes.lua
@@ -350,7 +350,9 @@ xdecor.register("enderchest", {
                local meta = minetest.get_meta(pos)
                meta:set_string("formspec", "size[8,9]"..xbg..default.get_hotbar_bg(0,5)..
                                "list[current_player;enderchest;0,0;8,4;]"..
-                               "list[current_player;main;0,5;8,4;]")
+                               "list[current_player;main;0,5;8,4;]"..
+                               "listring[current_player;enderchest]"..
+                               "listring[current_player;main]")
                meta:set_string("infotext", "Ender Chest")
        end
 })
index 0c9ba1bb4a33c5ec71cd0b5a88843f69e68493af..aaae44ebf0cacb6e30830f54a0cab5f4b745534d 100644 (file)
@@ -39,7 +39,9 @@ function worktable.crafting()
                "list[current_player;main;0,3.3;8,4;]"..
                "image[5,1;1,1;gui_furnace_arrow_bg.png^[transformR270]"..
                "list[current_player;craft;2,0;3,3;]"..
-               "list[current_player;craftpreview;6,1;1,1;]"
+               "list[current_player;craftpreview;6,1;1,1;]"..
+               "listring[current_player;main]"..
+               "listring[current_player;craft]"
 end
 
 function worktable.storage(pos)
@@ -47,7 +49,9 @@ function worktable.storage(pos)
        inv:set_size("storage", 8*2)
        return "size[8,7]"..xbg..
                "list[context;storage;0,0;8,2;]"..
-               "list[current_player;main;0,3.25;8,4;]"
+               "list[current_player;main;0,3.25;8,4;]"..
+               "listring[context;storage]"..
+               "listring[current_player;main]"
 end
 
 function worktable.construct(pos)