mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-28 00:04:33 +02:00
Coin Case Cap is now a GameRule
This commit is contained in:
parent
4a7c89cf53
commit
b6ba893a5d
@ -609,6 +609,7 @@ Public Class GameMode
|
|||||||
gameRules.Add(New GameRule("SavingDisabled", "0"))
|
gameRules.Add(New GameRule("SavingDisabled", "0"))
|
||||||
gameRules.Add(New GameRule("SingleUseTM", "0"))
|
gameRules.Add(New GameRule("SingleUseTM", "0"))
|
||||||
gameRules.Add(New GameRule("CanForgetHM", "0"))
|
gameRules.Add(New GameRule("CanForgetHM", "0"))
|
||||||
|
gameRules.Add(New GameRule("CoinCaseCap", "0"))
|
||||||
|
|
||||||
gameMode._gameRules = gameRules
|
gameMode._gameRules = gameRules
|
||||||
|
|
||||||
|
@ -1034,8 +1034,8 @@ TryAgain:
|
|||||||
|
|
||||||
'Completed the level
|
'Completed the level
|
||||||
If GameState = States.GameWon Then
|
If GameState = States.GameWon Then
|
||||||
If Core.Player.Coins + TotalCoins > 50000 Then
|
If CInt(GameModeManager.GetGameRuleValue("CoinCaseCap", "0")) > 0 AndAlso Core.Player.Coins + TotalCoins > CInt(GameModeManager.GetGameRuleValue("CoinCaseCap", "0")) Then
|
||||||
TotalCoins = 50000 - Core.Player.Coins
|
TotalCoins = CInt(GameModeManager.GetGameRuleValue("CoinCaseCap", "0")) - Core.Player.Coins
|
||||||
CurrentCoins = 0
|
CurrentCoins = 0
|
||||||
TextBox.Show(Localization.GetString("VoltorbFlip_MaxCoins", "Your Coin Case can't fit~any more Coin(s)!"))
|
TextBox.Show(Localization.GetString("VoltorbFlip_MaxCoins", "Your Coin Case can't fit~any more Coin(s)!"))
|
||||||
Quit()
|
Quit()
|
||||||
@ -1286,7 +1286,7 @@ TryAgain:
|
|||||||
Delay = 5
|
Delay = 5
|
||||||
End If
|
End If
|
||||||
If Delay > 3 Then
|
If Delay > 3 Then
|
||||||
If Core.Player.Coins + TotalCoins > 50000 Then
|
If CInt(GameModeManager.GetGameRuleValue("CoinCaseCap", "0")) > 0 AndAlso Core.Player.Coins + TotalCoins > CInt(GameModeManager.GetGameRuleValue("CoinCaseCap", "0")) Then
|
||||||
If CurrentLevel < PreviousLevel Then
|
If CurrentLevel < PreviousLevel Then
|
||||||
TextBox.Show(Localization.GetString("VoltorbFlip_NewLevel_Lower1", "Dropped to Game Lv.") & " " & CurrentLevel & Localization.GetString("VoltorbFlip_NewLevel_Lower2", "!"))
|
TextBox.Show(Localization.GetString("VoltorbFlip_NewLevel_Lower1", "Dropped to Game Lv.") & " " & CurrentLevel & Localization.GetString("VoltorbFlip_NewLevel_Lower2", "!"))
|
||||||
End If
|
End If
|
||||||
|
@ -303,8 +303,8 @@
|
|||||||
Case "addcoins"
|
Case "addcoins"
|
||||||
Dim coins As Integer = int(argument)
|
Dim coins As Integer = int(argument)
|
||||||
|
|
||||||
If Core.Player.Coins + coins > 50000 Then
|
If CInt(GameModeManager.GetGameRuleValue("CoinCaseCap", "0")) > 0 AndAlso Core.Player.Coins + coins > CInt(GameModeManager.GetGameRuleValue("CoinCaseCap", "0")) Then
|
||||||
coins = 50000 - Core.Player.Coins
|
coins = CInt(GameModeManager.GetGameRuleValue("CoinCaseCap", "0")) - Core.Player.Coins
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Core.Player.Coins += coins
|
Core.Player.Coins += coins
|
||||||
|
@ -284,7 +284,10 @@
|
|||||||
CanContinue = False
|
CanContinue = False
|
||||||
Case "voltorbflip"
|
Case "voltorbflip"
|
||||||
If Core.Player.Inventory.GetItemAmount(54.ToString) > 0 Then
|
If Core.Player.Inventory.GetItemAmount(54.ToString) > 0 Then
|
||||||
If Core.Player.Coins < 50000 Then
|
If CInt(GameModeManager.GetGameRuleValue("CoinCaseCap", "0")) > 0 AndAlso Core.Player.Coins > CInt(GameModeManager.GetGameRuleValue("CoinCaseCap", "0")) Then
|
||||||
|
Screen.TextBox.Show(Localization.GetString("VoltorbFlip_BeforeGame_FullCoinCase", "Your Coin Case is already full!"))
|
||||||
|
IsReady = True
|
||||||
|
Else
|
||||||
If VoltorbFlip.VoltorbFlipScreen.TotalCoins = -1 Then
|
If VoltorbFlip.VoltorbFlipScreen.TotalCoins = -1 Then
|
||||||
Core.SetScreen(New VoltorbFlip.VoltorbFlipScreen(CurrentScreen))
|
Core.SetScreen(New VoltorbFlip.VoltorbFlipScreen(CurrentScreen))
|
||||||
End If
|
End If
|
||||||
@ -303,10 +306,6 @@
|
|||||||
IsReady = True
|
IsReady = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
|
||||||
Screen.TextBox.Show(Localization.GetString("VoltorbFlip_BeforeGame_FullCoinCase", "Your Coin Case is already full!"))
|
|
||||||
IsReady = True
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Screen.TextBox.Show(Localization.GetString("VoltorbFlip_BeforeGame_NoCoinCase", "You don't have a Coin Case!~Come back when you have one!"))
|
Screen.TextBox.Show(Localization.GetString("VoltorbFlip_BeforeGame_NoCoinCase", "You don't have a Coin Case!~Come back when you have one!"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user