summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2021-03-06 18:48:39 -0600
committercheapie <no-email-for-you@example.com>2021-03-06 18:48:39 -0600
commit3f84af947f232ddc764939e82682dffc63374aef (patch)
tree2001109faed547d81ffd4194ef9a6504cde9f738
parentd11f870de22da74359883d9702f995e3fc851806 (diff)
downloadinvsaw-3f84af947f232ddc764939e82682dffc63374aef.tar
invsaw-3f84af947f232ddc764939e82682dffc63374aef.tar.gz
invsaw-3f84af947f232ddc764939e82682dffc63374aef.tar.bz2
invsaw-3f84af947f232ddc764939e82682dffc63374aef.tar.xz
invsaw-3f84af947f232ddc764939e82682dffc63374aef.zip
Add support for the new unified_inventory background
Requires unified_inventory 0616d1f76b or newer.
-rw-r--r--init.lua25
1 files changed, 13 insertions, 12 deletions
diff --git a/init.lua b/init.lua
index 589775b..5879b50 100644
--- a/init.lua
+++ b/init.lua
@@ -2,18 +2,19 @@ invsaw = {}
invsaw.users = {}
-local fancy_inv = default.gui_bg..default.gui_bg_img..default.gui_slots
-invsaw.formspec = "size[11,10]"..fancy_inv..
- "label[0,0;Input\nmaterial]" ..
- "list[detached:invsaw_%s;input;1.5,0;1,1;]" ..
- "label[0,1;Left-over]" ..
- "list[detached:invsaw_%s;micro;1.5,1;1,1;]" ..
- "label[0,2;Recycle\noutput]" ..
- "list[detached:invsaw_%s;recycle;1.5,2;1,1;]" ..
- "field[0.3,3.5;1,1;max_offered;Max:;%s]" ..
- "button[1,3.2;1,1;Set;Set]" ..
- "list[detached:invsaw_%s;output;2.8,0;8,6;]" ..
- "list[current_player;main;1.5,6.25;8,4;]"
+invsaw.formspec = "formspec_version[4]"..
+ "size[15,15]"..
+ "background9[0,0;1,1;ui_formbg_9_sliced.png;true;16]"..
+ "label[0.75,1.3;Input\nmaterial]" ..
+ "list[detached:invsaw_%s;input;2,1;1,1;]" ..
+ "label[0.75,3;Left-over]" ..
+ "list[detached:invsaw_%s;micro;2,2.5;1,1;]" ..
+ "label[0.75,4.3;Recycle\noutput]" ..
+ "list[detached:invsaw_%s;recycle;2,4;1,1;]" ..
+ "field[0.75,6;1,1;max_offered;Max:;%s]" ..
+ "button[2,6;1,1;Set;Set]" ..
+ "list[detached:invsaw_%s;output;4,1;8,6;]" ..
+ "list[current_player;main;4,9.5;8,4;]"
invsaw.nosawformspec = "size[5,2]"..
"label[0,0;You don't have a circular saw in your inventory!\nYou need to have one in order to use this function.]"..