mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2025-02-16 20:01:49 -05:00
Merge branch 'rewrite/master' of github.com:FunkinCrew/Funkin-secret into bugfix/precache-library-assets
This commit is contained in:
commit
1a224423f9
6 changed files with 29 additions and 20 deletions
2
assets
2
assets
|
@ -1 +1 @@
|
|||
Subproject commit 7e37fd971006140db30aa7b4746f4b94f2e5a613
|
||||
Subproject commit f070c4a08fd634dfeb0bdf1fd03579614441722c
|
|
@ -378,12 +378,12 @@ class CharacterDataParser
|
|||
}
|
||||
|
||||
/**
|
||||
* The default time the character should sing for, in beats.
|
||||
* The default time the character should sing for, in steps.
|
||||
* Values that are too low will cause the character to stop singing between notes.
|
||||
* Originally, this value was set to 1, but it was changed to 2 because that became
|
||||
* too low after some other code changes.
|
||||
* Values that are too high will cause the character to hold their singing pose for too long after they're done.
|
||||
* @default `8 steps`
|
||||
*/
|
||||
static final DEFAULT_SINGTIME:Float = 2.0;
|
||||
static final DEFAULT_SINGTIME:Float = 8.0;
|
||||
|
||||
static final DEFAULT_DANCEEVERY:Int = 1;
|
||||
static final DEFAULT_FLIPX:Bool = false;
|
||||
|
|
|
@ -167,10 +167,7 @@ class Bopper extends StageProp implements IPlayStateScriptedClass
|
|||
|
||||
function update_shouldAlternate():Void
|
||||
{
|
||||
if (hasAnimation('danceLeft'))
|
||||
{
|
||||
this.shouldAlternate = true;
|
||||
}
|
||||
this.shouldAlternate = hasAnimation('danceLeft');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -228,10 +225,11 @@ class Bopper extends StageProp implements IPlayStateScriptedClass
|
|||
|
||||
/**
|
||||
* Ensure that a given animation exists before playing it.
|
||||
* Will gracefully check for name, then name with stripped suffixes, then 'idle', then fail to play.
|
||||
* @param name
|
||||
* Will gracefully check for name, then name with stripped suffixes, then fail to play.
|
||||
* @param name The animation name to attempt to correct.
|
||||
* @param fallback Instead of failing to play, try to play this animation instead.
|
||||
*/
|
||||
function correctAnimationName(name:String):String
|
||||
function correctAnimationName(name:String, ?fallback:String):String
|
||||
{
|
||||
// If the animation exists, we're good.
|
||||
if (hasAnimation(name)) return name;
|
||||
|
@ -247,14 +245,22 @@ class Bopper extends StageProp implements IPlayStateScriptedClass
|
|||
}
|
||||
else
|
||||
{
|
||||
if (name != 'idle')
|
||||
if (fallback != null)
|
||||
{
|
||||
FlxG.log.warn('Bopper tried to play animation "$name" that does not exist, fallback to idle...');
|
||||
return correctAnimationName('idle');
|
||||
if (fallback == name)
|
||||
{
|
||||
FlxG.log.error('Bopper tried to play animation "$name" that does not exist! This is bad!');
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
FlxG.log.warn('Bopper tried to play animation "$name" that does not exist, fallback to idle...');
|
||||
return correctAnimationName('idle');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FlxG.log.error('Bopper tried to play animation "idle" that does not exist! This is bad!');
|
||||
FlxG.log.error('Bopper tried to play animation "$name" that does not exist! This is bad!');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4530,14 +4530,14 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
{
|
||||
// Create an event and place it in the chart.
|
||||
// TODO: Figure out configuring event data.
|
||||
var newEventData:SongEventData = new SongEventData(cursorSnappedMs, eventKindToPlace, Reflect.copy(eventDataToPlace));
|
||||
var newEventData:SongEventData = new SongEventData(cursorSnappedMs, eventKindToPlace, eventDataToPlace.copy());
|
||||
|
||||
performCommand(new AddEventsCommand([newEventData], FlxG.keys.pressed.CONTROL));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Create a note and place it in the chart.
|
||||
var newNoteData:SongNoteData = new SongNoteData(cursorSnappedMs, cursorColumn, 0, Reflect.copy(noteKindToPlace));
|
||||
var newNoteData:SongNoteData = new SongNoteData(cursorSnappedMs, cursorColumn, 0, noteKindToPlace);
|
||||
|
||||
performCommand(new AddNotesCommand([newNoteData], FlxG.keys.pressed.CONTROL));
|
||||
|
||||
|
|
|
@ -128,9 +128,9 @@ class ChartEditorDropdowns
|
|||
"weekend-1-picouppercutprep" => "Pico Uppercut (Prep) (Blazin')",
|
||||
"weekend-1-picouppercut" => "Pico Uppercut (Blazin')",
|
||||
"weekend-1-blockhigh" => "Block High (Blazin')",
|
||||
"weekend-1-blocklow" => "Dodge High (Blazin')",
|
||||
"weekend-1-blocklow" => "Block Low (Blazin')",
|
||||
"weekend-1-blockspin" => "Block High (Spin) (Blazin')",
|
||||
"weekend-1-dodgehigh" => "Block Low (Blazin')",
|
||||
"weekend-1-dodgehigh" => "Dodge High (Blazin')",
|
||||
"weekend-1-dodgelow" => "Dodge Low (Blazin')",
|
||||
"weekend-1-dodgespin" => "Dodge High (Spin) (Blazin')",
|
||||
"weekend-1-hithigh" => "Hit High (Blazin')",
|
||||
|
|
|
@ -45,6 +45,9 @@ class LevelProp extends Bopper
|
|||
this.visible = true;
|
||||
}
|
||||
|
||||
// Reset animation state.
|
||||
this.shouldAlternate = null;
|
||||
|
||||
var isAnimated:Bool = propData.animations.length > 0;
|
||||
if (isAnimated)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue