Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add temperature and humidity values to biome #8

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
33 changes: 33 additions & 0 deletions src/main/java/org/terasology/core/world/CoreBiome.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,37 @@ public String toString() {
return this.displayName;
}

@Override
public float getHumidity() {
if (displayName.equals("Ocean") || displayName.equals("Snow")) {
RatMoleRat marked this conversation as resolved.
Show resolved Hide resolved
return .9f;
} else if (displayName.equals("Beach")) {
return .8f;
} else if (displayName.equals("Forest")) {
return .7f;
} else if (displayName.equals("Plains")) {
return .55f;
} else if (displayName.equals("Mountains")) {
return .3f;
} else if (displayName.equals("Desert")) {
return .15f;
} else {
return .3f;
}
}

@Override
public float getTemperature() {
if (displayName.equals("Ocean") || displayName.equals("Snow")) {
return .13f;
} else if (displayName.equals("Beach")) {
return .28f;
} else if (displayName.equals("Mountains")) {
return .09f;
} else if (displayName.equals("Desert")) {
return .27f;
} else {
return .22f;
}
}
}