Merge pull request #165 from kyzentun/ranking_exposure

Exposes functions useful for a custom name entry screen.
This commit is contained in:
AJ Kelly
2014-05-13 15:23:46 -05:00
4 changed files with 23 additions and 1 deletions
+2
View File
@@ -831,6 +831,7 @@
<Function name='SetPreferredSongGroup'/>
<Function name='SetSongOptions'/>
<Function name='SetTemporaryEventMode'/>
<Function name='StoreRankingName'/>
<Function name='ShowW1'/>
<Function name='UnjoinPlayer'/>
</Class>
@@ -1179,6 +1180,7 @@
<Function name='SetGoalCalories'/>
<Function name='SetGoalSeconds'/>
<Function name='SetGoalType'/>
<Function name='SetLastUsedHighScoreName'/>
<Function name='SetWeightPounds'/>
</Class>
<Class name='ProfileManager'>
+6
View File
@@ -2490,6 +2490,9 @@ save yourself some time, copy this for undocumented things:
<Function name='SetTemporaryEventMode' return='void' arguments='bool bOn'>
Turns temporary Event Mode on or off, depending on <code>bOn</code>.
</Function>
<Function name='StoreRankingName' return='void' arguments='PlayerNumber pn, string name'>
Stores the ranking name for the player. Use this at the end of a round, on a name entry screen or similar, to set the name for the high scores the player has earned.
</Function>
<Function name='ShowW1' return='void' arguments='bool bOn'>
Determines if Judgment W1 should be shown based on <code>bOn</code>.
</Function>
@@ -3340,6 +3343,9 @@ save yourself some time, copy this for undocumented things:
<Function name='SetGoalType' return='void' arguments='GoalType gt'>
Sets the current goal type to <code>gt</code>.
</Function>
<Function name='SetLastUsedHighScoreName' return='void' arguments='string name'>
Sets last used high score name.
</Function>
<Function name='SetWeightPounds' return='void' arguments='int weightPounds'>
Sets how much the player weighs (in pounds) to <code>weightPounds</code>.
</Function>
+9 -1
View File
@@ -1841,7 +1841,8 @@ bool GameState::AnyPlayerHasRankingFeats() const
void GameState::StoreRankingName( PlayerNumber pn, RString sName )
{
sName.MakeUpper();
// The theme can upper it if desired. -Kyz
// sName.MakeUpper();
if( USE_NAME_BLACKLIST )
{
@@ -2577,6 +2578,12 @@ public:
return 0;
}
static int StoreRankingName( T* p, lua_State *L )
{
p->StoreRankingName(Enum::Check<PlayerNumber>(L, 1), SArg(2));
return 0;
}
DEFINE_METHOD( HaveProfileToLoad, HaveProfileToLoad() )
DEFINE_METHOD( HaveProfileToSave, HaveProfileToSave() )
@@ -2695,6 +2702,7 @@ public:
ADD_METHOD( SaveProfiles );
ADD_METHOD( HaveProfileToLoad );
ADD_METHOD( HaveProfileToSave );
ADD_METHOD( StoreRankingName );
}
};
+6
View File
@@ -1993,6 +1993,11 @@ class LunaProfile: public Luna<Profile>
public:
static int GetDisplayName( T* p, lua_State *L ) { lua_pushstring(L, p->m_sDisplayName ); return 1; }
static int GetLastUsedHighScoreName( T* p, lua_State *L ) { lua_pushstring(L, p->m_sLastUsedHighScoreName ); return 1; }
static int SetLastUsedHighScoreName( T* p, lua_State *L )
{
p->m_sLastUsedHighScoreName= SArg(1);
return 0;
}
static int GetHighScoreList( T* p, lua_State *L )
{
if( LuaBinding::CheckLuaObjectType(L, 1, "Song") )
@@ -2117,6 +2122,7 @@ public:
{
ADD_METHOD( GetDisplayName );
ADD_METHOD( GetLastUsedHighScoreName );
ADD_METHOD( SetLastUsedHighScoreName );
ADD_METHOD( GetHighScoreList );
ADD_METHOD( GetCategoryHighScoreList );
ADD_METHOD( GetCharacter );