Set flag based on year for Germany, which AFAIK is the only country we have whose flag changes without changing names.

Still imperfect, e.g. Russian cities won't change name or flag under the USSR yet.
M src/main/java/com/ajtjp/gearCity/CityInfoFile/City.java +26 -13
@@ 60,7 60,7 @@ public class City {
         //alignment is always the empty string
         this.gOVERN = new GOVERN(1);
         this.tAX = new TAX(1.3);
-        setFlag(city.getCountry().getName());
+        setFlag(city.getCountry().getName(), xmlYear);
         this.pIC = new PIC("Generic.dds");
         if (city.getPicture() != null) {
             this.pIC = new PIC(city.getPicture() + ".dds");

          
@@ 103,18 103,31 @@ public class City {
         this.bUYRATE = "1";
     }
 
-    public void setFlag(String countryName) {
-        if (countryName.equals("United Kingdom")) {
-            this.fLAG = new FLAG("UK.dds");
-        }
-        else if (countryName.equals("Ottoman Empire")) {
-            this.fLAG = new FLAG("Ottoman.dds");
-        }
-        else if (countryName.equals("Austria-Hungary")) {
-            this.fLAG = new FLAG("Austria_Hungry.dds"); //misspelled in the base game
-        }
-        else {
-            this.fLAG = new FLAG(countryName + ".dds");
+    public void setFlag(String countryName, int year) {
+        switch (countryName) {
+            case "United Kingdom":
+                this.fLAG = new FLAG("UK.dds");
+                break;
+            case "Ottoman Empire":
+                this.fLAG = new FLAG("Ottoman.dds");
+                break;
+            case "Austria-Hungary":
+                this.fLAG = new FLAG("Austria_Hungry.dds"); //misspelled in the base game
+                break;
+            case "Germany":
+                if (year <= 1918) {
+                    this.fLAG = new FLAG("GermanEmpire.dds");
+                }
+                else if (year >= 1933 && year <= 1945) {
+                    this.fLAG = new FLAG("3rdGerman.dds");
+                }
+                else {
+                    //Same flag for both Wiemar and modern periods
+                    this.fLAG = new FLAG("Germany.dds");
+                }   break;
+            default:
+                this.fLAG = new FLAG(countryName + ".dds");
+                break;
         }
     }
 

          
M src/main/java/com/ajtjp/gearCity/Main.java +1 -1
@@ 129,7 129,7 @@ cityDBLoop: for (CityDB city : cities) {
                         }
                         else if (!city.getCountry().getName().equals(xml.getCOUNTRY().getNation())) {
                             xml.setCOUNTRY(new COUNTRY(city.getCountry().getName()));
-                            xml.setFlag(city.getCountry().getName());
+                            xml.setFlag(city.getCountry().getName(), year);
                         }
                         continue cityDBLoop;
                     }