Exposing GameState::JoinInput to Lua.
This commit is contained in:
@@ -783,6 +783,7 @@
|
|||||||
<Function name='IsSideJoined'/>
|
<Function name='IsSideJoined'/>
|
||||||
<Function name='IsWinner'/>
|
<Function name='IsWinner'/>
|
||||||
<Function name='JoinPlayer'/>
|
<Function name='JoinPlayer'/>
|
||||||
|
<Function name='JoinInput'/>
|
||||||
<Function name='PlayerIsUsingModifier'/>
|
<Function name='PlayerIsUsingModifier'/>
|
||||||
<Function name='PlayersCanJoin'/>
|
<Function name='PlayersCanJoin'/>
|
||||||
<Function name='RefreshNoteSkinData'/>
|
<Function name='RefreshNoteSkinData'/>
|
||||||
|
|||||||
@@ -2327,7 +2327,10 @@ save yourself some time, copy this for undocumented things:
|
|||||||
Returns <code>true</code> if player <code>pn</code> is the winner.
|
Returns <code>true</code> if player <code>pn</code> is the winner.
|
||||||
</Function>
|
</Function>
|
||||||
<Function name='JoinPlayer' return='void' arguments='PlayerNumber pn'>
|
<Function name='JoinPlayer' return='void' arguments='PlayerNumber pn'>
|
||||||
Joins player <code>pn</code>.
|
Joins player <code>pn</code>. Does not deduct coins.
|
||||||
|
</Function>
|
||||||
|
<Function name='JoinInput' return='bool' arguments='PlayerNumber pn'>
|
||||||
|
Similar to JoinPlayer, but checks whether the player is allowed to join and returns false if the player is not allowed to join. Also deducts coins for joining. A player can't join if PlayersCanJoin() returns false, or that side is already joined (is true for both sides when in a style that is OnePlayerTwoSides), or there are not enough coins.
|
||||||
</Function>
|
</Function>
|
||||||
<Function name='PlayerIsUsingModifier' return='bool' arguments='PlayerNumber pn, string sModifier'>
|
<Function name='PlayerIsUsingModifier' return='bool' arguments='PlayerNumber pn, string sModifier'>
|
||||||
Returns <code>true</code> if player <code>pn</code> is using modifier <code>sModifier</code>.
|
Returns <code>true</code> if player <code>pn</code> is using modifier <code>sModifier</code>.
|
||||||
|
|||||||
@@ -2474,6 +2474,11 @@ public:
|
|||||||
static int Reset( T* p, lua_State *L ) { p->Reset(); return 0; }
|
static int Reset( T* p, lua_State *L ) { p->Reset(); return 0; }
|
||||||
static int JoinPlayer( T* p, lua_State *L ) { p->JoinPlayer(Enum::Check<PlayerNumber>(L, 1)); return 0; }
|
static int JoinPlayer( T* p, lua_State *L ) { p->JoinPlayer(Enum::Check<PlayerNumber>(L, 1)); return 0; }
|
||||||
static int UnjoinPlayer( T* p, lua_State *L ) { p->UnjoinPlayer(Enum::Check<PlayerNumber>(L, 1)); return 0; }
|
static int UnjoinPlayer( T* p, lua_State *L ) { p->UnjoinPlayer(Enum::Check<PlayerNumber>(L, 1)); return 0; }
|
||||||
|
static int JoinInput( T* p, lua_State *L )
|
||||||
|
{
|
||||||
|
lua_pushboolean(L, p->JoinInput(Enum::Check<PlayerNumber>(L, 1)));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
static int GetSongPercent( T* p, lua_State *L ) { lua_pushnumber(L, p->GetSongPercent(FArg(1))); return 1; }
|
static int GetSongPercent( T* p, lua_State *L ) { lua_pushnumber(L, p->GetSongPercent(FArg(1))); return 1; }
|
||||||
DEFINE_METHOD( GetCurMusicSeconds, m_Position.m_fMusicSeconds )
|
DEFINE_METHOD( GetCurMusicSeconds, m_Position.m_fMusicSeconds )
|
||||||
|
|
||||||
@@ -2606,6 +2611,7 @@ public:
|
|||||||
ADD_METHOD( Reset );
|
ADD_METHOD( Reset );
|
||||||
ADD_METHOD( JoinPlayer );
|
ADD_METHOD( JoinPlayer );
|
||||||
ADD_METHOD( UnjoinPlayer );
|
ADD_METHOD( UnjoinPlayer );
|
||||||
|
ADD_METHOD( JoinInput );
|
||||||
ADD_METHOD( GetSongPercent );
|
ADD_METHOD( GetSongPercent );
|
||||||
ADD_METHOD( GetCurMusicSeconds );
|
ADD_METHOD( GetCurMusicSeconds );
|
||||||
ADD_METHOD( GetCharacter );
|
ADD_METHOD( GetCharacter );
|
||||||
|
|||||||
Reference in New Issue
Block a user