Module:ScriptItem: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 861: Line 861:
if args.type ~= 'event' then
if args.type ~= 'event' then
local baseTypeLower = baseType:lower()
if baseType then
local allTypes
local baseTypeLower = baseType:lower()
if derivedTypes[baseTypeLower] then
local allTypes
allTypes = p.copyTable(derivedTypes[baseTypeLower])
if derivedTypes[baseTypeLower] then
table.insert(allTypes, 1, baseType)
allTypes = p.copyTable(derivedTypes[baseTypeLower])
else
table.insert(allTypes, 1, baseType)
allTypes = { baseType }
else
allTypes = { baseType }
end
local types = {}
for i,type in ipairs(allTypes) do
types[i] = type
end
p.sortTable(types)
for i,type in ipairs(types) do
types[i] = p.loadTemplate(frame, 'Side', {[getTypeSide(type)]='1'}).." ".."<span style=\"font-family: 'Source Code Pro', monospace;\">"..type.."</span>"
end
table.insert(out, "<div style='margin-top: 20px;'></div>")
table.insert(out, "\n'''Types'''<br>\n"..table.concat(types, "<br>"))
end
end
local types = {}
for i,type in ipairs(allTypes) do
types[i] = type
end
p.sortTable(types)
for i,type in ipairs(types) do
types[i] = p.loadTemplate(frame, 'Side', {[getTypeSide(type)]='1'}).." ".."<span style=\"font-family: 'Source Code Pro', monospace;\">"..type.."</span>"
end
table.insert(out, "<div style='margin-top: 20px;'></div>")
table.insert(out, "\n'''Types'''<br>\n"..table.concat(types, "<br>"))
local parts = p.split(p.getDisplayedName(frame), ".")
local parts = p.split(p.getDisplayedName(frame), ".")
6,834

edits

Navigation menu