shop fix dupe sell names + disk copy cloning

This commit is contained in:
kepler155c@gmail.com
2019-02-27 08:10:49 -05:00
parent 116e39034c
commit 5af2bb1e91
2 changed files with 37 additions and 11 deletions

View File

@@ -1,4 +1,5 @@
local Config = require('config')
local Map = require('map')
local UI = require('ui')
local os = _G.os
@@ -58,6 +59,7 @@ function shopTab:eventHandler(event)
elseif event.type == 'update' then
if self.form:save() then
Map.removeMatches(config, { name = self.form.values.name })
config[self.item.key] = self.form.values
Config.update('shop', config)
os.queueEvent('shop_refresh')