fix nonsensical pickupitem jobstep constructor

pull/1/head
Bronwen 2023-01-03 02:25:02 -05:00
parent a10f9bf25f
commit 68a4142944
2 changed files with 2 additions and 3 deletions

View File

@ -26,9 +26,8 @@ public class Job extends GameObject {
public class PickupItem extends JobStep {
public Item item;
public Vector2f[] locations;
public PickupItem(Item item, Vector2f[] possibleLocations) {
public PickupItem(Item item) {
this.item = item;
}

View File

@ -80,7 +80,7 @@ public abstract class Item extends WorldObject implements ISelectable, ITileThin
private void markForHaul() {
if(haulJob != null) return;
haulJob = add(new Job("Haul " + this.getName()));
haulJob.addStep(haulJob.new PickupItem(this, new Vector2f[] { this.getWorldPosition() }));
haulJob.addStep(haulJob.new PickupItem(this));
haulJob.addStep(haulJob.new DropoffAtStockpile(this));
haulJob.registerClosedListener(() -> {
haulJob = null;