Module:PoliticalParty/data: Difference between revisions

From EarthMC
Jump to navigation Jump to search
mNo edit summary
m (Added Polar Democratic Party (PDP))
 
(7 intermediate revisions by one other user not shown)
Line 1: Line 1:
p = {}
local p = {}
local data = require("Module:PoliticalParty/data")


function nameConvert(arg)
p.partyNames = {
if data.partyNames[arg] ~= nil then
    ["Ind"] = "Independent",
return data.partyNames[arg]
["UAP"] = "Unity and Progress Party",
else
["Unity and Progress"] = "Unity and Progress Party",
return arg
["ADP"] = "Antarctic Democratic Party",
end
["CLAU"] = "Classical Liberalists of the Antarctic Union", --NO LONGER ACTIVE
end
["PRP"] = "Polar Republic Party",
    ["PDP"] = "Polar Democratic Party",
["PFP"] = "Polar Future Party",
["PIE"] = "Polar Independence Entente"
}


p.color = function(frame)
--color shortname altname tablecolor link
     local arg = frame.args[1]
p.parties = {
return data.parties[nameConvert(arg)][1]
     ["Independent"] = {"B2B3B4", "Ind", "Independent", "CCCCCC", "Independent"},
end
["Unity and Progress Party"] = {"F600C2", "UAP", "Unity and Progress", "F67CDD", "Unity and Progress Party"},
 
["Antarctic Democratic Party"] = {"6f56d6", "ADP", "Antarctic Democratic Party", "A798E5", "Antarctic Democratic Party"},
p.shortname = function(frame)
["Classical Liberalists of the Antarctic Union"] = {"fdd116", "CLAU", "Classical Liberalists", "FAE487", "Classical Liberalists of the Antarctic Union"},
    local arg = frame.args[1]
["Polar Republic Party"] = {"FF0000", "PRP", "Polar Republic", "FB7A7A", "Polar Republic Party"},
return data.parties[nameConvert(arg)][2]
     ["Polar Democratic Party"] = {"6f56d6", "PDP", "Polar Democratic", "907be8", "Polar Democratic Party"},
end
["Polar Future Party"] = {"000080", "PFP", "Polar Future", "8383C0", "Polar Future Party"},
 
["Polar Independence Entente"] = {"87CEEB", "PIE", "Polar Independence", "ACDCF0", "Polar Independence Entente"}
p.altname = function(frame)
}
     local arg = frame.args[1]
return data.parties[nameConvert(arg)][3]
end
 
p.tablecolor = function(frame)
    local arg = frame.args[1]
return data.parties[nameConvert(arg)][4]
end


return p
return p

Latest revision as of 22:04, 11 February 2024

Documentation for this module may be created at Module:PoliticalParty/data/doc

local p = {}

p.partyNames = {
    ["Ind"] = "Independent",
	["UAP"] = "Unity and Progress Party",
	["Unity and Progress"] = "Unity and Progress Party",
	["ADP"] = "Antarctic Democratic Party",
	["CLAU"] = "Classical Liberalists of the Antarctic Union", --NO LONGER ACTIVE
	["PRP"] = "Polar Republic Party",
    ["PDP"] = "Polar Democratic Party",
	["PFP"] = "Polar Future Party",
	["PIE"] = "Polar Independence Entente"
}

--color shortname altname tablecolor link
p.parties = {
    ["Independent"] = {"B2B3B4", "Ind", "Independent", "CCCCCC", "Independent"},
	["Unity and Progress Party"] = {"F600C2", "UAP", "Unity and Progress", "F67CDD", "Unity and Progress Party"},
	["Antarctic Democratic Party"] = {"6f56d6", "ADP", "Antarctic Democratic Party", "A798E5", "Antarctic Democratic Party"},
	["Classical Liberalists of the Antarctic Union"] = {"fdd116", "CLAU", "Classical Liberalists", "FAE487", "Classical Liberalists of the Antarctic Union"},
	["Polar Republic Party"] = {"FF0000", "PRP", "Polar Republic", "FB7A7A", "Polar Republic Party"},
    ["Polar Democratic Party"] = {"6f56d6", "PDP", "Polar Democratic", "907be8", "Polar Democratic Party"},
	["Polar Future Party"] = {"000080", "PFP", "Polar Future", "8383C0", "Polar Future Party"},
	["Polar Independence Entente"] = {"87CEEB", "PIE", "Polar Independence", "ACDCF0", "Polar Independence Entente"}
}

return p