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:
+5
-22
@@ -361,13 +361,7 @@ void GameState::Reset()
|
||||
|
||||
void GameState::JoinPlayer( PlayerNumber pn )
|
||||
{
|
||||
/* If joint premium and we're not taking away a credit for the 2nd join,
|
||||
* give the new player the same number of stage tokens that the old player
|
||||
* has. */
|
||||
if( GetCoinMode() == CoinMode_Pay && GetPremium() == Premium_2PlayersFor1Credit && GetNumSidesJoined() == 1 )
|
||||
m_iPlayerStageTokens[pn] = m_iPlayerStageTokens[this->GetMasterPlayerNumber()];
|
||||
else
|
||||
m_iPlayerStageTokens[pn] = PREFSMAN->m_iSongsPerPlay;
|
||||
m_iPlayerStageTokens[pn] = PREFSMAN->m_iSongsPerPlay;
|
||||
|
||||
m_bSideIsJoined[pn] = true;
|
||||
|
||||
@@ -489,17 +483,7 @@ bool GameState::JoinPlayers()
|
||||
|
||||
int GameState::GetCoinsNeededToJoin() const
|
||||
{
|
||||
int iCoinsToCharge = 0;
|
||||
|
||||
if( GetCoinMode() == CoinMode_Pay )
|
||||
iCoinsToCharge = PREFSMAN->m_iCoinsPerCredit;
|
||||
|
||||
// If joint premium, don't take away a credit for the second join.
|
||||
if( GetPremium() == Premium_2PlayersFor1Credit &&
|
||||
GetNumSidesJoined() == 1 )
|
||||
iCoinsToCharge = 0;
|
||||
|
||||
return iCoinsToCharge;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Game flow:
|
||||
@@ -2055,10 +2039,9 @@ bool GameState::IsEventMode() const
|
||||
|
||||
CoinMode GameState::GetCoinMode() const
|
||||
{
|
||||
if( IsEventMode() && GamePreferences::m_CoinMode == CoinMode_Pay )
|
||||
return CoinMode_Free;
|
||||
else
|
||||
return GamePreferences::m_CoinMode;
|
||||
if( GamePreferences::m_CoinMode == CoinMode_Home )
|
||||
return CoinMode_Home;
|
||||
return CoinMode_Free;
|
||||
}
|
||||
|
||||
ThemeMetric<bool> DISABLE_PREMIUM_IN_EVENT_MODE("GameState","DisablePremiumInEventMode");
|
||||
|
||||
Reference in New Issue
Block a user