aboutsummaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/protocol/src/lib.rs1
-rw-r--r--server/src/entity/tutorial.rs6
2 files changed, 7 insertions, 0 deletions
diff --git a/server/protocol/src/lib.rs b/server/protocol/src/lib.rs
index e7b3d483..9d2879f7 100644
--- a/server/protocol/src/lib.rs
+++ b/server/protocol/src/lib.rs
@@ -243,6 +243,7 @@ pub enum PacketC {
TutorialEnded {
player: PlayerID,
item: ItemIndex,
+ success: bool,
},
/// For use in replay sessions only
diff --git a/server/src/entity/tutorial.rs b/server/src/entity/tutorial.rs
index 889815a6..b61827c1 100644
--- a/server/src/entity/tutorial.rs
+++ b/server/src/entity/tutorial.rs
@@ -41,6 +41,11 @@ impl Entity for Tutorial {
message: None,
});
}
+ c.packet_out.push_back(PacketC::TutorialEnded {
+ player: self.player,
+ item: self.target,
+ success: false,
+ });
}
fn tick(&mut self, c: EntityContext<'_>) -> Result<()> {
const TARGET_DT: f32 = 0.2;
@@ -65,6 +70,7 @@ impl Entity for Tutorial {
c.packet_out.push_back(PacketC::TutorialEnded {
item: self.target,
player: self.player,
+ success: true,
});
} else {
hint = Some((None, trm!("s.tutorial.finished")));