mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-23 06:46:00 +00:00
Fixed previous commit always causing recompiling if shadow_pokemon.dat doesn't exist, also rubocopping
This commit is contained in:
@@ -106,28 +106,24 @@ class Game_Map
|
||||
return GameData::MapMetadata.try_get(@map_id)
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Returns the name of this map's BGM. If it's night time, returns the night
|
||||
# version of the BGM (if it exists).
|
||||
#-----------------------------------------------------------------------------
|
||||
def bgm_name
|
||||
if PBDayNight.isNight? && FileTest.audio_exist?("Audio/BGM/" + @map.bgm.name + "_n")
|
||||
return @map.bgm.name + "_n"
|
||||
end
|
||||
return @map.bgm.name
|
||||
end
|
||||
#-----------------------------------------------------------------------------
|
||||
# * Autoplays background music
|
||||
# Plays music called "[normal BGM]_n" if it's night time and it exists
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# Autoplays background music
|
||||
# Plays music called "[normal BGM]_n" if it's night time and it exists
|
||||
def autoplayAsCue
|
||||
pbCueBGM(bgm_name, 1.0, @map.bgm.volume, @map.bgm.pitch) if @map.autoplay_bgm
|
||||
pbBGSPlay(@map.bgs) if @map.autoplay_bgs
|
||||
end
|
||||
#-----------------------------------------------------------------------------
|
||||
# * Plays background music
|
||||
# Plays music called "[normal BGM]_n" if it's night time and it exists
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# Plays background music
|
||||
# Plays music called "[normal BGM]_n" if it's night time and it exists
|
||||
def autoplay
|
||||
pbBGMPlay(bgm_name, @map.bgm.volume, @map.bgm.pitch) if @map.autoplay_bgm
|
||||
pbBGSPlay(@map.bgs) if @map.autoplay_bgs
|
||||
@@ -249,7 +245,7 @@ class Game_Map
|
||||
end
|
||||
|
||||
# Returns whether the position x,y is fully passable (there is no blocking
|
||||
# event there, and the tile is fully passable in all directions)
|
||||
# event there, and the tile is fully passable in all directions).
|
||||
def passableStrict?(x, y, d, self_event = nil)
|
||||
return false if !valid?(x, y)
|
||||
events.each_value do |event|
|
||||
|
||||
Reference in New Issue
Block a user