Referencia › Referencia de funciones › Conditions

Conditions.engraving.runeLabel

dependencia

Llamar como

Conditions.engraving.runeLabel(value)

Registra la dependencia Conditions.engraving.runeLabel y luego llámala con ese nombre. Una llamada con espacio de nombres no pasa self: usa una llamada con dos puntos o pasa tú mismo el objeto.

Qué hace

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.

Argumentos

NombreTipoQué hace
valuetableCondition settings with a rune and/or spell field.

Retornos

1string | nilDisplay name for the rune, or nil when nothing is selected.

Ediciones

Las funciones auxiliares integradas se registran en todas las ediciones. Lo que cambia es la API del juego que leen; donde falta alguna, la función auxiliar recurre a una alternativa o devuelve nil con un motivo.

No lee directamente ninguna API del juego.

Cómo la llama el addon

  • Runa grabada (print)
    Functions.presentation.nullable(runeLabel(value), L["<rune>"]))

Dependencias

Código fuente

Conditions/engraving.lua, línea 53. Solo lectura en el juego; Duplicar crea una copia editable.

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

Volver a Referencia de funciones