mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2025-03-23 05:15:14 -04:00
rename stuff
This commit is contained in:
parent
a7482410b9
commit
134b467876
6 changed files with 22 additions and 22 deletions
source/funkin
|
@ -27,7 +27,7 @@ import funkin.data.dialogue.speaker.SpeakerRegistry;
|
|||
import funkin.data.freeplay.album.AlbumRegistry;
|
||||
import funkin.data.song.SongRegistry;
|
||||
import funkin.play.character.CharacterData.CharacterDataParser;
|
||||
import funkin.play.notes.notekind.NoteKindScriptManager;
|
||||
import funkin.play.notes.notekind.NoteKindManager;
|
||||
import funkin.modding.module.ModuleHandler;
|
||||
import funkin.ui.title.TitleState;
|
||||
import funkin.util.CLIUtil;
|
||||
|
@ -177,7 +177,7 @@ class InitState extends FlxState
|
|||
// Move it to use a BaseRegistry.
|
||||
CharacterDataParser.loadCharacterCache();
|
||||
|
||||
NoteKindScriptManager.loadScripts();
|
||||
NoteKindManager.loadScripts();
|
||||
|
||||
ModuleHandler.buildModuleCallbacks();
|
||||
ModuleHandler.loadModuleCache();
|
||||
|
|
|
@ -49,7 +49,7 @@ import funkin.play.notes.NoteSprite;
|
|||
import funkin.play.notes.notestyle.NoteStyle;
|
||||
import funkin.play.notes.Strumline;
|
||||
import funkin.play.notes.SustainTrail;
|
||||
import funkin.play.notes.notekind.NoteKindScriptManager;
|
||||
import funkin.play.notes.notekind.NoteKindManager;
|
||||
import funkin.play.scoring.Scoring;
|
||||
import funkin.play.song.Song;
|
||||
import funkin.play.stage.Stage;
|
||||
|
@ -1182,7 +1182,7 @@ class PlayState extends MusicBeatSubState
|
|||
if (Std.isOfType(event, NoteScriptEvent))
|
||||
{
|
||||
var noteEvent:NoteScriptEvent = cast(event, NoteScriptEvent);
|
||||
NoteKindScriptManager.callEvent(noteEvent.note.noteData.kind, noteEvent);
|
||||
NoteKindManager.callEvent(noteEvent.note.noteData.kind, noteEvent);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import funkin.modding.events.ScriptEvent;
|
|||
/**
|
||||
* Class for note scripts
|
||||
*/
|
||||
class NoteKindScript implements INoteScriptedClass
|
||||
class NoteKind implements INoteScriptedClass
|
||||
{
|
||||
/**
|
||||
* the name of the note kind
|
|
@ -4,13 +4,13 @@ import funkin.modding.events.ScriptEventDispatcher;
|
|||
import funkin.modding.events.ScriptEvent;
|
||||
import funkin.ui.debug.charting.util.ChartEditorDropdowns;
|
||||
|
||||
class NoteKindScriptManager
|
||||
class NoteKindManager
|
||||
{
|
||||
static var noteKindScripts:Map<String, NoteKindScript> = [];
|
||||
static var noteKinds:Map<String, NoteKind> = [];
|
||||
|
||||
public static function loadScripts():Void
|
||||
{
|
||||
var scriptedClassName:Array<String> = ScriptedNoteKindScript.listScriptClasses();
|
||||
var scriptedClassName:Array<String> = ScriptedNoteKind.listScriptClasses();
|
||||
if (scriptedClassName.length > 0)
|
||||
{
|
||||
trace('Instantiating ${scriptedClassName.length} scripted note kind...');
|
||||
|
@ -18,9 +18,9 @@ class NoteKindScriptManager
|
|||
{
|
||||
try
|
||||
{
|
||||
var script:NoteKindScript = ScriptedNoteKindScript.init(scriptedClass, "unknown");
|
||||
var script:NoteKind = ScriptedNoteKind.init(scriptedClass, "unknown");
|
||||
trace(' Initialized scripted note kind: ${script.noteKind}');
|
||||
noteKindScripts.set(script.noteKind, script);
|
||||
noteKinds.set(script.noteKind, script);
|
||||
ChartEditorDropdowns.NOTE_KINDS.set(script.noteKind, script.description);
|
||||
}
|
||||
catch (e)
|
||||
|
@ -34,13 +34,13 @@ class NoteKindScriptManager
|
|||
|
||||
public static function callEvent(noteKind:String, event:ScriptEvent):Void
|
||||
{
|
||||
var noteKindScript:NoteKindScript = noteKindScripts.get(noteKind);
|
||||
var noteKind:NoteKind = noteKinds.get(noteKind);
|
||||
|
||||
if (noteKindScript == null)
|
||||
if (noteKind == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ScriptEventDispatcher.callEvent(noteKindScript, event);
|
||||
ScriptEventDispatcher.callEvent(noteKind, event);
|
||||
}
|
||||
}
|
9
source/funkin/play/notes/notekind/ScriptedNoteKind.hx
Normal file
9
source/funkin/play/notes/notekind/ScriptedNoteKind.hx
Normal file
|
@ -0,0 +1,9 @@
|
|||
package funkin.play.notes.notekind;
|
||||
|
||||
/**
|
||||
* A script that can be tied to a NoteKind.
|
||||
* Create a scripted class that extends NoteKind,
|
||||
* then call `super('noteKind')` in the constructor to use this.
|
||||
*/
|
||||
@:hscriptClass
|
||||
class ScriptedNoteKind extends NoteKind implements polymod.hscript.HScriptedClass {}
|
|
@ -1,9 +0,0 @@
|
|||
package funkin.play.notes.notekind;
|
||||
|
||||
/**
|
||||
* A script that can be tied to a NoteKindScript.
|
||||
* Create a scripted class that extends NoteKindScript,
|
||||
* then call `super('noteKind')` in the constructor to use this.
|
||||
*/
|
||||
@:hscriptClass
|
||||
class ScriptedNoteKindScript extends NoteKindScript implements polymod.hscript.HScriptedClass {}
|
Loading…
Reference in a new issue