diff --git a/source/game/StarPlayer.cpp b/source/game/StarPlayer.cpp index 94ed991..9c9c482 100644 --- a/source/game/StarPlayer.cpp +++ b/source/game/StarPlayer.cpp @@ -2202,6 +2202,10 @@ pair Player::currentEmote() const { return make_pair(m_emoteState, m_emoteCooldownTimer); } +Player::State Player::currentState() const { + return m_state; +} + List Player::pullPendingChatActions() { return take(m_pendingChatActions); } diff --git a/source/game/StarPlayer.hpp b/source/game/StarPlayer.hpp index d6750a5..871ca47 100644 --- a/source/game/StarPlayer.hpp +++ b/source/game/StarPlayer.hpp @@ -60,6 +60,21 @@ class Player : public virtual EmoteEntity { public: + enum class State { + Idle, + Walk, + Run, + Jump, + Fall, + Swim, + SwimIdle, + TeleportIn, + TeleportOut, + Crouch, + Lounge + }; + static EnumMap const StateNames; + Player(PlayerConfigPtr config, Uuid uuid = Uuid()); Player(PlayerConfigPtr config, ByteArray const& netStore); Player(PlayerConfigPtr config, Json const& diskStore); @@ -385,6 +400,8 @@ public: void addEmote(HumanoidEmote const& emote, Maybe emoteCooldown = {}); pair currentEmote() const; + State currentState() const; + List pullPendingChatActions() override; Maybe inspectionLogName() const override; @@ -483,21 +500,6 @@ public: void setSecretProperty(String const& name, Json const& value); private: - enum class State { - Idle, - Walk, - Run, - Jump, - Fall, - Swim, - SwimIdle, - TeleportIn, - TeleportOut, - Crouch, - Lounge - }; - static EnumMap const StateNames; - typedef LuaMessageHandlingComponent>>>> GenericScriptComponent; typedef shared_ptr GenericScriptComponentPtr;