Also for small cooking time

This commit is contained in:
Sn0wStorm
2013-09-01 20:26:19 +02:00
parent c748e0b7b5
commit b09131c2e0
2 changed files with 6 additions and 3 deletions
+3 -3
View File
@@ -79,11 +79,11 @@ public class BRecipe {
// allowed deviation to the recipes cooking-time at the given difficulty
public int allowedTimeDiff(int time) {
if (time < 8) {
time = 8;
}
int allowedTimeDiff = Math.round((float) ((11.0 - difficulty) * (time / 10.0)));
while (allowedTimeDiff >= time) {
allowedTimeDiff -= 1;
}
if (allowedTimeDiff == 0) {
return 1;
}