From 878d39668cddd2900c5cfc2cf6f5edecb30e126a Mon Sep 17 00:00:00 2001 From: Jeff Date: Wed, 10 Jul 2024 22:51:39 -0400 Subject: [PATCH] Remove cost notification --- config/config.toml | 2 -- src/bot.rs | 19 ------------------- 2 files changed, 21 deletions(-) diff --git a/config/config.toml b/config/config.toml index 25e4939..3d5ca41 100644 --- a/config/config.toml +++ b/config/config.toml @@ -5,9 +5,7 @@ orientation = "West" "food.cheese" = 50 [sell_prices] - # Armor - "armor.misc.neck.carcanet_of_wrath" = 20_000 ## Boreal Armor diff --git a/src/bot.rs b/src/bot.rs index 97752cb..b03d7e3 100644 --- a/src/bot.rs +++ b/src/bot.rs @@ -36,7 +36,6 @@ pub struct Bot { last_action: Instant, last_announcement: Instant, last_ouch: Instant, - last_cost_difference: i32, } impl Bot { @@ -98,7 +97,6 @@ impl Bot { last_action: now, last_announcement: now, last_ouch: now, - last_cost_difference: 0, }) } @@ -398,7 +396,6 @@ impl Bot { // Accept self.client .perform_trade_action(TradeAction::Accept(trade.phase)); - // If they are offering more } else if difference.is_positive() { // If they are offering coins @@ -439,22 +436,6 @@ impl Bot { } } - if difference != self.last_cost_difference { - let their_name = self - .find_name(&trade.parties[their_offer_index]) - .ok_or("Failed to find player name")? - .to_string(); - - log::debug!("Sending cost to {their_name}"); - - self.client.send_command( - "tell".to_string(), - vec![their_name, format!("My offer: {my_offered_items_value}. Your offer: {their_offered_items_value}.")], - ); - } - - self.last_cost_difference = difference; - Ok(()) }