Fracture impl

This commit is contained in:
Anuken
2021-12-08 20:19:46 -05:00
parent acb4593390
commit 36dc0e9e3e
7 changed files with 59 additions and 26 deletions

View File

@@ -3,7 +3,6 @@ package mindustry.ui.dialogs;
import arc.*;
import arc.func.*;
import arc.graphics.*;
import arc.math.*;
import arc.scene.style.*;
import arc.scene.ui.*;
import arc.scene.ui.ImageButton.*;
@@ -411,19 +410,6 @@ public class CustomRulesDialog extends BaseDialog{
add.show();
}).width(170f);
//reset cooldown to random number
dialog.hidden(() -> {
float sum = 0;
Seq<WeatherEntry> sh = rules.weather.copy();
sh.shuffle();
for(WeatherEntry w : sh){
//add the previous cooldowns to the sum so weather events are staggered and don't happen all at once.
w.cooldown = sum + Mathf.random(w.minFrequency, w.maxFrequency);
sum += w.cooldown;
}
});
dialog.show();
}
}