• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Changes

Jump to navigation Jump to search
no edit summary
Line 24: Line 24:  
function p.timeHash(seed)
 
function p.timeHash(seed)
 
local randomizer = 0
 
local randomizer = 0
if type(seed) == "table" then
+
 +
mw.log(type(seed))
 +
 +
if seed == nil then
 +
randomizer = math.random(0,9999999)
 +
elseif type(seed) == "table" then
 
for k,v in pairs(dict) do
 
for k,v in pairs(dict) do
 
randomizer = randomizer + p.hashString(k)
 
randomizer = randomizer + p.hashString(k)
Line 34: Line 39:  
end
 
end
 
end
 
end
end
+
elseif type(seed) == "string" then
if type(seed) == "string" then
   
randomizer = p.hashString(seed)
 
randomizer = p.hashString(seed)
end
+
elseif type(seed) == "number" then
if type(seed) == "number" then
   
randomizer = seed
 
randomizer = seed
 
end
 
end
2,922

edits

Navigation menu