mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-07-22 15:47:00 +00:00
Update 6.8
This commit is contained in:
@@ -3,6 +3,11 @@
|
||||
Events.onMapChange+= proc { |_old_map_id|
|
||||
next if !$game_weather || !$game_weather.current_weather || !$game_weather.last_update_time
|
||||
next if !$game_map
|
||||
new_map_id = $game_map.map_id
|
||||
mapMetadata = GameData::MapMetadata.try_get(new_map_id)
|
||||
if mapMetadata.nil? || !mapMetadata.outdoor_map
|
||||
next clear_current_map_weather
|
||||
end
|
||||
update_overworld_weather($game_map.map_id)
|
||||
next if $game_weather.last_update_time.to_i + GameWeather::TIME_BETWEEN_WEATHER_UPDATES > pbGetTimeNow.to_i
|
||||
echoln "- Updating the weather -"
|
||||
@@ -12,11 +17,17 @@ Events.onMapChange+= proc { |_old_map_id|
|
||||
$game_screen.weather(:None,0,0) if !mapMetadata.outdoor_map
|
||||
next unless mapMetadata.outdoor_map
|
||||
$game_weather.update_weather
|
||||
$game_map.refresh
|
||||
}
|
||||
|
||||
def clear_current_map_weather
|
||||
$game_screen.weather(:None,0,0)
|
||||
end
|
||||
|
||||
def update_overworld_weather(current_map)
|
||||
return if current_map.nil?
|
||||
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]
|
||||
@@ -24,5 +35,6 @@ 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
|
||||
|
||||
$game_screen.weather(current_weather_type,current_weather_intensity,0)
|
||||
end
|
||||
Reference in New Issue
Block a user