Fix overflowing craters
This commit is contained in:
@@ -55,11 +55,11 @@ public class CraterUnit extends GroundUnit{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(item.amount == 0) return; // update will take care of poofing
|
if(item.amount-- <= 0) return; // update will take care of poofing
|
||||||
|
|
||||||
// try to unload
|
// try to unload
|
||||||
int rot = on().rotation();
|
int rot = on().rotation();
|
||||||
on().block().offloadNear(on(), item().item);
|
on().block().offloadNear(on(), item.item);
|
||||||
on().rotation(rot);
|
on().rotation(rot);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -149,6 +149,7 @@ public class CraterUnit extends GroundUnit{
|
|||||||
if(this.item.amount > 0 && this.item.item != item) return false;
|
if(this.item.amount > 0 && this.item.item != item) return false;
|
||||||
if(this.item.amount >= getItemCapacity()) return false;
|
if(this.item.amount >= getItemCapacity()) return false;
|
||||||
|
|
||||||
|
// return on(Track.start);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user