Open main menu
Home
Random
Nearby
Log in
Settings
About Kancolle Wiki
Disclaimers
Kancolle Wiki
Search
Changes
← Older edit
Newer edit →
Module:View/Quest
(view source)
Revision as of 21:54, 18 October 2020
132 bytes added
,
4 years ago
no edit summary
Line 1:
Line 1:
local _ = require('Module:Core')
local _ = require('Module:Core')
−
local Data = require('Module:Data')
+
--
local Data = require('Module:Data')
−
local View = require('Module:View')
+
--
local View = require('Module:View')
+
+
local p = {}
+
+
p.cache = {}
-- [[Category:Todo]]:
-- [[Category:Todo]]:
Line 46:
Line 50:
local result = {}
local result = {}
for i, category in ipairs(args.explicit) do
for i, category in ipairs(args.explicit) do
−
local data
=
Data.load
('Quest'
,
category)
+
if not p.cache[category] then
+
p.cache[category]
=
require
('
Module:Data/
Quest
/
'
..
category)
+
end
+
local data = p.cache[category]
table.insert(result, _.format(table_header, { category = category }))
table.insert(result, _.format(table_header, { category = category }))
for i, q in ipairs(data) do
for i, q in ipairs(data) do
Line 91:
Line 98:
end
end
−
return
View(render)
+
p.render = render
+
+
return
p
がか
cssedit, gkautomate
7,064
edits