Skip to content

Commit

Permalink
Update infobox_unit_custom.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
senti authored Sep 27, 2024
1 parent accc5b4 commit 99d42b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/infobox/wikis/stormgate/infobox_unit_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ local Class = require('Module:Class')
local CostDisplay = require('Module:Infobox/Extension/CostDisplay')
local Faction = require('Module:Faction')
local Hotkeys = require('Module:Hotkey')
local Logic = require('Module:Logic')
local Lua = require('Module:Lua')
local Page = require('Module:Page')
local String = require('Module:StringUtils')
Expand Down Expand Up @@ -155,7 +156,9 @@ end
---@param args table
---@return string?
function CustomUnit:subHeaderDisplay(args)
if string.find(args.subfaction, '1v1') or string.find(args.subfaction, self.pagename) then return end
if Logic.isEmpty(args.subfaction) or
string.find(args.subfaction, '1v1') or
string.find(args.subfaction, self.pagename) then return end
return tostring(mw.html.create('span')
:css('font-size', '90%')
:wikitext('Hero: ' .. self:_displayCsvAsPageCsv(args.subfaction))
Expand Down

0 comments on commit 99d42b6

Please sign in to comment.