Open main menu
Home
Random
Nearby
Log in
Settings
About Kancolle Wiki
Disclaimers
Kancolle Wiki
Search
Changes
← Older edit
Newer edit →
Module:Iterator
(view source)
Revision as of 23:35, 13 July 2019
103 bytes added
,
5 years ago
m
no edit summary
Line 38:
Line 38:
-- * Ship iterators.
-- * Ship iterators.
−
function Iterator.shipsByNo(context
, n
)
+
function Iterator.shipsByNo(context)
−
local extra = stringKey('extra', context
, n
)
+
local extra = stringKey('extra', context)
local function prefix(i)
local function prefix(i)
if extra then
if extra then
i = i + 1300
i = i + 1300
end
end
−
return
(i - 1) % 10 == 0
and
string.format('
!
%d-%d', i, i - 1 + 10)
+
if
(i - 1) % 10 == 0
then
+
local key = 'key' .. i
+
context[key] =
string.format('
===No.
%d-%d
===
', i, i - 1 + 10)
+
return '!' .. key
+
end
end
end
local collection = require('Module:Collection/ShipsByNo' .. (extra and 2 or 1))
local collection = require('Module:Collection/ShipsByNo' .. (extra and 2 or 1))
がか
cssedit, gkautomate
7,064
edits