mirror of
https://github.com/cave-story-randomizer/cave-story-randomizer
synced 2024-12-26 15:07:56 +00:00
Update randomizer.lua
This commit is contained in:
parent
bfd3ec0360
commit
dfa31bc999
|
@ -72,15 +72,15 @@ function C:_mountDirectory(path)
|
||||||
end
|
end
|
||||||
|
|
||||||
function C:_seedRngesus()
|
function C:_seedRngesus()
|
||||||
local seedfile, bytes= lf.read(lf.getSourceBaseDirectory() + "seed.txt", 9);
|
local seedfile, bytes= lf.read(lf.getSourceBaseDirectory() + "seed.txt",10);
|
||||||
local seed = ""
|
local seed = ""
|
||||||
if seedfile == nil then
|
if seedfile == nil then
|
||||||
logNotice('Okay, no seed file, generate new')
|
logNotice('Okay, no seed file, generate new')
|
||||||
seed = tostring(os.time())
|
seed = tostring(os.time())
|
||||||
math.randomseed(seed)
|
math.randomseed(seed)
|
||||||
else
|
else
|
||||||
logNotice('Gathered seed from file')
|
logNotice('Gathered seed from file')
|
||||||
seed = seedfile
|
seed = seedfile
|
||||||
end
|
end
|
||||||
logNotice(('Offering seed "%s" to RNGesus'):format(seed))
|
logNotice(('Offering seed "%s" to RNGesus'):format(seed))
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue