@@ -227,6 +227,88 @@ class APItemsViewerState extends MusicBeatState {
227227 yPos + = 22 ;
228228 }
229229
230+ yPos + = 30 ;
231+
232+ // Sanity Items Section (if sanity system is active)
233+ if (gameState != null && Lambda .count (gameState .unlockedSanityItems ) > 0 ) {
234+ var sanityTitle = new FlxText (50 , yPos , FlxG .width - 100 , " === UNLOCKED SANITY ITEMS ===" , 24 );
235+ sanityTitle .setFormat (Paths .font (" vcr.ttf" ), 24 , FlxColor .MAGENTA , LEFT , FlxTextBorderStyle .OUTLINE , FlxColor .BLACK );
236+ sanityTitle .borderSize = 1 ;
237+ itemsGroup .add (sanityTitle );
238+ yPos + = 40 ;
239+
240+ // Get sanity settings to check what types to show
241+ var sanitySettings = gameState .sanitySettings ;
242+ var showCharacters = sanitySettings .sanity_types .contains (" characters" );
243+ var showStages = sanitySettings .sanity_types .contains (" stages" );
244+
245+ var sanityItemCount = 0 ;
246+
247+ // Show unlocked characters
248+ if (showCharacters ) {
249+ var characterItems : Array <String > = [];
250+ for (itemName => itemData in gameState .unlockedSanityItems ) {
251+ if (itemData .type == " Character" ) {
252+ characterItems .push (itemName );
253+ }
254+ }
255+
256+ if (characterItems .length > 0 ) {
257+ var charactersHeader = new FlxText (70 , yPos , FlxG .width - 140 , " Characters:" , 18 );
258+ charactersHeader .setFormat (Paths .font (" vcr.ttf" ), 18 , FlxColor .CYAN , LEFT , FlxTextBorderStyle .OUTLINE , FlxColor .BLACK );
259+ charactersHeader .borderSize = 1 ;
260+ itemsGroup .add (charactersHeader );
261+ yPos + = 25 ;
262+
263+ for (characterItem in characterItems ) {
264+ var characterText = new FlxText (90 , yPos , FlxG .width - 160 , " • " + characterItem , 16 );
265+ characterText .setFormat (Paths .font (" vcr.ttf" ), 16 , FlxColor .LIME , LEFT , FlxTextBorderStyle .OUTLINE , FlxColor .BLACK );
266+ characterText .borderSize = 1 ;
267+ itemsGroup .add (characterText );
268+ yPos + = 20 ;
269+ sanityItemCount ++ ;
270+ }
271+ yPos + = 10 ;
272+ }
273+ }
274+
275+ // Show unlocked stages
276+ if (showStages ) {
277+ var stageItems : Array <String > = [];
278+ for (itemName => itemData in gameState .unlockedSanityItems ) {
279+ if (itemData .type == " Stage" ) {
280+ stageItems .push (itemName );
281+ }
282+ }
283+
284+ if (stageItems .length > 0 ) {
285+ var stagesHeader = new FlxText (70 , yPos , FlxG .width - 140 , " Stages:" , 18 );
286+ stagesHeader .setFormat (Paths .font (" vcr.ttf" ), 18 , FlxColor .CYAN , LEFT , FlxTextBorderStyle .OUTLINE , FlxColor .BLACK );
287+ stagesHeader .borderSize = 1 ;
288+ itemsGroup .add (stagesHeader );
289+ yPos + = 25 ;
290+
291+ for (stageItem in stageItems ) {
292+ var stageText = new FlxText (90 , yPos , FlxG .width - 160 , " • " + stageItem , 16 );
293+ stageText .setFormat (Paths .font (" vcr.ttf" ), 16 , FlxColor .LIME , LEFT , FlxTextBorderStyle .OUTLINE , FlxColor .BLACK );
294+ stageText .borderSize = 1 ;
295+ itemsGroup .add (stageText );
296+ yPos + = 20 ;
297+ sanityItemCount ++ ;
298+ }
299+ yPos + = 10 ;
300+ }
301+ }
302+
303+ if (sanityItemCount == 0 ) {
304+ var noSanityText = new FlxText (70 , yPos , FlxG .width - 140 , " No sanity items unlocked yet" , 16 );
305+ noSanityText .setFormat (Paths .font (" vcr.ttf" ), 16 , FlxColor .GRAY , LEFT , FlxTextBorderStyle .OUTLINE , FlxColor .BLACK );
306+ noSanityText .borderSize = 1 ;
307+ itemsGroup .add (noSanityText );
308+ yPos + = 22 ;
309+ }
310+ }
311+
230312 // Calculate max scroll offset
231313 maxScrollOffset = Math .max (0 , yPos - (FlxG .height - 100 ));
232314
0 commit comments