mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 22:24:58 +00:00
Improved usage of Time.now and pbGetTimeNow
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
# Pokérus check
|
||||
EventHandlers.add(:on_frame_update, :pokerus_counter,
|
||||
proc {
|
||||
next if !$player
|
||||
next if !$player&.party.any? { |pkmn| pkmn.pokerusStage == 1 }
|
||||
last = $PokemonGlobal.pokerusTime
|
||||
next if !last
|
||||
now = pbGetTimeNow
|
||||
@@ -48,7 +48,7 @@ EventHandlers.add(:on_frame_update, :low_battery_warning,
|
||||
next if $game_temp.warned_low_battery || !pbBatteryLow?
|
||||
next if $game_temp.in_menu || $game_temp.in_battle || $game_player.move_route_forcing ||
|
||||
$game_temp.message_window_showing || pbMapInterpreterRunning?
|
||||
next if pbGetTimeNow.sec != 0
|
||||
next if Time.now.sec != 0
|
||||
$game_temp.warned_low_battery = true
|
||||
pbMessage(_INTL("The game has detected that the battery is low. You should save soon to avoid losing your progress."))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user