Make Pay mode work like Free

Third time's a charm.  Removing Pay mode without causing breakage to the Lua API.
This is the first step.
This commit is contained in:
Devin J. Pohly
2013-06-08 16:11:02 -04:00
parent 259e9b1e00
commit 00e6f6e924
5 changed files with 19 additions and 121 deletions
+6 -31
View File
@@ -97,38 +97,13 @@ namespace
}
else // bShowCreditsMessage
{
if( GAMESTATE->PlayersCanJoin() )
return CREDITS_NOT_PRESENT.GetValue();
CoinMode mode = GAMESTATE->GetCoinMode();
switch( mode )
{
case CoinMode_Home:
if( GAMESTATE->PlayersCanJoin() )
return CREDITS_PRESS_START.GetValue();
else
return CREDITS_NOT_PRESENT.GetValue();
case CoinMode_Pay:
{
int iCredits = GAMESTATE->m_iCoins / PREFSMAN->m_iCoinsPerCredit;
int iCoins = GAMESTATE->m_iCoins % PREFSMAN->m_iCoinsPerCredit;
RString sCredits = CREDITS_CREDITS;
// todo: allow themers to change these strings -aj
if( iCredits > 0 || PREFSMAN->m_iCoinsPerCredit == 1 )
sCredits += ssprintf(" %d", iCredits);
if( PREFSMAN->m_iCoinsPerCredit > 1 )
sCredits += ssprintf(" %d/%d", iCoins, PREFSMAN->m_iCoinsPerCredit.Get() );
if( iCredits >= MAX_NUM_CREDITS )
sCredits += " " + CREDITS_MAX.GetValue();
return sCredits;
}
case CoinMode_Free:
if( GAMESTATE->PlayersCanJoin() )
return CREDITS_FREE_PLAY.GetValue();
else
return CREDITS_NOT_PRESENT.GetValue();
default:
FAIL_M(ssprintf("Invalid CoinMode: %i", mode));
}
if( mode == CoinMode_Home )
return CREDITS_PRESS_START.GetValue();
return CREDITS_FREE_PLAY.GetValue();
}
}