Skip to content

Commit

Permalink
accidentally left that here
Browse files Browse the repository at this point in the history
  • Loading branch information
lemz1 authored Oct 13, 2024
1 parent 1c7e211 commit bd9bc86
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions source/funkin/util/macro/ClassMacro.hx
Original file line number Diff line number Diff line change
Expand Up @@ -64,32 +64,6 @@ class ClassMacro
return macro funkin.util.macro.CompiledClassList.getTyped($v{request}, ${targetClassExpr});
}

/**
* Get a list of `Class<Dynamic>` for all classes extending a specified class.
*
* Example: `var list:Array<Class<Dynamic>> = listSubclassesOf(FlxSprite);`
*
* @param targetClass The class to query for subclasses.
* @return A list of classes matching the specified criteria.
*/
public static macro function listSubclassesFromClassType(targetClass:ClassType):ExprOf<List<Class<Dynamic>>>
{
if (!onGenerateCallbackRegistered)
{
onGenerateCallbackRegistered = true;
Context.onGenerate(onGenerate);
}

var targetClassPath:String = null;
if (targetClass != null) targetClassPath = targetClass.pack.join('.') + '.' + targetClass.name;

var request:String = 'extend~${targetClassPath}';

classListsToGenerate.push(request);

return macro CompiledClassList.get(request);
}

#if macro
/**
* Callback executed after the typing phase but before the generation phase.
Expand Down

0 comments on commit bd9bc86

Please sign in to comment.