Fix storageGen.lua, move it out of apps

storageGen.lua broke some time ago, since Milo stores non-used nodes in
the config with an "ignore" type, so if Milo was ever launched before
storageGen.lua, then storageGen.lua wouldn't work. Also, storageGen.lua
used to be stored in packages/milo/apps but it seems some shell or
package changes have made that no longer in the shell path, so I moved
storageGen.lua out of packages/milo/apps.
This commit is contained in:
Kan18
2022-06-30 11:21:58 -04:00
parent 1d2187b957
commit ab55789f80
2 changed files with 2 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ fs.delete('packages/milo/Milo.lua')
fs.delete('packages/milo/plugins/listing.lua')
fs.delete('packages/milo/apis/milo.lua')
fs.delete('packages/milo/plugins/manipulator.lua')
fs.delete('packages/milo/apps')
if peripheral.find('workbench') and shell.openForegroundTab then
shell.openForegroundTab('MiloLocal')

View File

@@ -86,7 +86,7 @@ end
function page:saveConfig(path)
local config = Util.readTable(path) or {}
Util.each(self.storages, function(dev, name)
if self.typeGrid.values[dev.type] and self.typeGrid.values[dev.type].checked and not config[name] then
if self.typeGrid.values[dev.type] and self.typeGrid.values[dev.type].checked and (not config[name] or config[name].mtype == 'ignore') then
config[name] = {
name = name,
category = 'storage',