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