Reference › Function reference › Conditions

Conditions.player_state.stateNames

dependency

Call as

Conditions.player_state.stateNames()

Record the dependency Conditions.player_state.stateNames, 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

Lists the states the Player State condition offers, with the editor label of each.

Arguments

None.

Returns

1table<string, string>Maps "mounted", "swimming", "flying", "falling", "resting", "dead" and "ghost" to their localized labels.

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

  • Player State (valid)
    return value.state ~= nil and Functions.values.isin(stateNames(), value.state)

Source

Conditions/player_state.lua, line 40. Read only in game; Duplicate makes an editable copy.

Conditions.player_state.stateNames()
    return {
        mounted = L["Mounted"], swimming = L["Swimming"], flying = L["Flying"], falling = L["Falling"],
        resting = L["In a Rested Area"], dead = L["Dead"], ghost = L["Ghost"],
    }

Back to Function reference