Added IsSongLocked() Lua binding.

To be honest, I'm wondering if this should be in SongManager
instead of or as well as UnlockManager.
This commit is contained in:
Jason Felds
2011-09-16 23:08:50 -04:00
parent 8d6ccfb098
commit 75d1c672c8
4 changed files with 14 additions and 0 deletions
+1
View File
@@ -11,6 +11,7 @@ StepMania 5.0 $next | 2011????
2011/09/16
----------
* [UnlockManager] Added GetNumLockedSongs() Lua binding. [Wolfman2000]
* [UnlockManager] Added IsSongLocked() Lua binding. [Wolfman2000]
2011/09/12
----------
+1
View File
@@ -1573,6 +1573,7 @@
<Function name='PreferUnlockEntryID'/>
<Function name='UnlockEntryID'/>
<Function name='UnlockEntryIndex'/>
<Function name='IsSongLocked'/>
</Class>
<Class base='ActorFrame' name='WheelBase'>
<Function name='GetCurrentIndex'/>
+4
View File
@@ -4163,6 +4163,10 @@
<Function name='UnlockEntryIndex' return='void' arguments='int iUnlockEntryID'>
Unlocks an entry by index.
</Function>
<Function name='IsSongLocked' return='int' arguments='Song pSong'>
Determines if a song is locked by any means. The number returned determines
how the song is locked.
</Function>
</Class>
<Class name='WheelBase'>
<Function name='GetCurrentIndex' return='int' arguments=''>
+8
View File
@@ -956,6 +956,13 @@ public:
lua_pushnumber( L, fScores[Enum::Check<UnlockRequirement>(L, 2)] );
return 1;
}
static int IsSongLocked( T* p, lua_State *L )
{
Song *pSong = Luna<Song>::check(L,1);
lua_pushnumber( L, UNLOCKMAN->SongIsLocked(pSong));
return 1;
}
LunaUnlockManager()
{
@@ -973,6 +980,7 @@ public:
ADD_METHOD( PreferUnlockEntryID );
ADD_METHOD( UnlockEntryID );
ADD_METHOD( UnlockEntryIndex );
ADD_METHOD( IsSongLocked );
//ADD_METHOD( UnlockSong );
//ADD_METHOD( GetUnlocksByType );
}