1
0
Fork 0
mirror of https://gitlab.com/echtnurich/windozexp-enhanced.git synced 2024-11-21 15:29:15 +01:00

add random frezeing

This commit is contained in:
echtnurich 2023-12-02 20:25:56 +01:00
parent 75fd7532b2
commit 6f14222e1b

View file

@ -11,6 +11,8 @@ if ( Plymouth.GetMode () == "boot" )
logo.sprite.SetZ (10000);
logo.sprite.SetOpacity (1);
progress = 0;
freezecounter = 0;
progress_box.image = Image("throbber-038.png");
@ -40,10 +42,19 @@ fun refresh ()
mode = Plymouth.GetMode ();
if (status == "normal" && mode == "boot" )
{
progress++;
if (progress >= 89)
if (freezecounter == 0) {
progress++;
}
else {
freezecounter--;
}
if (progress >= 89) {
progress = 0;
}
if (Math.Random() > 0.95) {
freezecounter = Math.Random()*10*50
}
new_progress_box.image = Image("throbber-0" + progress/2 + ".png");
progress_box.sprite.SetImage(new_progress_box.image);