Beispiel #1
0
 // The function that's called when executing command
 public override void Run(string[] args)
 {
     if (args.Length == 2)
     {
         if (args[0].ToLower() == "create")
         {
             Mod mod = ModLoader.LoadedMods.Where(w => w.ID == args[1]).FirstOrDefault();
             if (mod != null)
             {
                 ManifestStuff.CreateManifest(mod);
             }
             else
             {
                 ModConsole.Error("Invalid ModID (ModID is case sensitive)");
             }
         }
         else if (args[0].ToLower() == "update")
         {
             Mod mod = ModLoader.LoadedMods.Where(w => w.ID == args[1]).FirstOrDefault();
             if (mod != null)
             {
                 ManifestStuff.UpdateManifest(mod);
             }
             else
             {
                 ModConsole.Error("Invalid ModID (ModID is case sensitive)");
             }
         }
     }
     else
     {
         ModConsole.Warning($"Usage: metadata <create|update> <ModID>");
     }
 }
Beispiel #2
0
 // The function that's called when executing command
 public override void Run(string[] args)
 {
     if (args.Length == 2)
     {
         if (args[0].ToLower() == "create")
         {
             Mod mod = ModLoader.LoadedMods.Where(w => w.ID == args[1]).FirstOrDefault();
             if (mod != null)
             {
                 ManifestStuff.CreateManifest(mod);
             }
             else
             {
                 ModConsole.Error("Invalid ModID (ModID is case sensitive)");
             }
         }
         else if (args[0].ToLower() == "update")
         {
             ModConsole.Error("Add update logic here");
         }
     }
     else
     {
         ModConsole.Error("Invalid syntax");
     }
 }