save added and deleted trades in trade list to disk
This commit is contained in:
parent
3184c89506
commit
05a2384b20
@ -46,7 +46,8 @@ yl_speak_up.input_do_trade_simple = function(player, formname, fields)
|
|||||||
"Trade: Deleted offer "..tostring(trade.trade_id)..".")
|
"Trade: Deleted offer "..tostring(trade.trade_id)..".")
|
||||||
-- delete this particular trade
|
-- delete this particular trade
|
||||||
dialog.trades[ trade.trade_id ] = nil
|
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
|
-- we are done with this trade
|
||||||
yl_speak_up.trade[pname] = nil
|
yl_speak_up.trade[pname] = nil
|
||||||
end
|
end
|
||||||
@ -211,7 +212,8 @@ yl_speak_up.input_add_trade_simple = function(player, formname, fields)
|
|||||||
"Trade: Added offer "..tostring(trade.trade_id)..".")
|
"Trade: Added offer "..tostring(trade.trade_id)..".")
|
||||||
-- add this new trade
|
-- add this new trade
|
||||||
dialog.trades[ trade.trade_id ] = {pay={ps},buy={bs}}
|
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?
|
-- is this a trade stored as a result of an option?
|
||||||
else
|
else
|
||||||
-- does this option have a trade result already?
|
-- does this option have a trade result already?
|
||||||
|
Loading…
Reference in New Issue
Block a user