mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-04 22:04:29 +00:00
Merge branch 'rewrite/master' into bugfix/cleanup
This commit is contained in:
commit
dbeb2a1a1e
2
.gitmodules
vendored
2
.gitmodules
vendored
|
@ -2,7 +2,9 @@
|
|||
path = assets
|
||||
url = https://github.com/FunkinCrew/Funkin-history-rewrite-assets
|
||||
branch = master
|
||||
update = merge
|
||||
[submodule "art"]
|
||||
path = art
|
||||
url = https://github.com/FunkinCrew/Funkin-history-rewrite-art
|
||||
branch = master
|
||||
update = merge
|
||||
|
|
|
@ -704,6 +704,8 @@ class PlayState extends MusicBeatSubState
|
|||
|
||||
if (!overrideMusic)
|
||||
{
|
||||
// Stop the vocals if they already exist.
|
||||
if (vocals != null) vocals.stop();
|
||||
vocals = currentChart.buildVocals();
|
||||
|
||||
if (vocals.members.length == 0)
|
||||
|
@ -1558,6 +1560,8 @@ class PlayState extends MusicBeatSubState
|
|||
|
||||
if (!overrideMusic)
|
||||
{
|
||||
// Stop the vocals if they already exist.
|
||||
if (vocals != null) vocals.stop();
|
||||
vocals = currentChart.buildVocals();
|
||||
|
||||
if (vocals.members.length == 0)
|
||||
|
|
|
@ -90,6 +90,7 @@ class FreeplayState extends MusicBeatSubState
|
|||
|
||||
var dj:DJBoyfriend;
|
||||
|
||||
var letterSort:LetterSort;
|
||||
var typing:FlxInputText;
|
||||
var exitMovers:Map<Array<FlxSprite>, MoveData> = new Map();
|
||||
|
||||
|
@ -419,7 +420,7 @@ class FreeplayState extends MusicBeatSubState
|
|||
txtCompletion.visible = false;
|
||||
add(txtCompletion);
|
||||
|
||||
var letterSort:LetterSort = new LetterSort(400, 75);
|
||||
letterSort = new LetterSort(400, 75);
|
||||
add(letterSort);
|
||||
letterSort.visible = false;
|
||||
|
||||
|
@ -959,6 +960,7 @@ class FreeplayState extends MusicBeatSubState
|
|||
trace("RANDOM SELECTED");
|
||||
|
||||
busy = true;
|
||||
letterSort.inputEnabled = false;
|
||||
|
||||
var availableSongCapsules:Array<SongMenuItem> = grpCapsules.members.filter(function(cap:SongMenuItem) {
|
||||
// Dead capsules are ones which were removed from the list when changing filters.
|
||||
|
@ -969,6 +971,15 @@ class FreeplayState extends MusicBeatSubState
|
|||
return cap.songData.songName;
|
||||
})}');
|
||||
|
||||
if (availableSongCapsules.length == 0)
|
||||
{
|
||||
trace("No songs available!");
|
||||
busy = false;
|
||||
letterSort.inputEnabled = true;
|
||||
FlxG.sound.play(Paths.sound('cancelMenu'));
|
||||
return;
|
||||
}
|
||||
|
||||
var targetSong:SongMenuItem = FlxG.random.getObject(availableSongCapsules);
|
||||
|
||||
// Seeing if I can do an animation...
|
||||
|
@ -982,6 +993,7 @@ class FreeplayState extends MusicBeatSubState
|
|||
function capsuleOnConfirmDefault(cap:SongMenuItem):Void
|
||||
{
|
||||
busy = true;
|
||||
letterSort.inputEnabled = false;
|
||||
|
||||
PlayStatePlaylist.isStoryMode = false;
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@ class LetterSort extends FlxTypedSpriteGroup<FlxSprite>
|
|||
var rightArrow:FlxSprite;
|
||||
var grpSeperators:Array<FlxSprite> = [];
|
||||
|
||||
public var inputEnabled:Bool = true;
|
||||
|
||||
public function new(x, y)
|
||||
{
|
||||
super(x, y);
|
||||
|
@ -72,8 +74,11 @@ class LetterSort extends FlxTypedSpriteGroup<FlxSprite>
|
|||
{
|
||||
super.update(elapsed);
|
||||
|
||||
if (FlxG.keys.justPressed.E) changeSelection(1);
|
||||
if (FlxG.keys.justPressed.Q) changeSelection(-1);
|
||||
if (inputEnabled)
|
||||
{
|
||||
if (FlxG.keys.justPressed.E) changeSelection(1);
|
||||
if (FlxG.keys.justPressed.Q) changeSelection(-1);
|
||||
}
|
||||
}
|
||||
|
||||
public function changeSelection(diff:Int = 0)
|
||||
|
|
Loading…
Reference in a new issue