diff options
author | metamuffin <metamuffin@disroot.org> | 2024-09-19 22:36:38 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-09-19 22:36:39 +0200 |
commit | 60adc9a098920f96a3ff1aefe791c129dfc5aa3e (patch) | |
tree | 9cbee30eeb35b183e9b8b6253f192ec17d29f2c9 /server | |
parent | 5b8ac81f412043218120bd59fcfa9e969c7eeabe (diff) | |
download | hurrycurry-60adc9a098920f96a3ff1aefe791c129dfc5aa3e.tar hurrycurry-60adc9a098920f96a3ff1aefe791c129dfc5aa3e.tar.bz2 hurrycurry-60adc9a098920f96a3ff1aefe791c129dfc5aa3e.tar.zst |
send tutorial success
Diffstat (limited to 'server')
-rw-r--r-- | server/protocol/src/lib.rs | 1 | ||||
-rw-r--r-- | server/src/entity/tutorial.rs | 6 |
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"))); |