Fixed unit stats bars not being interpolated

This commit is contained in:
Anuken
2018-06-22 15:48:38 -04:00
parent fc058476ed
commit 57d5628750
5 changed files with 17 additions and 12 deletions
@@ -281,6 +281,10 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ
}
}
public float getAmmoFraction(){
return inventory.totalAmmo() / (float)inventory.ammoCapacity();
}
public void drawUnder(){}
public void drawOver(){}
@@ -168,6 +168,11 @@ public class Drone extends FlyingUnit implements BuilderTrait {
return isBuilding() ? placeDistance*2f : 30f;
}
@Override
public float getAmmoFraction() {
return inventory.getItem().amount / (float)type.itemCapacity;
}
protected void findItem(){
TileEntity entity = getClosestCore();
if(entity == null){