aboutsummaryrefslogtreecommitdiff
path: root/server/bot/src/algos/customer.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-09-27 00:02:22 +0200
committermetamuffin <metamuffin@disroot.org>2024-09-27 00:02:30 +0200
commit938551ca5ea0aa9c606443f8f45e9907639b8f6e (patch)
treeb2a7165fa29159c3491673d8cb9211ed8728f1f2 /server/bot/src/algos/customer.rs
parentb4143bf35dce7b7826a44022c7116eb042c9a68e (diff)
downloadhurrycurry-938551ca5ea0aa9c606443f8f45e9907639b8f6e.tar
hurrycurry-938551ca5ea0aa9c606443f8f45e9907639b8f6e.tar.bz2
hurrycurry-938551ca5ea0aa9c606443f8f45e9907639b8f6e.tar.zst
unknown orders
Diffstat (limited to 'server/bot/src/algos/customer.rs')
-rw-r--r--server/bot/src/algos/customer.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/bot/src/algos/customer.rs b/server/bot/src/algos/customer.rs
index bab82056..b3b029c3 100644
--- a/server/bot/src/algos/customer.rs
+++ b/server/bot/src/algos/customer.rs
@@ -124,9 +124,13 @@ impl BotAlgo for Customer {
check: 0,
pinned: false,
};
+ let unknown_item = game
+ .data
+ .get_item_by_name("unknown-order")
+ .unwrap_or(game.data.demands[demand.0].input);
BotInput {
extra: vec![PacketS::Communicate {
- message: Some(Message::Item(game.data.demands[demand.0].input)),
+ message: Some(Message::Item(unknown_item)),
timeout: Some(timeout),
player: me,
pin: Some(false),