let each file register its own constants with Lua
This commit is contained in:
@@ -3,8 +3,16 @@
|
||||
#include "ThemeManager.h"
|
||||
#include "GameState.h"
|
||||
#include "CommonMetrics.h"
|
||||
#include "LuaManager.h"
|
||||
|
||||
|
||||
void LuaPlayerNumber(lua_State* L)
|
||||
{
|
||||
FOREACH_PlayerNumber( pn )
|
||||
LUA->SetGlobal( ssprintf("PLAYER_%d",pn+1), pn );
|
||||
}
|
||||
REGISTER_WITH_LUA_FUNCTION( LuaPlayerNumber );
|
||||
|
||||
PlayerNumber GetNextHumanPlayer( PlayerNumber pn )
|
||||
{
|
||||
for( PlayerNumber p=(PlayerNumber)(pn+1); p<NUM_PLAYERS; ((int&)p)++ )
|
||||
|
||||
Reference in New Issue
Block a user