Module:Adjacent stations/sandbox: Difference between revisions

Content deleted Content added
Undid revision 1094802721 by Gonnym (talk)
No edit summary
Line 21:
 
local i18n = require("Module:Adjacent stations/i18n")
 
local error_messages = {
type_not_in_module = 'Type "%s" for line "%s" not in [[Module:Adjacent stations/%s]]',
}
 
local function getData(system, verify)
if verify then
Line 552 ⟶ 557:
local line_type = args[3] or args.type
if line_type then
line_type = data.aliases and data.aliases[mw.ustring.lower(line_type)] or line_type
if line.types then
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
if line.types[line_type] then
line_type = line.types[line_type]
end
error(string.format(error_messages.type_not_in_module, line_type, line_name, system))
end
 
icon_format = line_type['icon format'] or data['type icon format']