Skip to content

Commit 80bd324

Browse files
committed
Revert "[Enhancement] Addresses recharging bots with batteries: issue JoeStrout#25"
This reverts commit 17d15e0.
1 parent ea72b7f commit 80bd324

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

Farmtronics/Bot/BotObject.cs

-15
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ This class is a stardew valley Object subclass that represents a Bot.
55
using System;
66
using System.Collections.Generic;
77
using System.IO;
8-
using System.Linq;
9-
using System.Threading;
108
using Farmtronics.M1;
119
using Farmtronics.Utils;
1210
using Microsoft.Xna.Framework;
@@ -165,20 +163,7 @@ public override bool placementAction(GameLocation location, int x, int y, Farmer
165163
location.playSound("hammer");
166164
return true;
167165
}
168-
169-
public bool UseBattery() {
170-
if (farmer == null || inventory == null || farmer.CurrentTool == null)
171-
return false;
172166

173-
if (farmer.Items.Any(b => b is not null && b.QualifiedItemId.Equals("(O)787")))
174-
{
175-
farmer.stamina = Math.Min(Farmer.startingStamina, farmer.stamina + 100);
176-
farmer.removeFirstOfThisItemFromInventory("(O)787");
177-
return true;
178-
}
179-
return false;
180-
}
181-
182167
// Apply the currently-selected item as a tool (or weapon) on
183168
// the square in front of the bot.
184169
public void UseTool() {

Farmtronics/M1/M1API.cs

-10
Original file line numberDiff line numberDiff line change
@@ -720,16 +720,6 @@ public static ValMap MeModule() {
720720
return result ? Intrinsic.Result.True : Intrinsic.Result.False;
721721
};
722722
meModule["harvest"] = f.GetFunc();
723-
724-
f = Intrinsic.Create("");
725-
f.code = (context, partialResult) => {
726-
Shell sh = context.interpreter.hostData as Shell;
727-
if (RequireBot(sh, "useBattery")) return Intrinsic.Result.Null;
728-
729-
bool result = sh.bot.UseBattery();
730-
return result ? Intrinsic.Result.True : Intrinsic.Result.False;
731-
};
732-
meModule["useBattery"] = f.GetFunc();
733723

734724
botProtectedKeys = new HashSet<string>();
735725
foreach (Value key in meModule.Keys) {

0 commit comments

Comments
 (0)