Modul:Firestone: Unterschied zwischen den Versionen
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 1: | Zeile 1: | ||
-- Modul:Firestone | -- Modul:Firestone | ||
local Util = require('Modul:Firestone/Util') | local Util = require('Modul:Firestone/Util') | ||
local Event = require('Modul:Firestone/Event') | local Event = require('Modul:Firestone/Event') | ||
| Zeile 7: | Zeile 7: | ||
function M.main(frame) | function M.main(frame) | ||
local a = Util.getArgs(frame) | |||
local a = Util.getArgs(frame) | |||
local dom = Util.norm(a[1] or "") | local dom = Util.norm(a[1] or "") | ||
| Zeile 16: | Zeile 15: | ||
elseif dom == "hero" then | elseif dom == "hero" then | ||
local sub = Util.norm(a[2] or "") | |||
-- UI-Texte: {{Firestone|hero|ui|...}} | |||
if sub == "ui" then | |||
local out = Hero.ui(frame, a) or "" | local out = Hero.ui(frame, a) or "" | ||
return mw.text.trim(out) | |||
-- NEU: Liste/Tabber aller Helden: {{Firestone|hero|list}} | |||
elseif sub == "list" then | |||
local out = Hero.list(frame, a) or "" | |||
return mw.text.trim(out) | return mw.text.trim(out) | ||
end | end | ||
-- | -- normaler Held: {{Firestone|hero|Talia|...}} | ||
local out = Hero.handle(frame, a) or "" | local out = Hero.handle(frame, a) or "" | ||
return mw.text.trim(out) | return mw.text.trim(out) | ||
Aktuelle Version vom 12. November 2025, 08:28 Uhr
Die Dokumentation für dieses Modul kann unter Modul:Firestone/Doku erstellt werden
-- Modul:Firestone
local Util = require('Modul:Firestone/Util')
local Event = require('Modul:Firestone/Event')
local Hero = require('Modul:Firestone/Hero')
local M = {}
function M.main(frame)
local a = Util.getArgs(frame)
local dom = Util.norm(a[1] or "")
if dom == "event" then
local out = Event.handle(frame, a) or ""
return mw.text.trim(out)
elseif dom == "hero" then
local sub = Util.norm(a[2] or "")
-- UI-Texte: {{Firestone|hero|ui|...}}
if sub == "ui" then
local out = Hero.ui(frame, a) or ""
return mw.text.trim(out)
-- NEU: Liste/Tabber aller Helden: {{Firestone|hero|list}}
elseif sub == "list" then
local out = Hero.list(frame, a) or ""
return mw.text.trim(out)
end
-- normaler Held: {{Firestone|hero|Talia|...}}
local out = Hero.handle(frame, a) or ""
return mw.text.trim(out)
end
return ""
end
return M