mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-11-03 08:15:47 +00:00
Release 6.9.0
This commit is contained in:
@@ -24,7 +24,9 @@ def clear_current_map_weather
|
||||
$game_screen.weather(:None,0,0)
|
||||
end
|
||||
|
||||
|
||||
def update_overworld_weather(current_map)
|
||||
return unless $game_weather
|
||||
return if current_map.nil?
|
||||
return if !$game_weather.current_weather
|
||||
|
||||
@@ -35,6 +37,28 @@ def update_overworld_weather(current_map)
|
||||
current_weather_type = :None if !current_weather_type
|
||||
current_weather_intensity=0 if !current_weather_intensity
|
||||
current_weather_type = :None if PBDayNight.isNight? && current_weather_type == :Sunny
|
||||
|
||||
set_weather_ambient_sounds(current_weather_type,current_weather_intensity)
|
||||
$game_screen.weather(current_weather_type,current_weather_intensity,0)
|
||||
end
|
||||
end
|
||||
|
||||
def restore_weather_ambient_sounds()
|
||||
return unless $game_weather
|
||||
current_map = $game_map.map_id
|
||||
return if !$game_weather.current_weather
|
||||
current_weather_array = $game_weather.current_weather[current_map]
|
||||
return if current_weather_array.nil?
|
||||
current_weather_type = current_weather_array[0]
|
||||
current_weather_intensity = current_weather_array[1]
|
||||
set_weather_ambient_sounds(current_weather_type,current_weather_intensity)
|
||||
end
|
||||
|
||||
def set_weather_ambient_sounds(weather_type,intensity)
|
||||
base_volume = 60 #At intensity 1
|
||||
volume = [base_volume + base_volume * (intensity/2),10].min #Intensity at 10: volume 100
|
||||
case weather_type
|
||||
when :Rain, :Storm
|
||||
pbBGSPlay("ambient/rain",volume)
|
||||
when :Wind, :Blizzard, :StrongWind, :Storm
|
||||
pbBGSPlay("ambient/wind",volume)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user