Content deleted Content added
No edit summary |
No edit summary |
||
Line 535:
function p._icon(args, frame)
local system = args[1] or args.system
local data = args.data
if not system and not data then
return
Line 542:
data = data or getData(system)
local line_name = args[2] or args.line
local line = (getLine(data, line_name))
Line 554:
icon = mw.ustring.gsub(default.icon, '%%1', line_name)
end
local line_type = args[3] or args.type
if line_type then
Line 560:
line_type = line.types and line.types[line_type] -- If there's no type table or entry for this type, then it can't have its own icon
icon_format = line_type['icon format'] or data['type icon format']
if line_type.icon then
icon = line_type.icon
end
end
if not icon_format then
icon_format = line['icon format'] or data['line icon format']
end
if not icon then
icon = line.icon
Line 581 ⟶ 582:
icon = data['system icon']
end
if icon_format then
if icon_format ~= 'image' then
if args.name then
if line and line.title then
return icon .. " " .. line.title
end
return icon .. " " .. data["system title"]
▲ end
end
end
Line 634 ⟶ 642:
return icon .. " " .. data["system title"]
end
return icon
end
|