Beispiel #1
0
 protected void AssignModule()
 {
     foreach (var i in HeaderData.GetAddClasses())
     {
         var type = TypeResolver.FindTypeDefinition(Module, i.TypeName);
         if (type != null)
         {
             i.Type = type;
         }
         else
         {
             Debug.Log("Game: " + Game.GameConfiguration.Id, "Can't find type \"" + i.TypeName + "\" in mod \"" + Id + "\" but it is declared in its header as add class.");
         }
     }
     foreach (var i in HeaderData.GetAddMethods())
     {
         var method = TypeResolver.FindMethodDefinition(Module, i.Path);
         if (method != null)
         {
             i.Method = method;
         }
         else
         {
             Debug.Log("Game: " + Game.GameConfiguration.Id, "Can't find method \"" + i.Path + "\" in mod \"" + Id + "\" but it is declared in its header as add method.");
         }
     }
     foreach (var i in HeaderData.GetInjectIntos())
     {
         var method = TypeResolver.FindMethodDefinition(Module, i.Path);
         if (method != null)
         {
             i.Method = method;
         }
         else
         {
             Debug.Log("Game: " + Game.GameConfiguration.Id, "Can't find method \"" + i.Path + "\" in mod \"" + Id + "\" but it is declared in its header as inject into.");
         }
     }
     foreach (var i in HeaderData.GetAddFields())
     {
         var field = TypeResolver.FindFieldDefinition(Module, i.Path);
         if (field != null)
         {
             i.Field = field;
         }
         else
         {
             Debug.Log("Game: " + Game.GameConfiguration.Id, "Can't find field \"" + i.Path + "\" in mod \"" + Id + "\" but it is declared in its header as add field.");
         }
     }
 }