handle fields.finished_trading

This commit is contained in:
Sokomine 2021-05-23 21:39:16 +02:00
parent 3c79ad9491
commit 0ccbd774a1

View File

@ -8,7 +8,8 @@ yl_speak_up.trade_fail_fs = "size[6,2]"..
-- possible inputs:
-- fields.edit_trade_simple go on to showing the add_trade_simple formspec
-- fields.abort_trade_simple, ESC depends on context
-- fields.abort_trade_simple, ESC, depends on context
-- fields.finished_trading
-- if in edit mode: go back to edit options dialog
-- if traded at least once: go on to the target dialog
-- if not traded: go back to the original dialog
@ -48,7 +49,7 @@ yl_speak_up.input_do_trade_simple = function(player, formname, fields)
end
-- go back to the main dialog
if(fields.abort_trade_simple or fields.quit) then
if(fields.abort_trade_simple or fields.quit or fields.finished_trading) then
-- if in edit mode: go back to the edit options dialog
if(trade.edit_trade) then
minetest.show_formspec(pname, "yl_speak_up:edit_option_dialog",