Update randomizer.lua

This commit is contained in:
TrashboxBobylev 2019-03-24 16:38:58 +00:00
parent bfd3ec0360
commit dfa31bc999

View file

@ -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