Moved all settings into module Settings

This commit is contained in:
Maruno17
2021-02-01 21:03:58 +00:00
parent 923844fdc7
commit 1209b804e9
88 changed files with 848 additions and 839 deletions

View File

@@ -93,8 +93,8 @@ class SlotMachineScore < BitmapSprite
end
def score=(value)
@score=value
@score=MAX_COINS if @score>MAX_COINS
@score = value
@score = Settings::MAX_COINS if @score > Settings::MAX_COINS
refresh
end
@@ -212,7 +212,7 @@ class SlotMachineScene
update
@sprites["payout"].score -= 1
@sprites["credit"].score += 1
if Input.trigger?(Input::C) || @sprites["credit"].score==MAX_COINS
if Input.trigger?(Input::C) || @sprites["credit"].score == Settings::MAX_COINS
@sprites["credit"].score += @sprites["payout"].score
@sprites["payout"].score = 0
end
@@ -286,8 +286,8 @@ class SlotMachineScene
update
@sprites["window1"].bitmap.clear if @sprites["window1"].bitmap
@sprites["window2"].bitmap.clear if @sprites["window2"].bitmap
if @sprites["credit"].score==MAX_COINS
pbMessage(_INTL("You've got {1} Coins.",MAX_COINS.to_s_formatted))
if @sprites["credit"].score == Settings::MAX_COINS
pbMessage(_INTL("You've got {1} Coins.", Settings::MAX_COINS.to_s_formatted))
break
elsif $PokemonGlobal.coins==0
pbMessage(_INTL("You've run out of Coins.\nGame over!"))
@@ -392,7 +392,7 @@ def pbSlotMachine(difficulty=1)
pbMessage(_INTL("It's a Slot Machine."))
elsif $PokemonGlobal.coins==0
pbMessage(_INTL("You don't have any Coins to play!"))
elsif $PokemonGlobal.coins==MAX_COINS
elsif $PokemonGlobal.coins == Settings::MAX_COINS
pbMessage(_INTL("Your Coin Case is full!"))
else
pbFadeOutIn {

View File

@@ -108,9 +108,9 @@ class VoltorbFlip
@sprites["curtainL"].visible=false
@sprites["curtainR"].visible=false
@sprites["curtain"].opacity=100
if $PokemonGlobal.coins>=MAX_COINS
pbMessage(_INTL("You've gathered {1} Coins. You cannot gather any more.",MAX_COINS.to_s_formatted))
$PokemonGlobal.coins=MAX_COINS # As a precaution
if $PokemonGlobal.coins >= Settings::MAX_COINS
pbMessage(_INTL("You've gathered {1} Coins. You cannot gather any more.", Settings::MAX_COINS.to_s_formatted))
$PokemonGlobal.coins = Settings::MAX_COINS # As a precaution
@quit=true
# elsif !pbConfirmMessage(_INTL("Play Voltorb Flip Lv. {1}?",@level)) && $PokemonGlobal.coins<99999
# @quit=true
@@ -616,7 +616,7 @@ end
def pbVoltorbFlip
if GameData::Item.exists?(:COINCASE) && !$PokemonBag.pbHasItem?(:COINCASE)
pbMessage(_INTL("You can't play unless you have a Coin Case."))
elsif $PokemonGlobal.coins==MAX_COINS
elsif $PokemonGlobal.coins == Settings::MAX_COINS
pbMessage(_INTL("Your Coin Case is full!"))
else
scene=VoltorbFlip.new