Handle game event change situation in lobby queue

This commit is contained in:
NG (Graham) committed 2025-07-24 22:17:41 -04:00
1 parent f48334ef0c
commit 9f90c2e5fb
8 files changed
+96 -7

No files matched your search

+17
View File
@@ -104,6 +104,23 @@ pub struct TypedDevMessage<C> {
pub struct ServerConfig {
pub database: String,
pub auto_signup: bool,
pub queue_mode: QueueChangeMode,
}
pub enum QueueChangeMode {
Upgrade, // move enqueued players into newer gamemode
Notify, // send match change
Ignore, // do nothing
}
impl QueueChangeMode {
pub(super) fn from_persist(persist: crate::persist::settings::QueueMode) -> Self {
match persist {
crate::persist::settings::QueueMode::Upgrade => Self::Upgrade,
crate::persist::settings::QueueMode::Notify => Self::Notify,
crate::persist::settings::QueueMode::Ignore => Self::Ignore,
}
}
}
#[derive(Clone, Debug)]