Open main menu
Home
Random
Nearby
Log in
Settings
About Kancolle Wiki
Disclaimers
Kancolle Wiki
Search
Changes
← Older edit
Newer edit →
Module:RemiLib
(view source)
Revision as of 04:45, 25 October 2015
41 bytes added
,
9 years ago
no edit summary
Line 26:
Line 26:
mw.log(type(seed))
mw.log(type(seed))
+
mw.log(seed)
if seed == nil then
if seed == nil then
randomizer = math.random(0,9999999)
randomizer = math.random(0,9999999)
elseif type(seed) == "table" then
elseif type(seed) == "table" then
−
for k,v in pairs(seed) do
+
--
for k,v in pairs(seed) do
−
randomizer = randomizer + p.hashString(k)
+
--
randomizer = randomizer + p.hashString(k)
−
if type(v) == "string" then
+
--
if type(v) == "string" then
−
randomizer = randomizer + p.hashString(v)
+
--
randomizer = randomizer + p.hashString(v)
−
end
+
--
end
−
if type(v) == "number" then
+
--
if type(v) == "number" then
−
randomizer = randomizer + v
+
--
randomizer = randomizer + v
−
end
+
--
end
−
end
+
--
end
elseif type(seed) == "string" then
elseif type(seed) == "string" then
randomizer = p.hashString(seed)
randomizer = p.hashString(seed)
Remi Scarlet
2,922
edits