mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 14:14:59 +00:00
Moved all settings into module Settings
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user