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
+1
View File
@@ -683,6 +683,7 @@ stat.drillspeed = Base Drill Speed
stat.boosteffect = Boost Effect stat.boosteffect = Boost Effect
stat.maxunits = Max Active Units stat.maxunits = Max Active Units
stat.health = Health stat.health = Health
stat.armor = Armor
stat.buildtime = Build Time stat.buildtime = Build Time
stat.maxconsecutive = Max Consecutive stat.maxconsecutive = Max Consecutive
stat.buildcost = Build Cost stat.buildcost = Build Cost
+1
View File
@@ -225,6 +225,7 @@ public class UnitType extends UnlockableContent{
Unit inst = constructor.get(); Unit inst = constructor.get();
stats.add(Stat.health, health); stats.add(Stat.health, health);
stats.add(Stat.armor, armor);
stats.add(Stat.speed, speed); stats.add(Stat.speed, speed);
stats.add(Stat.itemCapacity, itemCapacity); stats.add(Stat.itemCapacity, itemCapacity);
stats.add(Stat.range, (int)(maxRange / tilesize), StatUnit.blocks); stats.add(Stat.range, (int)(maxRange / tilesize), StatUnit.blocks);
@@ -100,6 +100,7 @@ public class UnitFactory extends UnitBlock{
if(plan.unit.unlockedNow()){ if(plan.unit.unlockedNow()){
table.image(plan.unit.icon(Cicon.small)).size(8 * 3).padRight(2).right(); table.image(plan.unit.icon(Cicon.small)).size(8 * 3).padRight(2).right();
table.add(plan.unit.localizedName).left(); 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(); table.row();
} }
} }
+1
View File
@@ -7,6 +7,7 @@ import java.util.*;
/** Describes one type of stat for content. */ /** Describes one type of stat for content. */
public enum Stat{ public enum Stat{
health, health,
armor,
size, size,
displaySize, displaySize,
buildTime, buildTime,