summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/protocol/src/lib.rs3
-rw-r--r--server/src/entity/tutorial.rs4
-rw-r--r--test-client/protocol.ts1
3 files changed, 7 insertions, 1 deletions
diff --git a/server/protocol/src/lib.rs b/server/protocol/src/lib.rs
index fb6ad46e..4ec2ec37 100644
--- a/server/protocol/src/lib.rs
+++ b/server/protocol/src/lib.rs
@@ -240,6 +240,9 @@ pub enum PacketC {
Environment {
effects: HashSet<String>,
},
+ TutorialEnded {
+ item: ItemIndex,
+ },
/// For use in replay sessions only
ReplayStart,
diff --git a/server/src/entity/tutorial.rs b/server/src/entity/tutorial.rs
index 7aa1578a..5ec1281d 100644
--- a/server/src/entity/tutorial.rs
+++ b/server/src/entity/tutorial.rs
@@ -58,7 +58,9 @@ impl Entity for Tutorial {
if hint.is_none() {
self.delete_timer -= TARGET_DT;
if self.delete_timer <= 0. {
- hint = None
+ hint = None;
+ c.packet_out
+ .push_back(PacketC::TutorialEnded { item: self.target });
} else {
hint = Some((None, trm!("s.tutorial.finished")));
}
diff --git a/test-client/protocol.ts b/test-client/protocol.ts
index b6ef9046..1c7e30cd 100644
--- a/test-client/protocol.ts
+++ b/test-client/protocol.ts
@@ -64,6 +64,7 @@ export type PacketC =
| { type: "score" } & Score // Supplies information for score OSD
| { type: "menu" } & Menu // Open a menu on the client-side
| { type: "environment", effects: string[] }
+ | { type: "tutorial_ended", item: ItemIndex }
| { type: "set_ingame", state: boolean, lobby: boolean } // Set to false when entering the game or switching maps
export type Menu =