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
This commit is contained in:
EstoyAburridowGH
2024-02-19 01:45:36 +01:00
committed by GitHub
parent 78e25fbefa
commit 9b914c595b
2 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -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);
@@ -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));