diff --git a/stepmania/src/GameConstantsAndTypes.cpp b/stepmania/src/GameConstantsAndTypes.cpp index 85c36a83fc..0582168b2b 100644 --- a/stepmania/src/GameConstantsAndTypes.cpp +++ b/stepmania/src/GameConstantsAndTypes.cpp @@ -6,6 +6,7 @@ #include "EnumHelper.h" #include "Foreach.h" #include "PrefsManager.h" +#include "LuaManager.h" static const CString RadarCategoryNames[NUM_RADAR_CATEGORIES] = { @@ -255,12 +256,23 @@ static const CString GoalTypeNames[NUM_GOAL_TYPES] = { }; XToString( GoalType ); StringToX( GoalType ); +void LuaGoalType(lua_State* L) +{ + FOREACH_GoalType( gt ) + { + CString s = GoalTypeNames[gt]; + s.MakeUpper(); + LUA->SetGlobal( "GOAL_TYPE_"+s, gt ); + } +} +REGISTER_WITH_LUA_FUNCTION( LuaGoalType ); #include "LuaFunctions.h" LuaFunction_NoArgs( CoinMode, CoinModeToString(PREFSMAN->m_CoinMode) ) LuaFunction_NoArgs( Premium, PremiumToString(PREFSMAN->m_Premium) ) + /* * (c) 2001-2004 Chris Danford * All rights reserved.