From 05a2384b20ca192bf1f70dd5913914904d7ccf5d Mon Sep 17 00:00:00 2001 From: Sokomine Date: Sat, 29 May 2021 19:16:09 +0200 Subject: [PATCH] save added and deleted trades in trade list to disk --- trade_simple.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/trade_simple.lua b/trade_simple.lua index 83b70ab..18328c6 100644 --- a/trade_simple.lua +++ b/trade_simple.lua @@ -46,7 +46,8 @@ yl_speak_up.input_do_trade_simple = function(player, formname, fields) "Trade: Deleted offer "..tostring(trade.trade_id)..".") -- delete this particular trade dialog.trades[ trade.trade_id ] = nil - -- TODO: save dialog + -- actually save the dialog to disk + yl_speak_up.save_dialog(n_id, dialog) -- we are done with this trade yl_speak_up.trade[pname] = nil end @@ -211,7 +212,8 @@ yl_speak_up.input_add_trade_simple = function(player, formname, fields) "Trade: Added offer "..tostring(trade.trade_id)..".") -- add this new trade dialog.trades[ trade.trade_id ] = {pay={ps},buy={bs}} - -- TODO: save dialog + -- actually save the dialog to disk + yl_speak_up.save_dialog(n_id, dialog) -- is this a trade stored as a result of an option? else -- does this option have a trade result already?