#===============================================================================
# ** Battle : Carry Over Map BGM 2 Battle
#===============================================================================
Â
CarryOverMapBGM2Battle = 1 # Switch ID which always carries map BGM to battle
Â
#-------------------------------------------------------------------------------
# * SDK Log
#-------------------------------------------------------------------------------
#SDK.log('Battle.CarryOverMapBGM2Battle?', 'Kain Nobel ©', 2.5, '12.10.2008')
#-------------------------------------------------------------------------------
# * SDK Enabled Test : BEGIN
#-------------------------------------------------------------------------------
#if SDK.enabled?('Battle.CarryOverMapBGM2Battle?')
Â
#===============================================================================
# ** Game_Temp
#===============================================================================
Â
class Game_Temp
 #-----------------------------------------------------------------------------
 # * Public Instance Variables
 #-----------------------------------------------------------------------------
 attr_accessor :battle_bgm_test
 #-----------------------------------------------------------------------------
 # * Alias Listings
 #-----------------------------------------------------------------------------
 alias_method :btlcrryovermapbgm_gmtemp_initialize, :initialize
 #-----------------------------------------------------------------------------
 # * Object Initialization
 #-----------------------------------------------------------------------------
 def initialize
  btlcrryovermapbgm_gmtemp_initialize
  @battle_bgm_test = false
 end
end
Â
#===============================================================================
# ** Game_System
#===============================================================================
Â
class Game_System
 #-----------------------------------------------------------------------------
 # * Alias Listing
 #-----------------------------------------------------------------------------
 alias_method :btlcrryovermapbgm_gmsystem_bgmstop, :bgm_stop
 alias_method :btlcrryovermapbgm_gmsystem_bgmplay, :bgm_play
 #-----------------------------------------------------------------------------
 # * BGM Stop
 #-----------------------------------------------------------------------------
 def bgm_stop
  unless carry_map_bgm_2_battle?
   btlcrryovermapbgm_gmsystem_bgmstop
  end
 end
 #-----------------------------------------------------------------------------
 # * BGM Play
 #-----------------------------------------------------------------------------
 def bgm_play(bgm)
  unless carry_map_bgm_2_battle?
   btlcrryovermapbgm_gmsystem_bgmplay(bgm)
  end
 end
 #-----------------------------------------------------------------------------
 # * Carry Over BGM
 #-----------------------------------------------------------------------------
 def carry_map_bgm_2_battle?
  return false if $game_temp.nil?
  return false unless $game_temp.battle_bgm_test
  return false if playing_bgm.nil?
  return false if playing_bgm.name  == ""
  return false if playing_bgm.volume == 0
  return true if battle_bgm.name   == ""
  return true if playing_bgm == battle_bgm
  return true if $game_switches[CarryOverMapBGM2Battle]
  return false
 end
end
Â
#===============================================================================
# ** Scene_Map
#===============================================================================
Â
class Scene_Map < SDK::Scene_Base
 #-----------------------------------------------------------------------------
 # * Alias Listings
 #-----------------------------------------------------------------------------
 alias_method :btlcrryovermapbgm_scnmap_callbattle, :call_battle
 #-----------------------------------------------------------------------------
 # * Call Battle
 #-----------------------------------------------------------------------------
 def call_battle
  $game_temp.battle_bgm_test = true
  btlcrryovermapbgm_scnmap_callbattle
  $game_temp.battle_bgm_test = false
 end
end
Â
#-------------------------------------------------------------------------------
# * SDK Enabled Test : END
#-------------------------------------------------------------------------------
#end