1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-09-01 03:15:53 +00:00

Compare commits

...

8 commits

8 changed files with 23 additions and 31 deletions

View file

@ -219,7 +219,7 @@
"name": "polymod",
"type": "git",
"dir": null,
"ref": "3e030c81de99ca84acde681431f806d8103bcf6e",
"ref": "866f19edbcd872b3358f9a41f2f6a24c71c191d1",
"url": "https://github.com/larsiusprime/polymod"
},
{

View file

@ -350,7 +350,7 @@ class FunkinMemory
if (sound != null)
{
Assets.cache.removeSound(key);
previousCachedTextures.remove(key);
previousCachedSounds.remove(key);
}
}
Assets.cache.clear("songs");

View file

@ -37,7 +37,7 @@ class FNFLegacyImporter
{
trace('Migrating song metadata from FNF Legacy.');
var songMetadata:SongMetadata = new SongMetadata('Import', Constants.DEFAULT_ARTIST, 'default');
var songMetadata:SongMetadata = new SongMetadata('Import', Constants.DEFAULT_ARTIST, Constants.DEFAULT_CHARTER, Constants.DEFAULT_VARIATION);
// Set generatedBy string for debugging.
songMetadata.generatedBy = 'Chart Editor Import (FNF Legacy)';

View file

@ -24,7 +24,7 @@ class SongDataMigrator
public static function migrate_SongMetadata_v2_1_0(input:SongData_v2_1_0.SongMetadata_v2_1_0):SongMetadata
{
var result:SongMetadata = new SongMetadata(input.songName, input.artist, input.variation);
var result:SongMetadata = new SongMetadata(input.songName, input.artist, Constants.DEFAULT_CHARTER, input.variation);
result.version = SongRegistry.SONG_METADATA_VERSION;
result.timeFormat = input.timeFormat;
result.divisions = input.divisions;
@ -66,7 +66,7 @@ class SongDataMigrator
public static function migrate_SongMetadata_v2_0_0(input:SongData_v2_0_0.SongMetadata_v2_0_0):SongMetadata
{
var result:SongMetadata = new SongMetadata(input.songName, input.artist, input.variation);
var result:SongMetadata = new SongMetadata(input.songName, input.artist, Constants.DEFAULT_CHARTER, input.variation);
result.version = SongRegistry.SONG_METADATA_VERSION;
result.timeFormat = input.timeFormat;
result.divisions = input.divisions;

View file

@ -1447,6 +1447,8 @@ class PlayState extends MusicBeatSubState
}
}
if (!vwooshTimer.finished) vwooshTimer.active = false;
// Pause camera tweening, and keep track of which tweens we pause.
if (cameraFollowTween != null && cameraFollowTween.active)
{

View file

@ -216,38 +216,27 @@ class Bopper extends StageProp implements IPlayStateScriptedClass
* @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, ?fallback:String):String
function correctAnimationName(name:String, fallback:String = 'idle'):Null<String>
{
// If the animation exists, we're good.
if (hasAnimation(name)) return name;
// Attempt to strip a `-alt` suffix, if it exists.
if (name.lastIndexOf('-') != -1)
final idx = name.lastIndexOf('-');
if (idx != -1)
{
var correctName = name.substring(0, name.lastIndexOf('-'));
FlxG.log.notice('Bopper tried to play animation "$name" that does not exist, stripping suffixes ($correctName)...');
return correctAnimationName(correctName);
FlxG.log.notice('Bopper tried to play animation "$name" that does not exist, stripping suffixes...');
return correctAnimationName(name.substr(0, idx), fallback);
}
else if (fallback != name)
{
FlxG.log.warn('Bopper tried to play animation "$name" that does not exist, fallback to $fallback');
return correctAnimationName(fallback);
}
else
{
if (fallback != null)
{
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 "$name" that does not exist! This is bad!');
return null;
}
FlxG.log.error('Bopper tried to play animation "$name" that does not exist! This is bad!');
return null;
}
}

View file

@ -1306,7 +1306,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
var result:Null<SongMetadata> = songMetadata.get(selectedVariation);
if (result == null)
{
result = new SongMetadata('Default Song Name', Constants.DEFAULT_ARTIST, selectedVariation);
result = new SongMetadata('Default Song Name', Constants.DEFAULT_ARTIST, Constants.DEFAULT_CHARTER, selectedVariation);
songMetadata.set(selectedVariation, result);
}
return result;

View file

@ -580,7 +580,7 @@ class ChartEditorDialogHandler
dialog.hideDialog(DialogButton.CANCEL);
}
var newSongMetadata:SongMetadata = new SongMetadata('', '', Constants.DEFAULT_VARIATION);
var newSongMetadata:SongMetadata = new SongMetadata('', '', '', Constants.DEFAULT_VARIATION);
newSongMetadata.variation = targetVariation;
newSongMetadata.playData.difficulties = (erect) ? ['erect', 'nightmare'] : ['easy', 'normal', 'hard'];
@ -1219,7 +1219,8 @@ class ChartEditorDialogHandler
var dialogVariationName:Null<TextField> = dialog.findComponent('dialogVariationName', TextField);
if (dialogVariationName == null) throw 'Could not locate dialogVariationName TextField in Add Variation dialog';
var pendingVariation:SongMetadata = new SongMetadata(dialogSongName.text, dialogSongArtist.text, dialogVariationName.text.toLowerCase());
var pendingVariation:SongMetadata = new SongMetadata(dialogSongName.text, dialogSongArtist.text, dialogSongCharter.text,
dialogVariationName.text.toLowerCase());
pendingVariation.playData.stage = dialogStage.value.id;
pendingVariation.playData.noteStyle = dialogNoteStyle.value.id;