From bf1a5cef4b7fa87cdd382c565044731c1ccef9e3 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 17 Sep 2024 14:58:35 +0200 Subject: add hint packet for tutorial --- server/src/entity/mod.rs | 1 + server/src/entity/tutorial.rs | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 server/src/entity/tutorial.rs (limited to 'server/src') diff --git a/server/src/entity/mod.rs b/server/src/entity/mod.rs index 30a5da55..70c5c785 100644 --- a/server/src/entity/mod.rs +++ b/server/src/entity/mod.rs @@ -23,6 +23,7 @@ pub mod customers; pub mod environment_effect; pub mod item_portal; pub mod player_portal; +pub mod tutorial; use crate::{data::ItemTileRegistry, scoreboard::ScoreboardStore}; use anyhow::{anyhow, Result}; diff --git a/server/src/entity/tutorial.rs b/server/src/entity/tutorial.rs new file mode 100644 index 00000000..20b1d03e --- /dev/null +++ b/server/src/entity/tutorial.rs @@ -0,0 +1,22 @@ +use super::{Entity, EntityContext}; +use anyhow::Result; +use hurrycurry_protocol::{glam::IVec2, PlayerID}; + +pub struct Tutorial { + player: PlayerID, +} + +impl Entity for Tutorial { + fn tick(&mut self, _c: EntityContext<'_>) -> Result<()> { + Ok(()) + } + fn destructor(&mut self, _c: EntityContext<'_>) {} + fn interact( + &mut self, + _c: EntityContext<'_>, + _pos: Option, + _player: PlayerID, + ) -> Result { + Ok(false) + } +} -- cgit v1.2.3-70-g09d2