fix nonsensical pickupitem jobstep constructor
parent
a10f9bf25f
commit
68a4142944
|
|
@ -26,9 +26,8 @@ public class Job extends GameObject {
|
||||||
|
|
||||||
public class PickupItem extends JobStep {
|
public class PickupItem extends JobStep {
|
||||||
public Item item;
|
public Item item;
|
||||||
public Vector2f[] locations;
|
|
||||||
|
|
||||||
public PickupItem(Item item, Vector2f[] possibleLocations) {
|
public PickupItem(Item item) {
|
||||||
this.item = item;
|
this.item = item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ public abstract class Item extends WorldObject implements ISelectable, ITileThin
|
||||||
private void markForHaul() {
|
private void markForHaul() {
|
||||||
if(haulJob != null) return;
|
if(haulJob != null) return;
|
||||||
haulJob = add(new Job("Haul " + this.getName()));
|
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.addStep(haulJob.new DropoffAtStockpile(this));
|
||||||
haulJob.registerClosedListener(() -> {
|
haulJob.registerClosedListener(() -> {
|
||||||
haulJob = null;
|
haulJob = null;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue