Ejemplo n.º 1
0
 public bool AutotilesFunc()
 {
     if (CurrentArgs.Count == 1)
     {
         Console.WriteLine("For information about the '--autotiles' parameter, please use 'map edit --autotiles --help'.");
         return(false);
     }
     else
     {
         cli = new AutotilesCommandLineHandler(this.Create);
         cli.Parse(CurrentArgs.GetRange(ArgIndex + 1, CurrentArgs.Count - ArgIndex - 1));
         return(false);
     }
 }
Ejemplo n.º 2
0
 public bool Create()
 {
     if (ArgIndex >= CurrentArgs.Count - 1)
     {
         Console.WriteLine("For information about the 'create' command, please use 'map create --help'.");
     }
     else
     {
         MapEditCommandLineHandler cli = new MapEditCommandLineHandler(true);
         cli.Parse(CurrentArgs.GetRange(ArgIndex + 1, CurrentArgs.Count - ArgIndex - 1));
         return(false); // Return false to cancel the rest of the parsing
     }
     return(true);
 }
Ejemplo n.º 3
0
 public bool Tileset()
 {
     if (CurrentArgs.Count == 1)
     {
         Console.WriteLine("For information about the 'tileset' command, please use 'data tileset --help'.");
     }
     else
     {
         TilesetCommandLineHandler cli = new TilesetCommandLineHandler();
         cli.Parse(CurrentArgs.GetRange(ArgIndex + 1, CurrentArgs.Count - ArgIndex - 1));
         return(false);
     }
     return(true);
 }
Ejemplo n.º 4
0
 public override bool Finalize()
 {
     if (CloseProject)
     {
         CloseProject = false;
         if (!CurrentArgs.Contains("-c") && !CurrentArgs.Contains("--confirm"))
         {
             return(Error($"You are about to close the project. Any unsaved changes will be discarded. Please repeat the command with the '--confirm' flag."));
         }
         Game.Data.ClearProjectData();
         Editor.ClearProjectData();
         Console.WriteLine("Successfully closed the project.");
     }
     return(true);
 }
Ejemplo n.º 5
0
 public bool DataMode()
 {
     if (CurrentArgs.Count == 1)
     {
         Console.WriteLine("For information about the 'data' command, please use 'data --help'.");
     }
     else
     {
         if (!Editor.InProject)
         {
             Error("You must be in a project to use the 'data' command. Please see the 'help' command for more information.");
             return(false);
         }
         DataCommandLineHandler cli = new DataCommandLineHandler();
         cli.Parse(CurrentArgs.GetRange(ArgIndex + 1, CurrentArgs.Count - ArgIndex - 1));
         return(false); // Return false to cancel the rest of the parsing
     }
     return(true);
 }