Module:Abilities/icon: Difference between revisions

Jump to navigation Jump to search
Vergir (talk | contribs)
Add radius, cooldown, charge_cooldown, max_charges and healing to the scaling map as hidden types, ahead of the new ability data scalings (with help from vergir-bot LLM)
Expose isDisplayedScale so callers can tell hidden stat-category scalings from real coefficients (with help from vergir-bot LLM)
 
Line 69: Line 69:
function getScalarIcon(scaleType)
function getScalarIcon(scaleType)
return SCALING_ICON_MAP[scaleType]
return SCALING_ICON_MAP[scaleType]
end
-- Whether a scale type produces a visible badge.
-- False only for types explicitly mapped as "default". Unknown types count as
-- displayed, so they still surface through the missing-icon warning below
-- instead of being silently dropped.
function p.isDisplayedScale(scaleType)
local icon = getScalarIcon(scaleType)
return icon == nil or icon.class ~= "default"
end
end