Added more unit stats to database

This commit is contained in:
Anuken
2021-02-08 09:42:49 -05:00
parent 2edec90dfb
commit 560914bebe
4 changed files with 4 additions and 0 deletions

View File

@@ -225,6 +225,7 @@ public class UnitType extends UnlockableContent{
Unit inst = constructor.get();
stats.add(Stat.health, health);
stats.add(Stat.armor, armor);
stats.add(Stat.speed, speed);
stats.add(Stat.itemCapacity, itemCapacity);
stats.add(Stat.range, (int)(maxRange / tilesize), StatUnit.blocks);

View File

@@ -100,6 +100,7 @@ public class UnitFactory extends UnitBlock{
if(plan.unit.unlockedNow()){
table.image(plan.unit.icon(Cicon.small)).size(8 * 3).padRight(2).right();
table.add(plan.unit.localizedName).left();
table.add(Strings.autoFixed(plan.time / 60f, 1) + " " + Core.bundle.get("unit.seconds")).color(Color.lightGray).padLeft(12).left();
table.row();
}
}

View File

@@ -7,6 +7,7 @@ import java.util.*;
/** Describes one type of stat for content. */
public enum Stat{
health,
armor,
size,
displaySize,
buildTime,