• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Temporarily forcing night-time on a map

59
Posts
8
Years
  • Age 27
  • Seen Aug 9, 2020
How should I try to "lie" to Essentials and force a specific time? In PokemonTime, there's this piece of code below, but I can't use a switch to make isNight? return true, because the others will overwrite it, at least on tint. Haven't checked events or metadata.

Code:
# Returns true if it's day.
  def self.isDay?(time)
return (time.hour>=6 && time.hour<20)
  end

# Returns true if it's night.
  def self.isNight?(time)
return (time.hour>=20 || time.hour<6)
  end

# Returns true if it's morning.
  def self.isMorning?(time)
return (time.hour>=6 && time.hour<12)
  end

# Returns true if it's the afternoon.
  def self.isAfternoon?(time)
return (time.hour>=12 && time.hour<20)
  end

# Returns true if it's the evening.
  def self.isEvening?(time)
return (time.hour>=17 && time.hour<20)
  end
 
Back
Top