Skip to content

Commit

Permalink
update Automate for the new CrabPot.NeedsBait method
Browse files Browse the repository at this point in the history
  • Loading branch information
Pathoschild committed Nov 3, 2024
1 parent d655dbb commit e9e2186
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions Automate/Framework/Machines/Objects/CrabPotMachine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public override MachineState GetState()
{
MachineState state = this.GetGenericState();

if (state == MachineState.Empty && (this.Machine.bait.Value != null || !this.PlayerNeedsBait(this.GetOwner())))
if (state == MachineState.Empty && !this.Machine.NeedsBait(null))
state = MachineState.Processing;

return state;
Expand Down Expand Up @@ -135,11 +135,4 @@ private void Reset(Item item)
pot.shake = Vector2.Zero;
pot.shakeTimer = 0f;
}

/// <summary>Get whether the current player needs to bait crab pots.</summary>
/// <param name="owner">The player who owns the machine.</param>
private bool PlayerNeedsBait(Farmer owner)
{
return !owner.professions.Contains(Farmer.mariner); // no bait needed if luremaster
}
}

0 comments on commit e9e2186

Please sign in to comment.