mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-11-19 13:17:10 +00:00
fix log spam lol
This commit is contained in:
2 files changed
+6
-5
No files matched your search
@@ -158,11 +158,7 @@ public static class MiraEventManager
|
||||
|
||||
internal static void RegisterEvents(Type type, IMiraPlugin miraPlugin)
|
||||
{
|
||||
if (miraPlugin.ForceRegisterEvents)
|
||||
{
|
||||
Warning("For optimisation reasons, MiraAPI no longer automatically searches every type for events. Please use RegisterEventsAttribute moving forward.");
|
||||
}
|
||||
else if (!type.IsDefined<RegisterEventContainerAttribute>())
|
||||
if (!miraPlugin.ForceRegisterEvents && !type.IsDefined<RegisterEventContainerAttribute>())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -140,6 +140,11 @@ public sealed class MiraPluginManager
|
||||
[SuppressMessage("Minor Code Smell", "S3626:Jump statements should not be redundant", Justification = "Code consistency.")]
|
||||
private static void ProcessAssemblyTypes(Assembly assembly, MiraPluginInfo info, BasePlugin basePlugin, IMiraPlugin plugin, List<Type> roles, bool isMira)
|
||||
{
|
||||
if (plugin.ForceRegisterEvents)
|
||||
{
|
||||
Warning("For optimisation reasons, MiraAPI no longer automatically searches every type for events. Please use RegisterEventsAttribute moving forward.");
|
||||
}
|
||||
|
||||
foreach (var type in assembly.GetTypes())
|
||||
{
|
||||
if ((isMira && type.IsAbstract) || type.IsDefined<MiraIgnoreAttribute>())
|
||||
|
||||
Reference in new issue
Block a user