Call as
Conditions.engraving.runeLabel(value)
Record the dependency Conditions.engraving.runeLabel, then call it by that name. A namespaced call does not pass self: use a colon call or pass the object yourself.
What it does
Names the rune selected in a RUNE_ENGRAVED condition: the known rune's name when the platform finds it, else the rune spell's name, else "rune spell N" or "rune N". Returns nil when neither value.rune nor value.spell is set.
Arguments
| Name | Type | What it does |
|---|---|---|
value | table | Condition settings with a rune and/or spell field. |
Returns
| 1 | string | nil | Display name for the rune, or nil when nothing is selected. |
|---|
Editions
Built In helpers are registered on every edition. What differs is the game API they read; where one is missing the helper falls back or returns nil with a reason.
It reads no game API directly.
How the addon calls it
- Engraved Rune (print)
Functions.presentation.nullable(runeLabel(value), L["<rune>"]))
Dependencies
platform(builtin:Conditions/engraving.lua:platform)
Source
Conditions/engraving.lua, line 53. Read only in game; Duplicate makes an editable copy.
Conditions.engraving.runeLabel(value)
local known = platform.FindKnownRune and platform:FindKnownRune(value.rune, value.spell)
if known and known.name then return known.name end
if value.spell ~= nil then
local info = platform.GetSpellInfo and platform:GetSpellInfo(value.spell)
if info and info.name then return info.name end
return string.format(L["rune spell %s"], tostring(value.spell))
end
if value.rune ~= nil then return string.format(L["rune %s"], tostring(value.rune)) end