Adds ability to get the current time of day
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-07-22 13:22:47 +02:00
parent c75541720b
commit 0c6a0cadfe
10 changed files with 132 additions and 25 deletions

View File

@@ -15,6 +15,9 @@ pub use species_data::*;
pub use statistic_set::*;
#[doc(inline)]
pub use statistics::*;
#[doc(inline)]
pub use time_of_day::*;
use std::fmt::{Display, Formatter};
#[cfg(test)]
@@ -50,6 +53,8 @@ mod species_data;
mod statistic_set;
/// Statistics are numerical values on Pokemon that are used in battle.
mod statistics;
/// Time of day defines the time of day for a battle.
mod time_of_day;
/// A parameter for an effect. This is basically a simple way to dynamically store multiple different
/// primitives on data.

View File

@@ -0,0 +1,14 @@
/// The time of day. These values are the 4 different groups of time of day in Pokemon games since
/// gen 5. The exact times these correspond to differ between games.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(u8)]
pub enum TimeOfDay {
/// The morning.
Morning = 0,
/// The day.
Day = 1,
/// The evening.
Evening = 2,
/// The night.
Night = 3,
}