Open main menu
Home
Random
Nearby
Log in
Settings
About Kancolle Wiki
Disclaimers
Kancolle Wiki
Search
Changes
← Older edit
Newer edit →
Module:EquipmentPage
(view source)
Revision as of 15:18, 27 October 2017
302 bytes added
,
7 years ago
no edit summary
Line 1:
Line 1:
local Utils = require("Module:Utils")
local Utils = require("Module:Utils")
local Equipment = require('Module:Equipment')
local Equipment = require('Module:Equipment')
+
+
function getEquipment(frame)
+
local args = Utils.getTemplateArgs(frame)
+
local name = args.explicit[1] or args.implicit.pagename or ""
+
return Equipment(name)
+
end
return {
return {
+
info = function(frame)
+
return getEquipment(frame):info()
+
end,
+
wikipedia = function(frame)
+
return getEquipment(frame):wikipedia()
+
end,
buildable = function(frame)
buildable = function(frame)
−
local args = Utils.getTemplateArgs
(frame)
+
return getEquipment
(frame)
:buildable() and "true"
or ""
−
local name = args.explicit[1] or args.implicit.pagename
or ""
+
end,
−
local equip
=
Equipment
(
name
)
+
improvable
=
function
(
frame
)
−
return
equip
:
buildable
() and "true" or ""
+
return
getEquipment(frame)
:
improvable
() and "true" or ""
end,
end,
}
}
がか
cssedit, gkautomate
7,064
edits