请输入您要查询的百科知识:

 

词条 Module:Infobox road/meta/mask/subtype2
释义

local p = {}

local subtypeDefaults = {Alt = "Alternate", Bus = "Business", Byp = "Bypass", Conn = "Connector", Emerg = "Emergency", Loop = "Loop", Old = "Old",

function p._subtype(subtype, subtypes)

    setmetatable(subtypes, {__index = subtypeDefaults})    return subtypes[subtype]

end

function p.subtype(frame)

    local pframe = frame:getParent()    local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself    local args = pframe.args -- the arguments passed TO the template, in the wikitext that transcludes the template
    local subtype = config.subtype or args.subtype    local subtypes = {}    subtypes.Alt = args.alt    subtypes.Bus = args.bus    subtypes.Byp = args.byp    subtypes.Conn = args.con    subtypes.Emerg = args.eme    subtypes.Loop = args.lop    subtypes.Old = args.old    subtypes.Opt = args.opt    subtypes.Scenic = args.sce    subtypes.Spur = args.spr    subtypes.Temp = args.tmp    subtypes.Toll = args.tol    subtypes.Truck = args.trk        return p._subtype(subtype, subtypes) or ''

end

return p

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/30 16:28:57