From 16a347a79ae0b3c248606e8db84f9aae164855f4 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 1 Apr 2020 06:29:47 +0200 Subject: [PATCH] Anvil/scribe guide: Do nothing on the fake buttons --- mods/anvil/init.lua | 7 +++++-- mods/joiner_table/init.lua | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mods/anvil/init.lua b/mods/anvil/init.lua index b6b3a84..eda26ea 100644 --- a/mods/anvil/init.lua +++ b/mods/anvil/init.lua @@ -369,6 +369,9 @@ realtest.show_craft_guide_anvil = function( player, formname, fields) if( formname ~= "realtest:craft_guide_anvil" or not( player ) or fields.quit) then return; end + if fields.nothing then + return + end local material local mtypes = { "a", "m", "i" } -- anvil, metal, instrument local material_button_pressed = false @@ -455,8 +458,8 @@ realtest.show_craft_guide_anvil = function( player, formname, fields) -- buttons that do nothing; they exist just so that the interface looks similar "button[0.5,0.75;1.35,1;nothing;Forge]".. "button[1.6,0.75;0.9,1;nothing;x10]".. - "button[5.5,0.75;1.35,1;buttonWeld;Weld]".. - "button[6.6,0.75;0.9,1;buttonWeld10;x10]".. + "button[5.5,0.75;1.35,1;nothing;Weld]".. + "button[6.6,0.75;0.9,1;nothing;x10]".. "image[3.69,0.72;0.54,1.5;anvil_arrow.png]".. -- background for the inventory slots "box[2.9,0.75;0.8,0.9;#BBBBBB]".. diff --git a/mods/joiner_table/init.lua b/mods/joiner_table/init.lua index 6e91d05..279af17 100644 --- a/mods/joiner_table/init.lua +++ b/mods/joiner_table/init.lua @@ -153,6 +153,9 @@ realtest.show_craft_guide_joiner_table = function( player, formname, fields) if( formname ~= "realtest:craft_guide_joiner_table" or not( player ) or fields.quit) then return; end + if fields.nothing then + return + end -- select the plan that is to be shown local nr = 1;