Skip to content

Commit

Permalink
Simple small charter fixes (#245)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
EstoyAburridowGH authored Feb 19, 2024
1 parent 78e25fb commit 9b914c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion source/funkin/editors/charter/Charter.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions source/funkin/editors/charter/CharterStrumline.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 9b914c5

Please sign in to comment.