Nightmare difficulty sprites + a options change (#219)

* Made song variations array optional (defaulting to empty)

* Add support for animated difficulties in Freeplay menu

* Disable funny music thing; disable flashing nightmare graphic when turned off

* Update assets folder

* assets update

---------

Co-authored-by: Cameron Taylor <cameron.taylor.ninja@gmail.com>
This commit is contained in:
Eric 2023-11-20 11:12:50 -05:00 committed by GitHub
parent 4406677be7
commit 421358e069
6 changed files with 20 additions and 4 deletions

2
assets

@ -1 +1 @@
Subproject commit 62ae1154ba7d751c96cea208c8f2e2d841a4f1c6
Subproject commit c3ce920f162ad53cb510557b3bc69ab9805f48d7

View file

@ -281,6 +281,8 @@ class SongPlayData
/**
* The variations this song has. The associated metadata files should exist.
*/
@:default([])
@:optional
public var songVariations:Array<String>;
/**

View file

@ -81,6 +81,8 @@ class SongPlayData_v2_0_0
// ==========
// UNMODIFIED VALUES
// ==========
@:default([])
@:optional
public var songVariations:Array<String>;
public var difficulties:Array<String>;

View file

@ -91,6 +91,8 @@ class SongPlayData_v2_1_0
// ==========
// UNMODIFIED VALUES
// ==========
@:default([])
@:optional
public var songVariations:Array<String>;
public var difficulties:Array<String>;
public var characters:SongData.SongCharacterData;

View file

@ -1206,6 +1206,15 @@ class DifficultySprite extends FlxSprite
difficultyId = diffId;
loadGraphic(Paths.image('freeplay/freeplay' + diffId));
if (Assets.exists(Paths.file('images/freeplay/freeplay${diffId}.xml')))
{
this.frames = Paths.getSparrowAtlas('freeplay/freeplay${diffId}');
this.animation.addByPrefix('idle', 'idle0', 24, true);
if (Preferences.flashingLights) this.animation.play('idle');
}
else
{
this.loadGraphic(Paths.image('freeplay/freeplay' + diffId));
}
}
}

View file

@ -265,7 +265,7 @@ class StoryMenuState extends MusicBeatState
{
difficultySprite.frames = Paths.getSparrowAtlas('storymenu/difficulties/${diff}');
difficultySprite.animation.addByPrefix('idle', 'idle0', 24, true);
difficultySprite.animation.play('idle');
if (Preferences.flashingLights) difficultySprite.animation.play('idle');
}
else
{
@ -484,7 +484,8 @@ class StoryMenuState extends MusicBeatState
if (hasChanged)
{
buildDifficultySprite();
funnyMusicThing();
// Disable the funny music thing for now.
// funnyMusicThing();
}
}