From 0ccbd774a1c060b1db2ef86cad6323aceb4ba42e Mon Sep 17 00:00:00 2001 From: Sokomine Date: Sun, 23 May 2021 21:39:16 +0200 Subject: [PATCH] handle fields.finished_trading --- trade_simple.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/trade_simple.lua b/trade_simple.lua index 1513011..3e97b08 100644 --- a/trade_simple.lua +++ b/trade_simple.lua @@ -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",