2023年政策修订增补工作正在进行中,欢迎参与!
  • Moegirl.ICU:萌娘百科流亡社群 581077156(QQ),欢迎对萌娘百科运营感到失望的编辑者加入
  • Moegirl.ICU:账号认领正在试运行,有意者请参照账号认领流程

Module:Sandbox/Leranjun/signature

萌娘百科,万物皆可萌的百科全书!转载请标注来源页面的网页链接,并声明引自萌娘百科。内容不可商用。
跳转到导航 跳转到搜索
Template-info.svg 模块文档  [创建] [刷新]
local p = {}

local function notempty(s)
    return (s and s ~= "")
end

function p.main(frame)
    if (notempty(frame.args.link)) then
        return "[[" ..
            frame.args.link .. '|' .. (notempty(frame.args.text) and frame.args.text or frame.args.link) .. "]]"
    end

    local items = {
        {
            "田中姬铃木雏",
            "酒姬民",
        },
        {
            "虚拟UP主/梗#单推",
            "单推人",
        },
        {
            "工具人",
        },
        {
            "OIer",
        },
        -- {
        --     "MGP:优质编辑者",
        --     "优质编辑者",
        -- },
        -- {
        --     "MGP:巡查姬",
        --     "巡查姬",
        -- },
        {
            "MGP:管理员",
            "管理员",
        },
        {
            "enmoe:",
            "EnMGP编辑者",
        },
        {
            "MGP:萌娘百科月报/月饼",
            "月饼主编",
        }
    }

    math.randomseed(math.floor(os.time() / 60))
    local rand = math.random(1, #items)
    return "[[" .. items[rand][1] .. '|' .. (items[rand][2] or items[rand][1]) .. "]]"
end

function p.randdeg(frame)
    math.randomseed(math.floor(os.time() / 60))
    return (math.random(360) + (tonumber(frame.args.offset) or 0) + 360) % 360
end

return p