Add option to remove splash on startup #10
19
startup.lua
19
startup.lua
@@ -117,11 +117,21 @@ local function splash()
|
||||
term.write(str)
|
||||
end
|
||||
|
||||
term.clear()
|
||||
splash()
|
||||
local doSplash = true
|
||||
if settings then
|
||||
doSplash = settings.get('opus.show_splash')
|
||||
if doSplash == nil then
|
||||
doSplash = true
|
||||
settings.set('opus.show_splash', true)
|
||||
settings.save('.settings')
|
||||
end
|
||||
end
|
||||
if doSplash then
|
||||
term.clear()
|
||||
splash()
|
||||
|
||||
local timerId = os.startTimer(1.5)
|
||||
while true do
|
||||
local timerId = os.startTimer(1.5)
|
||||
while true do
|
||||
local e, id = os.pullEvent()
|
||||
if e == 'timer' and id == timerId then
|
||||
break
|
||||
@@ -134,6 +144,7 @@ while true do
|
||||
end
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
term.clear()
|
||||
|
||||
Reference in New Issue
Block a user