M src/main/java/DBObjects/CityDB.java +1 -1
@@ 33,7 33,7 @@ public class CityDB {
private String picture;
- private Map<Integer, Integer> populationByYear = new HashMap<>();
+ public Map<Integer, Integer> populationByYear = new HashMap<>();
private Map<Integer, Double> percentOfRegionalPopByYear = new HashMap<>();
private DecimalFormat percentFormat = new DecimalFormat("0.00");
M src/main/java/com/ajtjp/gearCity/Main.java +9 -0
@@ 15,10 15,12 @@ import com.ajtjp.gearCity.CityInfoFile.N
import com.ajtjp.gearCity.CityInfoFile.POPULATION;
import com.ajtjp.gearCity.CityInfoFile.BeanToXMLUtil;
import com.ajtjp.gearCity.CityInfoFile.City;
+import com.ajtjp.gearCity.CityInfoFile.ECOGROWTH;
import com.ajtjp.gearCity.CityInfoFile.INF;
import com.ajtjp.gearCity.CityInfoFile.MANUGROWTH;
import com.ajtjp.gearCity.CityInfoFile.MNFBASE;
import com.ajtjp.gearCity.CityInfoFile.PIC;
+import com.ajtjp.gearCity.CityInfoFile.POPGROWTH;
import com.ajtjp.gearCity.CityInfoFile.SKILL;
import com.ajtjp.gearCity.CityInfoFile.XMLToBeanObjUtil;
import java.io.File;
@@ 346,6 348,13 @@ cityDBLoop: for (CityDB city : cities) {
// }
}
}
+ //Nerf the ones that aren't in the DB so they don't become dominant by growing at 1900s rates forever
+ for (City cityXML : cityDB.getCityList()) {
+ if (CityDB.cities.get(cityXML.getNAME().getName()).populationByYear.size() == 0) {
+ cityXML.setECOGROWTH(new ECOGROWTH(1.001));
+ cityXML.setPOPGROWTH(new POPGROWTH(1.001));
+ }
+ }
}
static void AddRegionalCities(RegionDB region, Set<String> citiesAlreadyExisting, CreateCityDB cityDB) {