mirror of
https://github.com/cave-story-randomizer/cave-story-randomizer
synced 2024-12-26 15:07:56 +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
|
||||
end
|
||||
|
||||
function C:ready()
|
||||
return csdirectory ~= nil
|
||||
end
|
||||
|
||||
function C:randomize()
|
||||
resetLog()
|
||||
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.go:onPress(function()
|
||||
C:setStatus(Randomizer:randomize())
|
||||
Randomizer:new()
|
||||
if Randomizer:ready() then
|
||||
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)
|
||||
|
||||
function C:draw()
|
||||
|
|
Loading…
Reference in a new issue