broadcast on coin inserted
This commit is contained in:
@@ -90,6 +90,16 @@ static const CString CoinModeNames[] = {
|
||||
"free",
|
||||
};
|
||||
XToString( CoinMode, NUM_COIN_MODES );
|
||||
static void LuaCoinMode(lua_State* L)
|
||||
{
|
||||
FOREACH_CoinMode( i )
|
||||
{
|
||||
CString s = CoinModeNames[i];
|
||||
s.MakeUpper();
|
||||
LUA->SetGlobal( "COIN_"+s, i );
|
||||
}
|
||||
}
|
||||
REGISTER_WITH_LUA_FUNCTION( LuaCoinMode );
|
||||
|
||||
|
||||
static const CString PremiumNames[] = {
|
||||
|
||||
@@ -267,7 +267,7 @@ const int ITEM_NONE = -1;
|
||||
//
|
||||
|
||||
enum CoinMode { COIN_HOME, COIN_PAY, COIN_FREE, NUM_COIN_MODES };
|
||||
|
||||
#define FOREACH_CoinMode( i ) FOREACH_ENUM( CoinMode, NUM_COIN_MODES, i )
|
||||
const CString& CoinModeToString( CoinMode cm );
|
||||
|
||||
|
||||
|
||||
@@ -2002,6 +2002,7 @@ public:
|
||||
static int GetNumPlayersEnabled( T* p, lua_State *L ) { lua_pushnumber(L, p->GetNumPlayersEnabled() ); return 1; }
|
||||
static int GetSongBeat( T* p, lua_State *L ) { lua_pushnumber(L, p->m_fSongBeat ); return 1; }
|
||||
static int PlayerUsingBothSides( T* p, lua_State *L ) { lua_pushboolean(L, p->PlayerUsingBothSides() ); return 1; }
|
||||
static int GetCoins( T* p, lua_State *L ) { lua_pushnumber(L, p->m_iCoins ); return 1; }
|
||||
|
||||
static void Register(lua_State *L)
|
||||
{
|
||||
@@ -2039,6 +2040,7 @@ public:
|
||||
ADD_METHOD( GetNumPlayersEnabled )
|
||||
ADD_METHOD( GetSongBeat )
|
||||
ADD_METHOD( PlayerUsingBothSides )
|
||||
ADD_METHOD( GetCoins )
|
||||
|
||||
Luna<T>::Register( L );
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ static const CString MessageNames[] = {
|
||||
"MenuRightP2",
|
||||
"MadeChoiceP1",
|
||||
"MadeChoiceP2",
|
||||
"CoinInserted",
|
||||
};
|
||||
XToString( Message, NUM_MESSAGES );
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ enum Message
|
||||
MESSAGE_MENU_RIGHT_P2,
|
||||
MESSAGE_MADE_CHOICE_P1,
|
||||
MESSAGE_MADE_CHOICE_P2,
|
||||
MESSAGE_COIN_INSERTED,
|
||||
NUM_MESSAGES,
|
||||
MESSAGE_INVALID
|
||||
};
|
||||
|
||||
@@ -1269,6 +1269,7 @@ void InsertCoin( int iNum )
|
||||
BOOKKEEPER->CoinInserted();
|
||||
SCREENMAN->RefreshCreditsMessages();
|
||||
SCREENMAN->PlayCoinSound();
|
||||
MESSAGEMAN->Broadcast( MESSAGE_COIN_INSERTED );
|
||||
}
|
||||
|
||||
void InsertCredit()
|
||||
|
||||
Reference in New Issue
Block a user