Tritt unserem Discord bei und informiere dich auf unserem Twitter-Kanal über die aktuellsten Themen rund um Fallout!
Keine Bearbeitungszusammenfassung |
KKeine Bearbeitungszusammenfassung |
||
| (13 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 11: | Zeile 11: | ||
["FILM"] = "Fallout (Film)", | ["FILM"] = "Fallout (Film)", | ||
["FNV"] = "Fallout: New Vegas", | ["FNV"] = "Fallout: New Vegas", | ||
["FNVGRA"] = "Gun Runners' Arsenal | ["FNVGRA"] = "Gun Runners' Arsenal", | ||
["FNVDM"] = "Dead Money | ["FNVDM"] = "Dead Money", | ||
["FNVHH"] = "Honest Hearts | ["FNVHH"] = "Honest Hearts", | ||
["FNVOWB"] = "Old World Blues (Add-On)", | ["FNVOWB"] = "Old World Blues (Add-On)", | ||
["FNVLR"] = "Lonesome Road (Add-On)", | ["FNVLR"] = "Lonesome Road (Add-On)", | ||
| Zeile 21: | Zeile 21: | ||
["FO3OA"] = "Operation: Anchorage (Add-On)", | ["FO3OA"] = "Operation: Anchorage (Add-On)", | ||
["FO3TP"] = "The Pitt (Add-On)", | ["FO3TP"] = "The Pitt (Add-On)", | ||
["FO3BS"] = "Broken Steel | ["FO3BS"] = "Broken Steel", | ||
["FO3PL"] = "Point Lookout (Add-On)", | ["FO3PL"] = "Point Lookout (Add-On)", | ||
["FO3MZ"] = "Mothership Zeta (Add-On)", | ["FO3MZ"] = "Mothership Zeta (Add-On)", | ||
["FO4"] = "Fallout 4", | ["FO4"] = "Fallout 4", | ||
["FO4AUT"] = "Automatron (Add-On)", | ["FO4AUT"] = "Automatron (Add-On)", | ||
["FO4WW"] = "Wasteland Workshop | ["FO4WW"] = "Wasteland Workshop", | ||
["FO4FH"] = "Far Harbor (Add-On)", | ["FO4FH"] = "Far Harbor (Add-On)", | ||
["FO4CW"] = "Contraptions Workshop | ["FO4CW"] = "Contraptions Workshop", | ||
["FO4VW"] = "Vault-Tec Workshop | ["FO4VW"] = "Vault-Tec Workshop", | ||
["FO4NW"] = "Nuka-World (Add-On)", | ["FO4NW"] = "Nuka-World (Add-On)", | ||
["FO4VR"] = "Fallout 4 VR", | ["FO4VR"] = "Fallout 4 VR", | ||
| Zeile 56: | Zeile 56: | ||
["FO76AP"] = "AC America's Playground", | ["FO76AP"] = "AC America's Playground", | ||
["FO76SV"] = "Skyline Valley (Update)", | ["FO76SV"] = "Skyline Valley (Update)", | ||
["FO76MZ"] = "Meilenstein Null (Update)", | |||
["FO76GD"] = "Strahlende Tiefen (Update)", | |||
["FO76GW"] = "Der innere Ghul", | |||
["FO76GF"] = "Gone Fission", | |||
["FOBOS"] = "Fallout: Brotherhood of Steel", | ["FOBOS"] = "Fallout: Brotherhood of Steel", | ||
["FOBOS2"] = "Fallout: Brotherhood of Steel 2", | ["FOBOS2"] = "Fallout: Brotherhood of Steel 2", | ||
["FORPG"] = "Fallout: | ["FORPG"] = "Fallout: Das Rollenspiel", | ||
["2D20"] = "Fallout: | ["2D20"] = "Fallout: Das Rollenspiel", | ||
["FORPGWOA"] = "Winter | ["FORPGWOA"] = "Winter des Atoms", | ||
["FOS"] = "Fallout Shelter", | ["FOS"] = "Fallout Shelter", | ||
["FOSO"] = "Fallout Shelter Online", | ["FOSO"] = "Fallout Shelter Online", | ||
| Zeile 83: | Zeile 87: | ||
function stitle(game) | function stitle(game) | ||
local result = games[game] or game | local result = games[game] or game | ||
if game | if game == "FILM" or game == "FNVOWB" or game == "FNVLR" or game == "FO3OA" or game == "FO3TP" or game == "FO3PL" or game == "FO3MZ" or game == "FO4AUT" or game == "FO4FH" or game == "FO4NW" or game == "FO76LR" or game == "FO76FW" or game == "FO76IB" or game == "FO76NT" or game == "FO76TM" or game == "FO76NWOT" or game == "FO76SV" or game == "FO76MZ" or game == "FO76GD" or game == "FO76GW" or game == "FO76GF" then | ||
result = result:gsub('%s%(.*', '') | result = result:gsub('%s%(.*', '') | ||
end | |||
if game == "FOTV" or game == "FTV" then | |||
result = result:gsub(".*%((.*)%)", "%1") | |||
end | end | ||
return result | return result | ||
| Zeile 90: | Zeile 97: | ||
-- ==================== | -- ==================== | ||
-- | -- Diese Funktion, links, ist für gewöhnliche Links innerhalb des | ||
-- | -- Inhalts einer Infobox gedacht. Wenn du nur [[Fallout 4]] | ||
-- | -- zurückgeben möchtest, dann verwende die Syntax: | ||
-- {{#invoke:Games|links|{{{games|}}}}} | -- {{#invoke:Games|links|{{{games|}}}}} | ||
-- | -- Die Angabe eines zweiten Arguments gibt den Text kursiv zurück: | ||
-- {{#invoke:Games|links|{{{games|}}}|1}} | -- {{#invoke:Games|links|{{{games|}}}|1}} | ||
-- ==================== | -- ==================== | ||
| Zeile 103: | Zeile 110: | ||
local game_list = mw.text.split(frame.args[1], "%s*,%s*") | local game_list = mw.text.split(frame.args[1], "%s*,%s*") | ||
for n, game in ipairs(game_list) do | for n, game in ipairs(game_list) do | ||
if game:lower() == "kein" then | if game == "" or game == "-" or game:lower() == "none" or game:lower() == "kein" then | ||
result = '' | result = '' | ||
else | else | ||
| Zeile 121: | Zeile 128: | ||
-- ==================== | -- ==================== | ||
-- | -- Diese Funktion, title, generiert generisch Links für den Supertitel. | ||
-- | -- Entweder nur zur Spielseite selbst oder zu einer spezifischeren Seite. | ||
-- | -- | ||
-- | -- {{#invoke:Games|title|FO4}} gibt einfach [[Fallout 4|Fallout 4]] | ||
-- | -- {{#invoke:Games|title|FO4|Waffen}} ergibt [[Waffen (Fallout 4)|Fallout 4]] | ||
-- | -- {{#invoke:Games|title|FO4|Waffen|Waffe}} ergibt [[Waffen (Fallout 4)|Fallout 4: Waffe]] | ||
-- ==================== | -- ==================== | ||
| Zeile 134: | Zeile 141: | ||
local game_list = mw.text.split(frame.args[1], "%s*,%s*") | local game_list = mw.text.split(frame.args[1], "%s*,%s*") | ||
for n, game in ipairs(game_list) do | for n, game in ipairs(game_list) do | ||
if game:lower() == "kein" then | if game == "-" or game:lower() == "none" or game:lower() == "kein" then | ||
result = ' | result = 'erwähnt' | ||
if frame.args[3] then | if frame.args[3] then | ||
result = | result = frame.args[3] .. ' (' .. result .. ')' | ||
end | end | ||
else | else | ||
local link | local link | ||
if frame.args[2] then | if frame.args[2] then | ||
link = stitle(game) .. ' ' | link = frame.args[2] .. ' (' .. stitle(game) .. ')' | ||
else | else | ||
link = games[game] | link = games[game] | ||
| Zeile 148: | Zeile 155: | ||
local text = stitle(game) | local text = stitle(game) | ||
if frame.args[3] and n == #game_list then | if frame.args[3] and n == #game_list then | ||
text = text .. ' ' .. frame.args[3] | text = text .. ': ' .. frame.args[3] | ||
end | end | ||
result = result .. '[[' .. link .. '|' .. text .. ']]' | result = result .. '[[' .. link .. '|' .. text .. ']]' | ||
Aktuelle Version vom 7. Juni 2025, 19:40 Uhr
Die Dokumentation für dieses Modul kann unter Modul:Games/Doku erstellt werden
--<nowiki>
local p = {}
local games = {
["AR"] = "All Roads",
["D20"] = "Fallout Pen & Paper d20",
["FB"] = "Fallout Bible",
["FBG"] = "Fallout: The Board Game",
["FBGNC"] = "Fallout: New California",
["FILM"] = "Fallout (Film)",
["FNV"] = "Fallout: New Vegas",
["FNVGRA"] = "Gun Runners' Arsenal",
["FNVDM"] = "Dead Money",
["FNVHH"] = "Honest Hearts",
["FNVOWB"] = "Old World Blues (Add-On)",
["FNVLR"] = "Lonesome Road (Add-On)",
["FO1"] = "Fallout",
["FO2"] = "Fallout 2",
["FO3"] = "Fallout 3",
["FO3OA"] = "Operation: Anchorage (Add-On)",
["FO3TP"] = "The Pitt (Add-On)",
["FO3BS"] = "Broken Steel",
["FO3PL"] = "Point Lookout (Add-On)",
["FO3MZ"] = "Mothership Zeta (Add-On)",
["FO4"] = "Fallout 4",
["FO4AUT"] = "Automatron (Add-On)",
["FO4WW"] = "Wasteland Workshop",
["FO4FH"] = "Far Harbor (Add-On)",
["FO4CW"] = "Contraptions Workshop",
["FO4VW"] = "Vault-Tec Workshop",
["FO4NW"] = "Nuka-World (Add-On)",
["FO4VR"] = "Fallout 4 VR",
["FO4CC"] = "Creation Club",
["FO76"] = "Fallout 76",
["FO76WA"] = "Wild Appalachia",
["FO76NW"] = "Nuclear Winter",
["FO76WL"] = "Wastelanders",
["FO76LR"] = "Das legendäre Rennen (Update)",
["FO76OW"] = "Ein Ödland für alle",
["FO76FS"] = "Stählerne Dämmerung",
["FO76SD"] = "Stählerne Dämmerung",
["FO76LL"] = "Geladen und entsichert",
["FO76SR"] = "Stählerne Herrschaft",
["FO76FW"] = "Fallout Worlds (Update)",
["FO76IB"] = "Angreifer aus dem All (Update)",
["FO76NM"] = "Nacht der Motte",
["FO76TM"] = "Härteprüfung (Update)",
["FO76TP"] = "Expeditionen: The Pitt",
["FO76NT"] = "Nuka-World on Tour (Update)",
["FO76NWOT"] = "Nuka-World on Tour (Update)",
["FO76MI"] = "Mutations-Invasion",
["FO76OB"] = "Wenn die Sterne günstig stehen",
["FO76AC"] = "Expeditionen: Atlantic City",
["FO76BP"] = "AC Boardwalk Paradise",
["FO76AP"] = "AC America's Playground",
["FO76SV"] = "Skyline Valley (Update)",
["FO76MZ"] = "Meilenstein Null (Update)",
["FO76GD"] = "Strahlende Tiefen (Update)",
["FO76GW"] = "Der innere Ghul",
["FO76GF"] = "Gone Fission",
["FOBOS"] = "Fallout: Brotherhood of Steel",
["FOBOS2"] = "Fallout: Brotherhood of Steel 2",
["FORPG"] = "Fallout: Das Rollenspiel",
["2D20"] = "Fallout: Das Rollenspiel",
["FORPGWOA"] = "Winter des Atoms",
["FOS"] = "Fallout Shelter",
["FOSO"] = "Fallout Shelter Online",
["FOT"] = "Fallout Tactics",
["FOT2"] = "Fallout Tactics 2",
["FOTV"] = "Fallout (Fernsehserie)",
["FTV"] = "Fallout (Fernsehserie)",
["FOW"] = "Fallout: Warfare",
["FOX"] = "Fallout Extreme",
["FWW"] = "Fallout: Wasteland Warfare",
["FOWW"] = "Fallout: Wasteland Warfare",
["FOF"] = "Fallout: Factions",
["JES"] = "J.E. Sawyer's Fallout RPG",
["LH"] = "Lionheart",
["PA"] = "One Man, and a Crate of Puppets",
["PV13"] = "Project V13",
["TAR"] = "Project V13",
["VB"] = "Van Buren",
}
-- look up short title without disambig
function stitle(game)
local result = games[game] or game
if game == "FILM" or game == "FNVOWB" or game == "FNVLR" or game == "FO3OA" or game == "FO3TP" or game == "FO3PL" or game == "FO3MZ" or game == "FO4AUT" or game == "FO4FH" or game == "FO4NW" or game == "FO76LR" or game == "FO76FW" or game == "FO76IB" or game == "FO76NT" or game == "FO76TM" or game == "FO76NWOT" or game == "FO76SV" or game == "FO76MZ" or game == "FO76GD" or game == "FO76GW" or game == "FO76GF" then
result = result:gsub('%s%(.*', '')
end
if game == "FOTV" or game == "FTV" then
result = result:gsub(".*%((.*)%)", "%1")
end
return result
end
-- ====================
-- Diese Funktion, links, ist für gewöhnliche Links innerhalb des
-- Inhalts einer Infobox gedacht. Wenn du nur [[Fallout 4]]
-- zurückgeben möchtest, dann verwende die Syntax:
-- {{#invoke:Games|links|{{{games|}}}}}
-- Die Angabe eines zweiten Arguments gibt den Text kursiv zurück:
-- {{#invoke:Games|links|{{{games|}}}|1}}
-- ====================
function p.links(frame)
local result = ''
local game_list = mw.text.split(frame.args[1], "%s*,%s*")
for n, game in ipairs(game_list) do
if game == "" or game == "-" or game:lower() == "none" or game:lower() == "kein" then
result = ''
else
result = result .. '[[' .. games[game] .. '|' .. stitle(game) .. ']]'
if n ~= #game_list then
result = result .. '<br/>'
end
end
end
if (frame.args[2] and result ~= '') then
return "''" .. result .. "''"
else
return result
end
end
-- ====================
-- Diese Funktion, title, generiert generisch Links für den Supertitel.
-- Entweder nur zur Spielseite selbst oder zu einer spezifischeren Seite.
--
-- {{#invoke:Games|title|FO4}} gibt einfach [[Fallout 4|Fallout 4]]
-- {{#invoke:Games|title|FO4|Waffen}} ergibt [[Waffen (Fallout 4)|Fallout 4]]
-- {{#invoke:Games|title|FO4|Waffen|Waffe}} ergibt [[Waffen (Fallout 4)|Fallout 4: Waffe]]
-- ====================
function p.title(frame)
local result = ''
local game_list = mw.text.split(frame.args[1], "%s*,%s*")
for n, game in ipairs(game_list) do
if game == "-" or game:lower() == "none" or game:lower() == "kein" then
result = 'erwähnt'
if frame.args[3] then
result = frame.args[3] .. ' (' .. result .. ')'
end
else
local link
if frame.args[2] then
link = frame.args[2] .. ' (' .. stitle(game) .. ')'
else
link = games[game]
end
local text = stitle(game)
if frame.args[3] and n == #game_list then
text = text .. ': ' .. frame.args[3]
end
result = result .. '[[' .. link .. '|' .. text .. ']]'
if n ~= #game_list then
result = result .. ' / '
end
end
end
return result
end
return p
--</nowiki>