diff --git a/source/funkin/play/notes/notekind/NoteKind.hx b/source/funkin/play/notes/notekind/NoteKind.hx index 8b2197e7e..57bab7063 100644 --- a/source/funkin/play/notes/notekind/NoteKind.hx +++ b/source/funkin/play/notes/notekind/NoteKind.hx @@ -43,7 +43,7 @@ class NoteKind implements INoteScriptedClass * Only accessible in scripts * Defaults to true */ - public var scoreable:Bool = true; + public var scoreable(default, default):Bool = true; public function new(noteKind:String, description:String = "", ?noteStyleId:String, ?params:Array, ?noanim:Bool, ?suffix:String) { @@ -72,6 +72,18 @@ class NoteKind implements INoteScriptedClass }); } + /** + * Retrieve all notes NOT of this kind + * @return Array + */ + function getOtherNotes():Array + { + var allNotes:Array = PlayState.instance.playerStrumline.notes.members.concat(PlayState.instance.opponentStrumline.notes.members); + return allNotes.filter(function(note:NoteSprite) { + return note != null && note.noteData.kind != this.noteKind; + }); + } + public function onScriptEvent(event:ScriptEvent):Void {} public function onCreate(event:ScriptEvent):Void {}