Skip to content

Commit f59878a

Browse files
authored
Merge pull request #98 from Eureka-dot-net/bugfix/fix-machine-output-reset
Fixed bug where machine output isn't reset when taking item from machine
2 parents 7863887 + c985f4c commit f59878a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Farmtronics/Bot/BotObject.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ This class is a stardew valley Object subclass that represents a Bot.
1212
using StardewModdingAPI;
1313
using StardewValley;
1414
using StardewValley.GameData.Crops;
15+
using StardewValley.GameData.Machines;
1516
using StardewValley.GameData.Objects;
1617
using StardewValley.Menus;
1718
using StardewValley.Objects;
@@ -382,8 +383,12 @@ public bool doBotHarvestFromObject(StardewValley.Object what) {
382383
what.MinutesUntilReady = Utility.CalculateMinutesUntilMorning(Game1.timeOfDay, 1);
383384
}
384385
if (check_for_reload) {
386+
385387
what.AttemptAutoLoad(who);
386388
}
389+
MachineData? machineData = what.GetMachineData();
390+
if (machineData != null && MachineDataUtility.TryGetMachineOutputRule(what, machineData, MachineOutputTrigger.OutputCollected, what.getOne(), null, what.Location, out MachineOutputRule outputCollectedRule, out _, out _, out _))
391+
what.OutputMachine(machineData, outputCollectedRule, what.lastInputItem.Value, null, what.Location, false);
387392
return true;
388393

389394
} else {

0 commit comments

Comments
 (0)