mirror of
https://github.com/cave-story-randomizer/cave-story-randomizer
synced 2024-11-22 06:43:03 +00:00
fix sphere logging (oops)
This commit is contained in:
parent
d72738d474
commit
6ad63828c9
|
@ -716,11 +716,11 @@ function worldGraph:serialize()
|
|||
|
||||
for k,r in ipairs(_.sort(array,sort)) do
|
||||
if next(r.locations) then
|
||||
lines:insert("")
|
||||
lines:insert("Region: " .. r.name)
|
||||
table.insert(lines, "")
|
||||
table.insert(lines, "Region: " .. r.name)
|
||||
for k2,l in pairs(r.locations) do
|
||||
if l.item ~= nil and not _has({l.item}, "event") then
|
||||
lines:insert("\t " .. l.name .. ": " .. l.item.name)
|
||||
table.insert(lines, "\t " .. l.name .. ": " .. l.item.name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -730,7 +730,7 @@ function worldGraph:serialize()
|
|||
end
|
||||
|
||||
function worldGraph:logLocations()
|
||||
for k,v in ipairs(worldGraph:serialize()) do
|
||||
for k,v in ipairs(self:serialize()) do
|
||||
logSpoiler(v)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -286,14 +286,14 @@ function C:_copyMyChar()
|
|||
end
|
||||
|
||||
function C:_generateHash()
|
||||
local serialized = self.worldGraph:serialize():concat()
|
||||
local serialized = table.concat(self.worldGraph:serialize())
|
||||
local hashed = ld.encode('string', 'hex', ld.hash('sha256', serialized))
|
||||
hashed = tonumber(hashed:sub(-8, -1), 16)
|
||||
hashed = hashed % (39^5)
|
||||
|
||||
local h = {}
|
||||
for i=1,5 do
|
||||
h:insert((hashed%39)+1)
|
||||
table.insert(h, (hashed%39)+1)
|
||||
hashed = math.floor(hashed / 39)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue