From f52fe3052eda15f276eae1d525183e031399fb8a Mon Sep 17 00:00:00 2001 From: Patrick 'Quezler' Mounier Date: Mon, 30 Dec 2019 13:14:00 +0100 Subject: [PATCH] Fix overflowing craters --- core/src/mindustry/entities/type/base/CraterUnit.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/entities/type/base/CraterUnit.java b/core/src/mindustry/entities/type/base/CraterUnit.java index 9d8c91da19..19dc2f1f75 100644 --- a/core/src/mindustry/entities/type/base/CraterUnit.java +++ b/core/src/mindustry/entities/type/base/CraterUnit.java @@ -55,11 +55,11 @@ public class CraterUnit extends GroundUnit{ 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 int rot = on().rotation(); - on().block().offloadNear(on(), item().item); + on().block().offloadNear(on(), item.item); 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 >= getItemCapacity()) return false; +// return on(Track.start); return true; }