summaryrefslogtreecommitdiff
path: root/server/src/entity/tutorial.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-09-17 14:58:35 +0200
committermetamuffin <metamuffin@disroot.org>2024-09-17 16:57:34 +0200
commitbf1a5cef4b7fa87cdd382c565044731c1ccef9e3 (patch)
tree412c704845fd0e9cf643572608de6e8170d9cbc8 /server/src/entity/tutorial.rs
parentf1ffe3f2e0e22dac40c88c8f13f1ffa8b2955743 (diff)
downloadhurrycurry-bf1a5cef4b7fa87cdd382c565044731c1ccef9e3.tar
hurrycurry-bf1a5cef4b7fa87cdd382c565044731c1ccef9e3.tar.bz2
hurrycurry-bf1a5cef4b7fa87cdd382c565044731c1ccef9e3.tar.zst
add hint packet for tutorial
Diffstat (limited to 'server/src/entity/tutorial.rs')
-rw-r--r--server/src/entity/tutorial.rs22
1 files changed, 22 insertions, 0 deletions
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<IVec2>,
+ _player: PlayerID,
+ ) -> Result<bool> {
+ Ok(false)
+ }
+}