diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2015-08-05 08:37:25 -0400 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2015-08-05 08:37:25 -0400 |
commit | 2d6a0ed60689ada1e99970ad1091a1f4af0ab156 (patch) | |
tree | 3bdccd7a8bf6e3b4a48bda02af7a65c775b9bafe | |
parent | f2914b3d4fc31364d02cab190445f11ffdef5e3a (diff) |
split ui_crafting_form
into craft grid/trash image and a single slot image. The latter is now
used for a refill slot if user has creative priv or server is in
creative mode.
-rw-r--r-- | internal.lua | 4 | ||||
-rw-r--r-- | register.lua | 2 | ||||
-rw-r--r-- | textures/ui_crafting_form.png | bin | 11733 -> 4356 bytes | |||
-rw-r--r-- | textures/ui_single_slot.png | bin | 0 -> 988 bytes |
4 files changed, 5 insertions, 1 deletions
diff --git a/internal.lua b/internal.lua index 161280c..28fbde7 100644 --- a/internal.lua +++ b/internal.lua @@ -32,6 +32,10 @@ function unified_inventory.get_formspec(player, page) formspec = formspec .. "background[-0.19,-0.2;11.4,8.4;ui_form_bg.png]" end + if unified_inventory.is_creative(player_name) and page == "craft" then + formspec = formspec.."background[0,"..(unified_inventory.formspec_y + 2)..";1,1;ui_single_slot.png]" + end + local fsdata = nil -- Current page diff --git a/register.lua b/register.lua index a1ce6d4..ff18d30 100644 --- a/register.lua +++ b/register.lua @@ -136,7 +136,7 @@ unified_inventory.register_button("clear_inv", { unified_inventory.register_page("craft", { get_formspec = function(player, formspec) local player_name = player:get_player_name() - local formspec = "background[0,"..unified_inventory.formspec_y..";8,3;ui_crafting_form.png]" + local formspec = "background[2,"..unified_inventory.formspec_y..";6,3;ui_crafting_form.png]" formspec = formspec.."background[0,"..(unified_inventory.formspec_y + 3.5)..";8,4;ui_main_inventory.png]" formspec = formspec.."label[0,"..unified_inventory.form_header_y..";Crafting]" formspec = formspec.."listcolors[#00000000;#00000000]" diff --git a/textures/ui_crafting_form.png b/textures/ui_crafting_form.png Binary files differindex 74389ed..420323c 100644 --- a/textures/ui_crafting_form.png +++ b/textures/ui_crafting_form.png diff --git a/textures/ui_single_slot.png b/textures/ui_single_slot.png Binary files differnew file mode 100644 index 0000000..ef2a246 --- /dev/null +++ b/textures/ui_single_slot.png |