Update sPhone.lua

This commit is contained in:
Ale32bit 2015-11-18 16:56:20 +01:00
parent d517611836
commit 5c578e497e

View file

@ -81,8 +81,7 @@ local function recovery()
elseif k == 5 then elseif k == 5 then
break break
elseif k == 6 then elseif k == 6 then
recoverym = {} _G.safemode = true
recoverym.safemode = true
break break
end end
end end
@ -158,7 +157,7 @@ local function kernel()
for k, v in pairs(fs.list("/.sPhone/autorun")) do for k, v in pairs(fs.list("/.sPhone/autorun")) do
term.setTextColor(colors.black) term.setTextColor(colors.black)
if not fs.isDir("/.sPhone/autorun/"..v) then if not fs.isDir("/.sPhone/autorun/"..v) then
if not recoverym.safemode then if not safemode then
local f = fs.open("/.sPhone/autorun/"..v,"r") local f = fs.open("/.sPhone/autorun/"..v,"r")
local script = f.readAll() local script = f.readAll()
f.close() f.close()
@ -179,6 +178,10 @@ local function kernel()
end end
end end
end end
if safemode then
_G.safemode = nil
end
if runningOnStartup then if runningOnStartup then
fs.open("/startup","r") fs.open("/startup","r")