diff --git a/stepmania/src/PlayerState.cpp b/stepmania/src/PlayerState.cpp index f0ee940294..4032dac31d 100644 --- a/stepmania/src/PlayerState.cpp +++ b/stepmania/src/PlayerState.cpp @@ -91,6 +91,23 @@ int PlayerState::GetSumOfActiveAttackLevels() const return iSum; } +// lua start +#include "LuaBinding.h" + +class LunaPlayerState: public Luna +{ +public: + LunaPlayerState() { LUA->Register( Register ); } + + static void Register(lua_State *L) + { + Luna::Register( L ); + } +}; + +LUA_REGISTER_CLASS( PlayerState ) +// lua end + /* * (c) 2001-2004 Chris Danford, Chris Gomez * All rights reserved. diff --git a/stepmania/src/PlayerState.h b/stepmania/src/PlayerState.h index d3ef1fc5f4..141badd9f4 100644 --- a/stepmania/src/PlayerState.h +++ b/stepmania/src/PlayerState.h @@ -7,6 +7,7 @@ #include "PlayerOptions.h" #include #include "Attack.h" +struct lua_State; class PlayerState { @@ -96,6 +97,9 @@ public: // Used in Battle // Attack m_Inventory[NUM_INVENTORY_SLOTS]; + + // Lua + void PushSelf( lua_State *L ); }; #endif