Anvil/scribe guide: Do nothing on the fake buttons

This commit is contained in:
Wuzzy 2020-04-01 06:29:47 +02:00
parent 74ebc47364
commit 16a347a79a
2 changed files with 8 additions and 2 deletions

View File

@ -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]"..

View File

@ -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;