Fixed unit stats bars not being interpolated
This commit is contained in:
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user