From 2ce891148ca996904cef8e6ed999c6c714a19f41 Mon Sep 17 00:00:00 2001 From: Ale32bit Date: Tue, 10 Nov 2015 16:48:13 +0100 Subject: [PATCH] Update sPhone.lua --- src/sPhone.lua | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/sPhone.lua b/src/sPhone.lua index 098f0f8..b19126d 100644 --- a/src/sPhone.lua +++ b/src/sPhone.lua @@ -95,9 +95,6 @@ local function kernel() mainTerm = term.current() } - if sPhone.devMode then - sPhone.crash = crash - end if not fs.exists("/.sPhone/config/newIDSystem") then @@ -154,7 +151,19 @@ local function kernel() end for k, v in pairs(fs.list("/.sPhone/apis")) do - os.loadAPI("/.sPhone/apis/"..v) + if not fs.isDir("/.sPhone/apis/"..v) then + os.loadAPI("/.sPhone/apis/"..v) + end + end + + if not fs.exists("/.sPhone/config/sPhone") then + config.write("/.sPhone/config/sPhone","devMode",false) + end + + sPhone.devMode = config.read("/.sPhone/config/sPhone","devMode") + + if sPhone.devMode then + sPhone.crash = crash end function os.version()