aboutsummaryrefslogtreecommitdiff
path: root/server/src/commands.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-09-29 23:25:13 +0200
committermetamuffin <metamuffin@disroot.org>2025-09-29 23:25:13 +0200
commitd1bbc09e4f88d04b7cda56c1040c305270a3eeda (patch)
tree6bca87acb63c23852db470c7d44b7629e8e307a2 /server/src/commands.rs
parent66d60ed9ab61efc176808b17fc26445dbf5be705 (diff)
downloadhurrycurry-d1bbc09e4f88d04b7cda56c1040c305270a3eeda.tar
hurrycurry-d1bbc09e4f88d04b7cda56c1040c305270a3eeda.tar.bz2
hurrycurry-d1bbc09e4f88d04b7cda56c1040c305270a3eeda.tar.zst
Delay announcement when paused
Diffstat (limited to 'server/src/commands.rs')
-rw-r--r--server/src/commands.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/server/src/commands.rs b/server/src/commands.rs
index 1ffe4cd1..ad5812bd 100644
--- a/server/src/commands.rs
+++ b/server/src/commands.rs
@@ -18,7 +18,7 @@
use crate::{
entity::{bot::BotDriver, tutorial::Tutorial},
message::TrError,
- server::Server,
+ server::{AnnounceState, Server},
tre, trm,
};
use anyhow::Result;
@@ -173,11 +173,8 @@ impl Server {
.generate_with_book(&spec)
.map_err(|e| TrError::Plain(e.to_string()))?;
self.load(data, timer.map(Duration::from_secs));
- if !skip_announce {
- self.announce_timer = 3.5;
- self.packet_out
- .push_back(PacketC::Menu(Menu::AnnounceStart));
- self.update_paused();
+ if skip_announce {
+ self.announce_state = AnnounceState::Done
}
}
Command::End => {