Enum ticktime::TickTimeType[][src]

pub enum TickTimeType {
    EarthLike {
        seconds_per_tick: usize,
        month_type: EarthLikeMonthType,
    },
    Custom {
        seconds_per_tick: usize,
        hours_in_a_day: usize,
        months_durations: Vec<usize>,
        seasons_durations: Vec<usize>,
        week_duration: usize,
    },
}

The way the in game datetime will be handled

Variants

EarthLike

The date and time is like on the planet earth (12 months, 24 hours a day, 60 minutes an hour, 60 seconds a minute)

Fields of EarthLike

seconds_per_tick: usize

How much seconds represent a tick. Should be minimum 1.

month_type: EarthLikeMonthType

Which kind of calendar to compute values

Custom

A configurable date and time type. An hour will still be 60 minutes and a minute 60 seconds. Note that sum of season_duration and months_durations must match to be consistent.

Fields of Custom

seconds_per_tick: usize

How much seconds represent a tick. Should be minimum 1.

hours_in_a_day: usize

The duration of a day

months_durations: Vec<usize>

A list of month durations.

seasons_durations: Vec<usize>

A list of seasons durations.

week_duration: usize

duration of a single week.

Trait Implementations

impl Clone for TickTimeType[src]

impl Debug for TickTimeType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.