Skip to main content

Module calendar

Module calendar 

Source
Expand description

The game’s calendar: the year, and the time since the year began.

A year is 3,600 seconds of game time, with twelve months of 300 seconds.

use banished_core::calendar::Calendar;
use banished_core::scheduler::ticks;

let mut calendar = Calendar::default();
calendar.advance(ticks(3600.0));
assert_eq!(calendar.year, 2);

Original: FUN_14009bfd0 (set-up), FUN_14009b850 (update).

Structs§

Calendar
The year, and the game time since it began.