Пример #1
0
 void ITypeRegistry.RegisterType <T>()
 {
     if (_injected)
     {
         EntoFramework.Logger.Log("RegisterType<T> called too late, must be called prior to Game1.Initialize or it will likely not be added to the serialiser", StardewModdingAPI.LogLevel.Error);
     }
     if (!typeof(T).IsPublic)
     {
         EntoFramework.Logger.Log("Types added to RegisterType<T> must be set as public", StardewModdingAPI.LogLevel.Error);
     }
     else
     {
         Type type = typeof(T);
         if (!InjectedTypes.Contains(type))
         {
             InjectedTypes.Add(type);
         }
     }
 }