forked from Sokomine/yl_speak_up
		
	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)..".") | ||||
| 			-- 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? | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user