mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Add Halloween event
This commit is contained in:
parent
8d8d9309b0
commit
1d6b7d6a03
@ -6,6 +6,7 @@ use serde::{Deserialize, Serialize};
|
||||
#[repr(u16)]
|
||||
pub enum CalendarEvent {
|
||||
Christmas = 0,
|
||||
Halloween = 1,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
|
||||
@ -37,6 +38,10 @@ impl Calendar {
|
||||
this.events.push(CalendarEvent::Christmas);
|
||||
}
|
||||
|
||||
if now.month() == 10 && (01..=31).contains(&now.day()) {
|
||||
this.events.push(CalendarEvent::Halloween);
|
||||
}
|
||||
|
||||
this
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user