@@ -27,7 +27,7 @@ class DifficultySelectorSubState extends MusicBeatSubstate
2727
2828 var canDo : Bool = false ;
2929 var difficultyStars : DifficultyStars ;
30-
30+ var diffTextnecausetherewasnoimage : FlxText ;
3131 public function new (song : Dynamic )
3232 {
3333 super ();
@@ -48,13 +48,10 @@ class DifficultySelectorSubState extends MusicBeatSubstate
4848 difficultyStars .visible = true ;
4949 difficultyStars .scrollFactor .set ();
5050 difficultyStars .screenCenter ();
51- difficultyStars .y + = 30 ;
51+ difficultyStars .y + = 15 ;
5252 difficultyStars .x + = 25 ;
5353 add (difficultyStars );
5454
55- buildDifficultySprite (' normal' );
56- buildDifficultySprite ();
57-
5855 missingTextBG = new FlxSprite ().makeGraphic (FlxG .width , FlxG .height , FlxColor .BLACK );
5956 missingTextBG .alpha = 0.6 ;
6057 missingTextBG .visible = false ;
@@ -66,13 +63,27 @@ class DifficultySelectorSubState extends MusicBeatSubstate
6663 missingText .visible = false ;
6764 add (missingText );
6865
66+ diffTextnecausetherewasnoimage = new FlxText (50 , 0 , FlxG .width - 100 , ' ' , 24 );
67+ diffTextnecausetherewasnoimage .setFormat (Paths .font (" difficulty.ttf" ), 80 , FlxColor .WHITE , CENTER , FlxTextBorderStyle .OUTLINE , FlxColor .BLACK );
68+ diffTextnecausetherewasnoimage .scrollFactor .set ();
69+ diffTextnecausetherewasnoimage .visible = false ;
70+ add (diffTextnecausetherewasnoimage );
71+
6972 new FlxTimer ().start (0.2 , function (tmr : FlxTimer ) {
7073 canDo = true ;
7174 });
7275
7376 Mods .currentModDirectory = song .folder ;
7477 PlayState .storyWeek = song .week ;
75- Difficulty .loadFromWeek ();
78+ switch (song .songName )
79+ {
80+ case ' Small Argument' | ' Beat Battle 2' :
81+ Difficulty .list = [' Hard' ];
82+ case " Beat Battle" :
83+ Difficulty .list = [" Normal" , " Reasonable" , " Unreasonable" , " Semi-Impossible" , " Impossible" ];
84+ default :
85+ Difficulty .loadFromWeek ();
86+ }
7687 listLength = Difficulty .list .length ;
7788 WeekData .setDirectoryFromWeek ();
7889 changeDiff ();
@@ -152,7 +163,6 @@ class DifficultySelectorSubState extends MusicBeatSubstate
152163 difficulty = listLength - 1 ;
153164
154165 buildDifficultySprite (Difficulty .list [difficulty ].toLowerCase ());
155- sprite .screenCenter ();
156166
157167 // I really don't wanna talk about it
158168 // I hate this so much but it works but I still hate it
@@ -167,18 +177,25 @@ class DifficultySelectorSubState extends MusicBeatSubstate
167177 actualRating .set (thing [0 ], Std .parseInt (thing [1 ]));
168178 }
169179
180+ var curDiff : String = Difficulty .list [difficulty ].toLowerCase ();
170181 if (actualRating != null ) {
171- var curDiff : String = Difficulty .list [difficulty ].toLowerCase ();
172182 setDifficultyStars (actualRating .get (curDiff ));
173- } else {
174- difficultyStars .visible = false ;
175183 }
176184 } catch (e ) {
177185 difficultyStars .visible = false ;
178186 trace (" No Metadata Found!" );
179187 }
180188 }
181189
190+ function setDifficultyText (? diff : String ) {
191+ if (diffTextnecausetherewasnoimage != null ) {
192+ diffTextnecausetherewasnoimage .text = diff .toUpperCase ();
193+ diffTextnecausetherewasnoimage .screenCenter ();
194+ diffTextnecausetherewasnoimage .y + = 2 ;
195+ diffTextnecausetherewasnoimage .visible = true ;
196+ }
197+ }
198+
182199 var difficultySprites : Map <String , FlxSprite >;
183200 function buildDifficultySprite (? diff : String ): Void
184201 {
@@ -201,7 +218,12 @@ class DifficultySelectorSubState extends MusicBeatSubstate
201218 }
202219
203220 difficultySprites .set (diff , sprite );
204- }
221+ }
222+
223+ if (! Paths .exists (Paths .file (' images/menudifficulties/ ${diff }.png' ))) {
224+ sprite .visible = false ;
225+ setDifficultyText (diff );
226+ } else if (diffTextnecausetherewasnoimage != null ) diffTextnecausetherewasnoimage .visible = false ;
205227 sprite .updateHitbox ();
206228 sprite .screenCenter ();
207229 add (sprite );
0 commit comments