跳转到内容

模块:地点通用

来自Wymbot 共创站

此模块的文档可以在模块:地点通用/doc创建

local C = require('模块:物品通用')
local p = {}

function p.context(frame)
    local c = C.context(frame)
    local explicit = c.option('地点名', '')
    c.name = (explicit ~= '' and explicit or c.title.text):gsub('旅行$', '')
    return c
end

function p.finish(c, class, body)
    if not c.enabled or not body or body == '' then return '' end
    return '<div class="wum-item-block wum-place-' .. class .. '">\n' .. body .. '\n</div>' ..
        (c.categorize and '[[分类:地点]]' or '') .. '\n'
end

function p.heading(c, text)
    return C.heading(c, text, 3)
end

return p