Chiamala come
Conditions.engraving.runeLabel(value)
Registra la dipendenza Conditions.engraving.runeLabel, poi chiamala con quel nome. Una chiamata con spazio dei nomi non passa self: usa una chiamata con i due punti o passa tu l'oggetto.
Cosa fa
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.
Argomenti
| Nome | Tipo | Cosa fa |
|---|---|---|
value | table | Condition settings with a rune and/or spell field. |
Valori restituiti
| 1 | string | nil | Display name for the rune, or nil when nothing is selected. |
|---|
Edizioni
Le funzioni di supporto integrate sono registrate su ogni edizione. Ciò che cambia è l'API di gioco che leggono; dove ne manca una, la funzione di supporto ripiega su un'alternativa o restituisce nil con un motivo.
Non legge direttamente alcuna API di gioco.
Come la chiama l'addon
- Runa incisa (print)
Functions.presentation.nullable(runeLabel(value), L["<rune>"]))
Dipendenze
platform(builtin:Conditions/engraving.lua:platform)
Sorgente
Conditions/engraving.lua, riga 53. Nel gioco è in sola lettura; Duplica crea una copia modificabile.
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