diff options
author | metamuffin <metamuffin@disroot.org> | 2024-09-17 16:57:23 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-09-17 16:57:34 +0200 |
commit | 7cacd111e2b443bac291244b168c20e2c8bf69ec (patch) | |
tree | 277ace5a4e8223df4b156e766c2660406101a82b /server/src/entity/bot.rs | |
parent | 77a73b415888b0285ba64b27c3f69440216e475c (diff) | |
download | hurrycurry-7cacd111e2b443bac291244b168c20e2c8bf69ec.tar hurrycurry-7cacd111e2b443bac291244b168c20e2c8bf69ec.tar.bz2 hurrycurry-7cacd111e2b443bac291244b168c20e2c8bf69ec.tar.zst |
add hint-based tutorial for item crafting
Diffstat (limited to 'server/src/entity/bot.rs')
-rw-r--r-- | server/src/entity/bot.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/src/entity/bot.rs b/server/src/entity/bot.rs index 79ca97f1..6f39fab2 100644 --- a/server/src/entity/bot.rs +++ b/server/src/entity/bot.rs @@ -29,7 +29,7 @@ pub struct BotDriver<T> { join_data: Option<(String, i32)>, id: PlayerID, interacting: bool, - pub left: bool, + left: bool, } impl<T: BotAlgo> BotDriver<T> { @@ -44,6 +44,9 @@ impl<T: BotAlgo> BotDriver<T> { } } impl<T: BotAlgo> Entity for BotDriver<T> { + fn finished(&self) -> bool { + self.left + } fn tick(&mut self, c: EntityContext<'_>) -> Result<()> { if let Some((name, character)) = self.join_data.take() { self.id = PlayerID(random()); // TODO bad code, can collide |