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 10:31, 8 October 2017
247 bytes added
,
7 years ago
no edit summary
Line 53:
Line 53:
local typeKey = "type" .. (n and tostring(n) or "")
local typeKey = "type" .. (n and tostring(n) or "")
local type = context and context[typeKey] and tonumber(context[typeKey])
local type = context and context[typeKey] and tonumber(context[typeKey])
+
local sortKey = "sort" .. (n and tostring(n) or "")
+
local sort = context and context[sortKey] and tonumber(context[sortKey])
local collection = require('Module:Collection/Equipment')
local collection = require('Module:Collection/Equipment')
+
if sort then
+
collection = table.sort(collection, function(a, b) return a[sort] < b[sort] end)
+
end
local i = 1
local i = 1
local current
local current
がか
cssedit, gkautomate
7,064
edits