diff --git a/Farmtronics/Bot/BotObject.cs b/Farmtronics/Bot/BotObject.cs index c1f9831..ee2ef7d 100644 --- a/Farmtronics/Bot/BotObject.cs +++ b/Farmtronics/Bot/BotObject.cs @@ -5,8 +5,6 @@ This class is a stardew valley Object subclass that represents a Bot. using System; using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Threading; using Farmtronics.M1; using Farmtronics.Utils; using Microsoft.Xna.Framework; @@ -165,20 +163,7 @@ public override bool placementAction(GameLocation location, int x, int y, Farmer location.playSound("hammer"); return true; } - - public bool UseBattery() { - if (farmer == null || inventory == null || farmer.CurrentTool == null) - return false; - if (farmer.Items.Any(b => b is not null && b.QualifiedItemId.Equals("(O)787"))) - { - farmer.stamina = Math.Min(Farmer.startingStamina, farmer.stamina + 100); - farmer.removeFirstOfThisItemFromInventory("(O)787"); - return true; - } - return false; - } - // Apply the currently-selected item as a tool (or weapon) on // the square in front of the bot. public void UseTool() { diff --git a/Farmtronics/M1/M1API.cs b/Farmtronics/M1/M1API.cs index 5f0d227..3e1a4fc 100644 --- a/Farmtronics/M1/M1API.cs +++ b/Farmtronics/M1/M1API.cs @@ -720,16 +720,6 @@ public static ValMap MeModule() { return result ? Intrinsic.Result.True : Intrinsic.Result.False; }; meModule["harvest"] = f.GetFunc(); - - f = Intrinsic.Create(""); - f.code = (context, partialResult) => { - Shell sh = context.interpreter.hostData as Shell; - if (RequireBot(sh, "useBattery")) return Intrinsic.Result.Null; - - bool result = sh.bot.UseBattery(); - return result ? Intrinsic.Result.True : Intrinsic.Result.False; - }; - meModule["useBattery"] = f.GetFunc(); botProtectedKeys = new HashSet(); foreach (Value key in meModule.Keys) {