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:
@@ -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
|
||||
----------
|
||||
|
||||
@@ -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'/>
|
||||
|
||||
@@ -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=''>
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user