From 4d489072b7af821345d6394924e6949d7663b706 Mon Sep 17 00:00:00 2001 From: Joalor64 Date: Tue, 18 Jun 2024 21:19:29 -0400 Subject: [PATCH] dun dudududu dun duuuun dun --- Project.xml | 1 + TODO | 6 ++--- source/meta/data/options/OptionsSubState.hx | 6 ++++- source/meta/data/options/SocialCreditState.hx | 2 +- source/meta/state/FreeplayState.hx | 6 ++++- source/meta/state/PlayState.hx | 3 +-- source/objects/Character.hx | 1 - source/objects/userinterface/note/Note.hx | 8 +++++++ .../objects/userinterface/note/StrumNote.hx | 22 ++++++++++++------- 9 files changed, 38 insertions(+), 17 deletions(-) diff --git a/Project.xml b/Project.xml index 5b0e0046..202ff3c8 100644 --- a/Project.xml +++ b/Project.xml @@ -70,6 +70,7 @@ + diff --git a/TODO b/TODO index 236ed75b..758a2046 100644 --- a/TODO +++ b/TODO @@ -4,8 +4,6 @@ [HIGH PRIORITY] - Custom Noteskins/Notesplashes - Move character with mouse in Character Editor -- Psych UI (from v1.0b) -- Main Menu Addons - Extra Notes (for real this time) - Add data for languages - Add sound input to Credits Editor @@ -13,4 +11,6 @@ [LOW PRIORITY] - Fix Modchart Editor - Week 8 (or Weekend 1, whatever) -- New stage code from Psych 0.7 \ No newline at end of file +- New stage code from Psych 0.7 +- Psych UI (from v1.0b) +- Main Menu Addons \ No newline at end of file diff --git a/source/meta/data/options/OptionsSubState.hx b/source/meta/data/options/OptionsSubState.hx index ad472831..34de7159 100644 --- a/source/meta/data/options/OptionsSubState.hx +++ b/source/meta/data/options/OptionsSubState.hx @@ -946,7 +946,11 @@ class NotesSubState extends MusicBeatSubstate } var note:FlxSprite = new FlxSprite(posX, yPos); - note.frames = Paths.getSparrowAtlas('NOTE_assets'); + if(ClientPrefs.noteSkin != null) { + note.frames = Paths.getSparrowAtlas('noteskins/NOTE_assets-${ClientPrefs.noteSkin.toLowerCase()}'); + } else { + note.frames = Paths.getSparrowAtlas('NOTE_assets'); + } var animations:Array = ['purple0', 'blue0', 'green0', 'red0']; note.animation.addByPrefix('idle', animations[i]); note.animation.play('idle'); diff --git a/source/meta/data/options/SocialCreditState.hx b/source/meta/data/options/SocialCreditState.hx index 8a8198f5..b11584f0 100644 --- a/source/meta/data/options/SocialCreditState.hx +++ b/source/meta/data/options/SocialCreditState.hx @@ -2,7 +2,7 @@ package meta.data.options; class SocialCreditState extends MusicBeatState { - public static var socialCredit:Int = 0; + public static var socialCredit:Int = FlxG.save.data.socialCredit; public static var wentDown:Bool = false; public static var wentUp:Bool = false; diff --git a/source/meta/state/FreeplayState.hx b/source/meta/state/FreeplayState.hx index a7ffa55d..a2008d9a 100644 --- a/source/meta/state/FreeplayState.hx +++ b/source/meta/state/FreeplayState.hx @@ -218,7 +218,7 @@ class FreeplayState extends MusicBeatState songSearchText.x = FlxG.width - songSearchText.width; add(songSearchText); - var buttonTop:FlxButton = new FlxButton(0, songSearchText.y + songSearchText.height + 5, "Search", function() { + var buttonTop:FlxButton = new FlxButton(0, songSearchText.y + songSearchText.height + 5, "", function() { checkForSongsThatMatch(songSearchText.text); }); buttonTop.setGraphicSize(Std.int(songSearchText.width), 50); @@ -227,6 +227,10 @@ class FreeplayState extends MusicBeatState buttonTop.x = FlxG.width - buttonTop.width; add(buttonTop); + var searchTxt:FlxText = new FlxText(buttonTop.x, buttonTop.y, 0, "Search", 32); + searchTxt.setFormat(Paths.font("vcr.ttf"), 24, FlxColor.WHITE, CENTER); + add(searchTxt); + uneccessarilyLongVariable = new FlxText(0, 0, 0, "+" + PlayState.gainedCredit + " SOCIAL CREDIT", 12); uneccessarilyLongVariable.setFormat(Paths.font("vcr.ttf"), 48, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); uneccessarilyLongVariable.scrollFactor.set(); diff --git a/source/meta/state/PlayState.hx b/source/meta/state/PlayState.hx index edf02d98..1a6c2641 100644 --- a/source/meta/state/PlayState.hx +++ b/source/meta/state/PlayState.hx @@ -1974,7 +1974,7 @@ class PlayState extends MusicBeatState ArtemisIntegration.setHealthbarFlxColors (dadColor, bfColor); #end - timeBar.setColors(CoolUtil.getColor(dad.healthColorArray), FlxColor.WHITE); + timeBar.setColors(CoolUtil.getColor(dad.healthColorArray), 0xFF404040); } public function addCharacterToList(newCharacter:String, type:Int) { @@ -4824,7 +4824,6 @@ class PlayState extends MusicBeatState gainedCredit = FlxG.random.int(1, 100); FlxG.save.data.socialCredit += gainedCredit; - SocialCreditState.socialCredit = FlxG.save.data.socialCredit; SocialCreditState.wentUp = true; #if sys diff --git a/source/objects/Character.hx b/source/objects/Character.hx index 20d693b8..e2304167 100644 --- a/source/objects/Character.hx +++ b/source/objects/Character.hx @@ -1,6 +1,5 @@ package objects; -import animateatlas.AtlasFrameMaker; import objects.background.*; import objects.shaders.*; diff --git a/source/objects/userinterface/note/Note.hx b/source/objects/userinterface/note/Note.hx index 187e3420..0c2003ef 100644 --- a/source/objects/userinterface/note/Note.hx +++ b/source/objects/userinterface/note/Note.hx @@ -258,6 +258,9 @@ class Note extends FlxSprite if(texture.length < 1) { skin = PlayState.SONG.arrowSkin; if(skin == null || skin.length < 1) { + skin = 'noteskins/NOTE_assets-${ClientPrefs.noteSkin.toLowerCase()}'; + } + if(ClientPrefs.noteSkin == null) { skin = 'NOTE_assets'; } } @@ -276,6 +279,11 @@ class Note extends FlxSprite defaultWidth = 157; defaultHeight = 154; if(PlayState.isPixelStage) { + if (FileSystem.exists(Paths.modFolders('images/pixelUI/$blahblah.png')) && FileSystem.exists(Paths.modFolders('images/pixelUI/' + blahblah + 'ENDS.png'))) { + blahblah = 'noteskins/NOTE_assets-${ClientPrefs.noteSkin.toLowerCase()}'; + } else { + blahblah = 'NOTE_assets'; + } if(isSustainNote) { loadGraphic(Paths.image('pixelUI/' + blahblah + 'ENDS')); width = width / 4; diff --git a/source/objects/userinterface/note/StrumNote.hx b/source/objects/userinterface/note/StrumNote.hx index 1b701618..50634b90 100644 --- a/source/objects/userinterface/note/StrumNote.hx +++ b/source/objects/userinterface/note/StrumNote.hx @@ -32,13 +32,13 @@ class StrumNote extends FlxSprite this.noteData = leData; super(x, y); - var skin:String = 'NOTE_assets'; - if(PlayState.SONG.arrowSkin != null && PlayState.SONG.arrowSkin.length > 1) skin = PlayState.SONG.arrowSkin; - switch (ClientPrefs.noteSkin) { - case 'Chip': skin = 'noteskins/NOTE_assets-chip'; - case 'Future' : skin = 'noteskins/NOTE_assets-future'; - default: skin = 'NOTE_assets'; + var skin:String; + if(ClientPrefs.noteSkin != null) { + skin = 'noteskins/NOTE_assets-${ClientPrefs.noteSkin.toLowerCase()}'; + } else { + skin = "NOTE_assets"; } + if(PlayState.SONG.arrowSkin != null && PlayState.SONG.arrowSkin.length > 1) skin = PlayState.SONG.arrowSkin; shader = colorMask.shader; texture = skin; //Load texture and anims @@ -52,10 +52,16 @@ class StrumNote extends FlxSprite if(PlayState.isPixelStage) { - loadGraphic(Paths.image('pixelUI/' + texture)); + var skin:String = 'NOTE_assets'; + if (FileSystem.exists(Paths.modFolders('images/pixelUI/$texture.png')) && FileSystem.exists(Paths.modFolders('images/pixelUI/' + texture + 'ENDS.png'))) { + skin = 'noteskins/NOTE_assets-${ClientPrefs.noteSkin.toLowerCase()}'; + } else { + skin = 'NOTE_assets'; + } + loadGraphic(Paths.image('pixelUI/' + skin)); width = width / 4; height = height / 5; - loadGraphic(Paths.image('pixelUI/' + texture), true, Math.floor(width), Math.floor(height)); + loadGraphic(Paths.image('pixelUI/' + skin), true, Math.floor(width), Math.floor(height)); antialiasing = false; setGraphicSize(Std.int(width * PlayState.daPixelZoom));