mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-27 01:55:52 -05:00
Merge pull request #405 from FunkinCrew/feature/high-erect
Implement High Erect draft, plus some bug fixes
This commit is contained in:
commit
0409c0ba6a
13 changed files with 92 additions and 15 deletions
2
assets
2
assets
|
@ -1 +1 @@
|
||||||
Subproject commit 3b6008899aefa1fe952c1cc5ebf9506464a86d3c
|
Subproject commit 8bb6214e16c823b8b5a522a39b7a7e01d6283abf
|
|
@ -35,7 +35,15 @@ class Conductor
|
||||||
* You can also do stuff like store a reference to the Conductor and pass it around or temporarily replace it,
|
* You can also do stuff like store a reference to the Conductor and pass it around or temporarily replace it,
|
||||||
* or have a second Conductor running at the same time, or other weird stuff like that if you need to.
|
* or have a second Conductor running at the same time, or other weird stuff like that if you need to.
|
||||||
*/
|
*/
|
||||||
public static var instance:Conductor = new Conductor();
|
public static var instance(get, never):Conductor;
|
||||||
|
|
||||||
|
static var _instance:Null<Conductor> = null;
|
||||||
|
|
||||||
|
static function get_instance():Conductor
|
||||||
|
{
|
||||||
|
if (_instance == null) _instance = new Conductor();
|
||||||
|
return _instance;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Signal fired when the current Conductor instance advances to a new measure.
|
* Signal fired when the current Conductor instance advances to a new measure.
|
||||||
|
@ -523,6 +531,6 @@ class Conductor
|
||||||
*/
|
*/
|
||||||
public static function reset():Void
|
public static function reset():Void
|
||||||
{
|
{
|
||||||
Conductor.instance = new Conductor();
|
_instance = new Conductor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,6 +55,13 @@ abstract class BaseRegistry<T:(IRegistryEntry<J> & Constructible<EntryConstructo
|
||||||
|
|
||||||
this.entries = new Map<String, T>();
|
this.entries = new Map<String, T>();
|
||||||
this.scriptedEntryIds = [];
|
this.scriptedEntryIds = [];
|
||||||
|
|
||||||
|
// Lazy initialization of singletons should let this get called,
|
||||||
|
// but we have this check just in case.
|
||||||
|
if (FlxG.game != null)
|
||||||
|
{
|
||||||
|
FlxG.console.registerObject('registry$registryId', this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -15,7 +15,14 @@ class ConversationRegistry extends BaseRegistry<Conversation, ConversationData>
|
||||||
|
|
||||||
public static final CONVERSATION_DATA_VERSION_RULE:thx.semver.VersionRule = "1.0.x";
|
public static final CONVERSATION_DATA_VERSION_RULE:thx.semver.VersionRule = "1.0.x";
|
||||||
|
|
||||||
public static final instance:ConversationRegistry = new ConversationRegistry();
|
public static var instance(get, never):ConversationRegistry;
|
||||||
|
static var _instance:Null<ConversationRegistry> = null;
|
||||||
|
|
||||||
|
static function get_instance():ConversationRegistry
|
||||||
|
{
|
||||||
|
if (_instance == null) _instance = new ConversationRegistry();
|
||||||
|
return _instance;
|
||||||
|
}
|
||||||
|
|
||||||
public function new()
|
public function new()
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,7 +15,14 @@ class DialogueBoxRegistry extends BaseRegistry<DialogueBox, DialogueBoxData>
|
||||||
|
|
||||||
public static final DIALOGUEBOX_DATA_VERSION_RULE:thx.semver.VersionRule = "1.1.x";
|
public static final DIALOGUEBOX_DATA_VERSION_RULE:thx.semver.VersionRule = "1.1.x";
|
||||||
|
|
||||||
public static final instance:DialogueBoxRegistry = new DialogueBoxRegistry();
|
public static var instance(get, never):DialogueBoxRegistry;
|
||||||
|
static var _instance:Null<DialogueBoxRegistry> = null;
|
||||||
|
|
||||||
|
static function get_instance():DialogueBoxRegistry
|
||||||
|
{
|
||||||
|
if (_instance == null) _instance = new DialogueBoxRegistry();
|
||||||
|
return _instance;
|
||||||
|
}
|
||||||
|
|
||||||
public function new()
|
public function new()
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,7 +15,14 @@ class SpeakerRegistry extends BaseRegistry<Speaker, SpeakerData>
|
||||||
|
|
||||||
public static final SPEAKER_DATA_VERSION_RULE:thx.semver.VersionRule = "1.0.x";
|
public static final SPEAKER_DATA_VERSION_RULE:thx.semver.VersionRule = "1.0.x";
|
||||||
|
|
||||||
public static final instance:SpeakerRegistry = new SpeakerRegistry();
|
public static var instance(get, never):SpeakerRegistry;
|
||||||
|
static var _instance:Null<SpeakerRegistry> = null;
|
||||||
|
|
||||||
|
static function get_instance():SpeakerRegistry
|
||||||
|
{
|
||||||
|
if (_instance == null) _instance = new SpeakerRegistry();
|
||||||
|
return _instance;
|
||||||
|
}
|
||||||
|
|
||||||
public function new()
|
public function new()
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,7 +15,14 @@ class LevelRegistry extends BaseRegistry<Level, LevelData>
|
||||||
|
|
||||||
public static final LEVEL_DATA_VERSION_RULE:thx.semver.VersionRule = "1.0.x";
|
public static final LEVEL_DATA_VERSION_RULE:thx.semver.VersionRule = "1.0.x";
|
||||||
|
|
||||||
public static final instance:LevelRegistry = new LevelRegistry();
|
public static var instance(get, never):LevelRegistry;
|
||||||
|
static var _instance:Null<LevelRegistry> = null;
|
||||||
|
|
||||||
|
static function get_instance():LevelRegistry
|
||||||
|
{
|
||||||
|
if (_instance == null) _instance = new LevelRegistry();
|
||||||
|
return _instance;
|
||||||
|
}
|
||||||
|
|
||||||
public function new()
|
public function new()
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,7 +15,14 @@ class NoteStyleRegistry extends BaseRegistry<NoteStyle, NoteStyleData>
|
||||||
|
|
||||||
public static final NOTE_STYLE_DATA_VERSION_RULE:thx.semver.VersionRule = "1.0.x";
|
public static final NOTE_STYLE_DATA_VERSION_RULE:thx.semver.VersionRule = "1.0.x";
|
||||||
|
|
||||||
public static final instance:NoteStyleRegistry = new NoteStyleRegistry();
|
public static var instance(get, never):NoteStyleRegistry;
|
||||||
|
static var _instance:Null<NoteStyleRegistry> = null;
|
||||||
|
|
||||||
|
static function get_instance():NoteStyleRegistry
|
||||||
|
{
|
||||||
|
if (_instance == null) _instance = new NoteStyleRegistry();
|
||||||
|
return _instance;
|
||||||
|
}
|
||||||
|
|
||||||
public function new()
|
public function new()
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,10 +40,17 @@ class SongRegistry extends BaseRegistry<Song, SongMetadata>
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO: What if there was a Singleton macro which created static functions
|
* TODO: What if there was a Singleton macro which automatically created the property for us?
|
||||||
* that redirected to the instance?
|
|
||||||
*/
|
*/
|
||||||
public static final instance:SongRegistry = new SongRegistry();
|
public static var instance(get, never):SongRegistry;
|
||||||
|
|
||||||
|
static var _instance:Null<SongRegistry> = null;
|
||||||
|
|
||||||
|
static function get_instance():SongRegistry
|
||||||
|
{
|
||||||
|
if (_instance == null) _instance = new SongRegistry();
|
||||||
|
return _instance;
|
||||||
|
}
|
||||||
|
|
||||||
public function new()
|
public function new()
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,7 +15,14 @@ class StageRegistry extends BaseRegistry<Stage, StageData>
|
||||||
|
|
||||||
public static final STAGE_DATA_VERSION_RULE:thx.semver.VersionRule = "1.0.x";
|
public static final STAGE_DATA_VERSION_RULE:thx.semver.VersionRule = "1.0.x";
|
||||||
|
|
||||||
public static final instance:StageRegistry = new StageRegistry();
|
public static var instance(get, never):StageRegistry;
|
||||||
|
static var _instance:Null<StageRegistry> = null;
|
||||||
|
|
||||||
|
static function get_instance():StageRegistry
|
||||||
|
{
|
||||||
|
if (_instance == null) _instance = new StageRegistry();
|
||||||
|
return _instance;
|
||||||
|
}
|
||||||
|
|
||||||
public function new()
|
public function new()
|
||||||
{
|
{
|
||||||
|
|
|
@ -139,7 +139,16 @@ class Song implements IPlayStateScriptedClass implements IRegistryEntry<SongMeta
|
||||||
for (vari in _data.playData.songVariations)
|
for (vari in _data.playData.songVariations)
|
||||||
{
|
{
|
||||||
var variMeta:Null<SongMetadata> = fetchVariationMetadata(id, vari);
|
var variMeta:Null<SongMetadata> = fetchVariationMetadata(id, vari);
|
||||||
if (variMeta != null) _metadata.set(variMeta.variation, variMeta);
|
if (variMeta != null)
|
||||||
|
{
|
||||||
|
_metadata.set(variMeta.variation, variMeta);
|
||||||
|
trace(' Loaded variation: $vari');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FlxG.log.warn('[SONG] Failed to load variation metadata (${id}:${vari}), is the path correct?');
|
||||||
|
trace(' FAILED to load variation: $vari');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4948,7 +4948,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
||||||
|
|
||||||
playbarNoteSnap.text = '1/${noteSnapQuant}';
|
playbarNoteSnap.text = '1/${noteSnapQuant}';
|
||||||
playbarDifficulty.text = '${selectedDifficulty.toTitleCase()}';
|
playbarDifficulty.text = '${selectedDifficulty.toTitleCase()}';
|
||||||
// playbarBPM.text = 'BPM: ${(Conductor.currentTimeChange?.bpm ?? 0.0)}';
|
playbarBPM.text = 'BPM: ${(Conductor.instance.bpm ?? 0.0)}';
|
||||||
}
|
}
|
||||||
|
|
||||||
function handlePlayhead():Void
|
function handlePlayhead():Void
|
||||||
|
|
|
@ -450,7 +450,11 @@ class StoryMenuState extends MusicBeatState
|
||||||
*/
|
*/
|
||||||
function changeDifficulty(change:Int = 0):Void
|
function changeDifficulty(change:Int = 0):Void
|
||||||
{
|
{
|
||||||
var difficultyList:Array<String> = currentLevel.getDifficulties();
|
// "For now, NO erect in story mode" -Dave
|
||||||
|
|
||||||
|
var difficultyList:Array<String> = Constants.DEFAULT_DIFFICULTY_LIST;
|
||||||
|
// Use this line to displays all difficulties
|
||||||
|
// var difficultyList:Array<String> = currentLevel.getDifficulties();
|
||||||
var currentIndex:Int = difficultyList.indexOf(currentDifficultyId);
|
var currentIndex:Int = difficultyList.indexOf(currentDifficultyId);
|
||||||
|
|
||||||
currentIndex += change;
|
currentIndex += change;
|
||||||
|
|
Loading…
Reference in a new issue