mirror of
https://github.com/cave-story-randomizer/cave-story-randomizer
synced 2024-11-26 00:33:34 +00:00
gracefully handles missing CS folder
This commit is contained in:
parent
32c080d84d
commit
cd55e26160
|
@ -38,6 +38,10 @@ function C:setPath(path)
|
||||||
csdirectory = path
|
csdirectory = path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function C:ready()
|
||||||
|
return csdirectory ~= nil
|
||||||
|
end
|
||||||
|
|
||||||
function C:randomize()
|
function C:randomize()
|
||||||
resetLog()
|
resetLog()
|
||||||
logNotice('=== Cave Story Randomizer v' .. VERSION .. ' ===')
|
logNotice('=== Cave Story Randomizer v' .. VERSION .. ' ===')
|
||||||
|
|
|
@ -20,8 +20,12 @@ layout.twitter.text = '(@shruuu and @duncathan_salt)'
|
||||||
layout.footer.text = 'Original randomizer:\r\nshru.itch.io/cave-story-randomizer'
|
layout.footer.text = 'Original randomizer:\r\nshru.itch.io/cave-story-randomizer'
|
||||||
|
|
||||||
layout.go:onPress(function()
|
layout.go:onPress(function()
|
||||||
C:setStatus(Randomizer:randomize())
|
if Randomizer:ready() then
|
||||||
Randomizer:new()
|
C:setStatus(Randomizer:randomize())
|
||||||
|
Randomizer:new()
|
||||||
|
else
|
||||||
|
C:setStatus("No Cave Story folder found!\r\nDrag and drop your Cave Story folder here.")
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
function C:draw()
|
function C:draw()
|
||||||
|
|
Loading…
Reference in a new issue