Various bug fixes for strumlines

This commit is contained in:
Eric Myllyoja 2022-03-14 20:48:45 -04:00
parent 1935373963
commit 60c6e5ee29
15 changed files with 410 additions and 225 deletions

View file

@ -96,10 +96,22 @@ class ModuleHandler
}
}
/**
* Clear the module cache, forcing all modules to call shutdown events.
*/
public static function clearModuleCache():Void
{
if (moduleCache != null)
{
var event = new ScriptEvent(ScriptEvent.DESTROY, false);
// Note: Ignore stopPropagation()
for (key => value in moduleCache)
{
ScriptEventDispatcher.callEvent(value, event);
moduleCache.remove(key);
}
moduleCache.clear();
modulePriorityOrder = [];
}