do not write ucf file if fleet has no instances of a given ship
authorAdam Megacz <adam@megacz.com>
Sun, 30 Aug 2009 02:06:56 +0000 (19:06 -0700)
committerAdam Megacz <adam@megacz.com>
Sun, 30 Aug 2009 02:06:56 +0000 (19:06 -0700)
src/edu/berkeley/fleet/fpga/Fpga.java

index ef5a246..6a6734c 100644 (file)
@@ -164,6 +164,7 @@ public class Fpga extends FleetTwoFleet {
     public void expand(ShipDescription sd) {
         try {
             if (sd.getSection("fpga")==null) return;
+            if (getShip(sd.getName(),0)==null) return;  // no ships of this type
             String filename = sd.getName().toLowerCase();
 
             if (sd.getSection("ucf") != null) {