Add default Climates per weather

This commit is contained in:
AnimeGitB
2022-06-22 21:57:41 +09:30
parent 4df068bba0
commit dcd3c696ea
11 changed files with 125 additions and 61 deletions

View File

@@ -32,7 +32,11 @@ public enum ClimateType {
}
public int getValue() {
return value;
return this.value;
}
public String getShortName() {
return this.name().substring(8).toLowerCase();
}
public static ClimateType getTypeByValue(int value) {
@@ -42,4 +46,9 @@ public enum ClimateType {
public static ClimateType getTypeByName(String name) {
return stringMap.getOrDefault(name, CLIMATE_NONE);
}
public static ClimateType getTypeByShortName(String shortName) {
String name = "CLIMATE_" + shortName.toUpperCase();
return stringMap.getOrDefault(name, CLIMATE_NONE);
}
}