From 2d6a0ed60689ada1e99970ad1091a1f4af0ab156 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Wed, 5 Aug 2015 08:37:25 -0400 Subject: 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. --- internal.lua | 4 ++++ register.lua | 2 +- textures/ui_crafting_form.png | Bin 11733 -> 4356 bytes textures/ui_single_slot.png | Bin 0 -> 988 bytes 4 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 textures/ui_single_slot.png 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 index 74389ed..420323c 100644 Binary files a/textures/ui_crafting_form.png and b/textures/ui_crafting_form.png differ diff --git a/textures/ui_single_slot.png b/textures/ui_single_slot.png new file mode 100644 index 0000000..ef2a246 Binary files /dev/null and b/textures/ui_single_slot.png differ -- cgit v1.2.3