From 9b914c595b785474c7c89aa0c0dd45aff25fa9c8 Mon Sep 17 00:00:00 2001 From: EstoyAburridowGH <81833766+EstoyAburridowGH@users.noreply.github.com> Date: Sun, 18 Feb 2024 19:45:36 -0500 Subject: [PATCH] Simple small charter fixes (#245) * Simple charter "needsVoices" fix * Another simple fix for the charter icons The charter did not detect icons that did not have the same name as the character --- source/funkin/editors/charter/Charter.hx | 5 ++++- source/funkin/editors/charter/CharterStrumline.hx | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index d08937e5..aa216ecc 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -475,7 +475,10 @@ class Charter extends UIState { noteTypes = PlayState.SONG.noteTypes; FlxG.sound.setMusic(FlxG.sound.load(Paths.inst(__song, __diff))); - vocals = FlxG.sound.load(Paths.voices(__song, __diff)); + if (PlayState.SONG.meta.needsVoices != false) // null or true + vocals = FlxG.sound.load(Paths.voices(__song, __diff)); + else + vocals = new FlxSound(); vocals.group = FlxG.sound.defaultMusicGroup; gridBackdrops.createGrids(PlayState.SONG.strumLines.length); diff --git a/source/funkin/editors/charter/CharterStrumline.hx b/source/funkin/editors/charter/CharterStrumline.hx index b78bb5ae..185e4a04 100644 --- a/source/funkin/editors/charter/CharterStrumline.hx +++ b/source/funkin/editors/charter/CharterStrumline.hx @@ -38,7 +38,7 @@ class CharterStrumline extends UISprite { healthIcons = new FlxSpriteGroup(x, y); for (i=>icon in icons) { - var healthIcon = new HealthIcon(icon); + var healthIcon = new HealthIcon(Character.getIconFromCharName(icon)); healthIcon.scale.x = healthIcon.scale.y = 0.6 - (icons.length / 20); healthIcon.updateHitbox(); healthIcon.x = FlxMath.lerp(0, icons.length * 20, (icons.length-1 != 0 ? i / (icons.length-1) : 0)); @@ -93,7 +93,7 @@ class CharterStrumline extends UISprite { healthIcons.clear(); for (i=>icon in icons) { - var healthIcon = new HealthIcon(icon); + var healthIcon = new HealthIcon(Character.getIconFromCharName(icon)); healthIcon.scale.x = healthIcon.scale.y = 0.6 - (icons.length / 20); healthIcon.updateHitbox(); healthIcon.x = FlxMath.lerp(0, icons.length * 20, (icons.length-1 != 0 ? i / (icons.length-1) : 0));