Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into loadingbar-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lemz1 committed May 13, 2024
2 parents 4e935b4 + 34a6e16 commit 54f337f
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 27 deletions.
2 changes: 1 addition & 1 deletion hmm.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"name": "funkin.vis",
"type": "git",
"dir": null,
"ref": "98c9db09f0bbfedfe67a84538a5814aaef80bdea",
"ref": "2aa654b974507ab51ab1724d2d97e75726fd7d78",
"url": "https://github.com/FunkinCrew/funkVis"
},
{
Expand Down
20 changes: 14 additions & 6 deletions source/funkin/play/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2549,12 +2549,20 @@ class PlayState extends MusicBeatSubState
// Redirect to the chart editor playing the current song.
if (controls.DEBUG_CHART)
{
disableKeys = true;
persistentUpdate = false;
FlxG.switchState(() -> new ChartEditorState(
{
targetSongId: currentSong.id,
}));
if (isChartingMode)
{
if (FlxG.sound.music != null) FlxG.sound.music.pause(); // Don't reset song position!
this.close(); // This only works because PlayState is a substate!
}
else
{
disableKeys = true;
persistentUpdate = false;
FlxG.switchState(() -> new ChartEditorState(
{
targetSongId: currentSong.id,
}));
}
}
#end

Expand Down
18 changes: 3 additions & 15 deletions source/funkin/play/event/PlayAnimationSongEvent.hx
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,13 @@ class PlayAnimationSongEvent extends SongEvent

switch (targetName)
{
case 'boyfriend':
case 'boyfriend' | 'bf' | 'player':
trace('Playing animation $anim on boyfriend.');
target = PlayState.instance.currentStage.getBoyfriend();
case 'bf':
trace('Playing animation $anim on boyfriend.');
target = PlayState.instance.currentStage.getBoyfriend();
case 'player':
trace('Playing animation $anim on boyfriend.');
target = PlayState.instance.currentStage.getBoyfriend();
case 'dad':
case 'dad' | 'opponent':
trace('Playing animation $anim on dad.');
target = PlayState.instance.currentStage.getDad();
case 'opponent':
trace('Playing animation $anim on dad.');
target = PlayState.instance.currentStage.getDad();
case 'girlfriend':
trace('Playing animation $anim on girlfriend.');
target = PlayState.instance.currentStage.getGirlfriend();
case 'gf':
case 'girlfriend' | 'gf':
trace('Playing animation $anim on girlfriend.');
target = PlayState.instance.currentStage.getGirlfriend();
default:
Expand Down
2 changes: 2 additions & 0 deletions source/funkin/play/notes/Strumline.hx
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,8 @@ class Strumline extends FlxSpriteGroup
note.holdNoteSprite.hitNote = true;
note.holdNoteSprite.missedNote = false;
note.holdNoteSprite.alpha = 1.0;

note.holdNoteSprite.sustainLength = (note.holdNoteSprite.strumTime + note.holdNoteSprite.fullSustainLength) - conductorInUse.songPosition;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class ChartEditorCharacterIconSelectorMenu extends ChartEditorBaseMenu

var charGrid = new Grid();
charGrid.columns = 5;
charGrid.width = 100;
charGrid.width = this.width;
charSelectScroll.addComponent(charGrid);

var charIds:Array<String> = CharacterDataParser.listCharacterIds();
Expand Down
4 changes: 0 additions & 4 deletions source/funkin/ui/mainmenu/MainMenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,6 @@ class MainMenuState extends MusicBeatState

resetCamStuff();

subStateClosed.add(_ -> {
resetCamStuff();
});

subStateOpened.add(sub -> {
if (Type.getClass(sub) == FreeplayState)
{
Expand Down
1 change: 1 addition & 0 deletions source/funkin/ui/title/TitleState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ class TitleState extends MusicBeatState

if (FlxG.keys.justPressed.Y)
{
FlxTween.cancelTweensOf(FlxG.stage.window, ['x', 'y']);
FlxTween.tween(FlxG.stage.window, {x: FlxG.stage.window.x + 300}, 1.4, {ease: FlxEase.quadInOut, type: PINGPONG, startDelay: 0.35});
FlxTween.tween(FlxG.stage.window, {y: FlxG.stage.window.y + 100}, 0.7, {ease: FlxEase.quadInOut, type: PINGPONG});
}
Expand Down

0 comments on commit 54f337f

Please sign in to comment.