Update 6.8

This commit is contained in:
chardub
2026-07-10 15:42:06 -04:00
parent 5b85e72cb2
commit 6a6f126a18
7871 changed files with 493194 additions and 224826 deletions
@@ -54,7 +54,11 @@
# :credits => "FL"
# })
# end
#
class Game_Temp
attr_accessor :faster_time
end
module UnrealTime
# Set false to disable this system (returns Time.now)
ENABLED = true
@@ -63,7 +67,6 @@ module UnrealTime
# So if it is 100, one second in real time will be 100 seconds in game.
# If it is 60, one second in real time will be one minute in game.
PROPORTION = 60
# Starting on Essentials v17, the map tone only try to refresh tone each 30
# real time seconds.
# If this variable number isn't -1, the game use this number instead of 30.
@@ -87,7 +90,7 @@ module UnrealTime
# Choose switch number that when true the time won't pass (or -1 to cancel).
# Only works if TIME_STOPS=true.
SWITCH_STOPS = -1
SWITCH_STOPS = SWITCH_TIME_PAUSED
# Choose variable(s) number(s) that can hold time passage (or -1 to cancel).
# Look at description for more details.
@@ -132,10 +135,18 @@ module UnrealTime
# Does the same thing as EXTRA_SECONDS variable.
def self.add_seconds(seconds)
raise "Method doesn't work when TIME_STOPS is false!" if !TIME_STOPS
$PokemonGlobal.newFrameCount += (seconds * Graphics.frame_rate) / PROPORTION.to_f
$PokemonGlobal.newFrameCount += (seconds * Graphics.frame_rate) / UnrealTime.proportion.to_f
PBDayNight.sheduleToneRefresh
end
def self.proportion
if $game_temp.faster_time
return UnrealTime::PROPORTION*$game_temp.faster_time
else
return UnrealTime::PROPORTION
end
end
def self.add_days(days)
add_seconds(60 * 60 * 24 * days)
end
@@ -178,6 +189,16 @@ def getDayOfTheWeek()
return UnrealTime::WEEK_DAYS[day_of_week]
end
def getDayOfTheWeekName(day = getDayOfTheWeek())
return _INTL("Monday") if day == :MONDAY
return _INTL("Tuesday") if day == :TUESDAY
return _INTL("Wednesday") if day == :WEDNESDAY
return _INTL("Thursday") if day == :THURSDAY
return _INTL("Friday") if day == :FRIDAY
return _INTL("Saturday") if day == :SATURDAY
return _INTL("Sunday")
end
def isDayOfTheWeek(day)
return day == getDayOfTheWeek()
end
@@ -243,12 +264,19 @@ if UnrealTime::ENABLED
attr_accessor :newFrameCount # Became float when using extra values
attr_accessor :extraYears
# def addNewFrameCount
# return if (UnrealTime::SWITCH_STOPS > 0 &&
# $game_switches[UnrealTime::SWITCH_STOPS])
# self.newFrameCount += 1
# end
def addNewFrameCount
return if (UnrealTime::SWITCH_STOPS > 0 &&
$game_switches[UnrealTime::SWITCH_STOPS])
self.newFrameCount += 1
return if (UnrealTime::SWITCH_STOPS > 0 && $game_switches[UnrealTime::SWITCH_STOPS])
mult = $game_temp&.faster_time
mult = 1 if !mult || mult <= 0
self.newFrameCount += mult
end
def newFrameCount
@newFrameCount = 0 if !@newFrameCount
return @newFrameCount
@@ -290,4 +318,4 @@ if UnrealTime::ENABLED
end
end
end
end
end