Module:Antarctic Union: Difference between revisions

From EarthMC
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 10: Line 10:
         return ministers[1]
         return ministers[1]
     end
     end
    return "error "..arg
end
end


Line 17: Line 18:
         return "[[Aurora:"..ministers[1].."|"..ministers[1].."]]"
         return "[[Aurora:"..ministers[1].."|"..ministers[1].."]]"
     end
     end
    return "error "..arg
end
end


Line 24: Line 26:
         return frame:preprocess("{{PlayerIMG|"..ministers[1].."|small}} [[Aurora:"..ministers[1].."|"..ministers[1].."]]")
         return frame:preprocess("{{PlayerIMG|"..ministers[1].."|small}} [[Aurora:"..ministers[1].."|"..ministers[1].."]]")
     end
     end
    return frame:preprocess("{{PlayerIMG|Fix|small}} error "..arg)
end
end



Revision as of 18:49, 18 October 2023

This is module is to edit every page ASAP without manually editing all. I did this module because I was bored manually editing every AU page.


local p = {} --p stands for package
local ministers = {"Dools2"}
local cabinet = "4th"
local cabinetName = "1st Dools2 Cabinet"
local since = "October 17, 2023"

function p.minister( frame )
    local arg = frame.args[1]
    if arg == "pm" then
        return ministers[1]
    end
    return "error "..arg
end

function p.ministerlink( frame )
    local arg = frame.args[1]
    if arg == "pm" then
        return "[[Aurora:"..ministers[1].."|"..ministers[1].."]]"
    end
    return "error "..arg
end

function p.ministerlinkimage( frame )
    local arg = frame.args[1]
    if arg == "pm" then
        return frame:preprocess("{{PlayerIMG|"..ministers[1].."|small}} [[Aurora:"..ministers[1].."|"..ministers[1].."]]")
    end
    return frame:preprocess("{{PlayerIMG|Fix|small}} error "..arg)
end

function p.cabinet( frame )
    return cabinet
end

function p.cabinetName( frame )
    return cabinetName
end

function p.since( frame )
    return since
end


return p