Skip to content

Commit

Permalink
Merge pull request #812 from Miepee/more-cli-stuff
Browse files Browse the repository at this point in the history
A few CLI improvements
  • Loading branch information
Grossley authored Apr 6, 2022
2 parents 60bbf35 + 25b8a2e commit 55bb7bc
Show file tree
Hide file tree
Showing 6 changed files with 1,578 additions and 706 deletions.
82 changes: 82 additions & 0 deletions UndertaleModCli/CommandOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
using System.IO;

namespace UndertaleModCli
{
/// <summary>
/// Cli options for the New command
/// </summary>
public class NewOptions
{
/// <summary>
/// File path for new data file
/// </summary>
public FileInfo Output { get; set; } = new FileInfo("data.win");

/// <summary>
/// If the existing file path at <see cref="Output"/> should be overwritten
/// </summary>
public bool Overwrite { get; set; } = false;

/// <summary>
/// Whether to write the new data to Stdout
/// </summary>
public bool Stdout { get; set; }

/// <summary>
/// Determines if Cli should print out verbose logs
/// </summary>
public bool Verbose { get; set; } = false;
}

/// <summary>
/// Cli options for the Load command
/// </summary>
public class LoadOptions
{
/// <summary>
/// File path to the data file
/// </summary>
public FileInfo Datafile { get; set; }

/// <summary>
/// File paths to the scripts that shall be run
/// </summary>
public FileInfo[] Scripts { get; set; }

/// <summary>
/// C# string that shall be executed
/// </summary>
public string? Line { get; set; }

/// <summary>
/// File path to where to save the modified data file
/// </summary>
public FileInfo? Output { get; set; }

/// <summary>
/// Determines if Cli should be run in interactive mode
/// </summary>
public bool Interactive { get; set; } = false;

/// <summary>
/// Determines if Cli should print out verbose logs
/// </summary>
public bool Verbose { get; set; } = false;
}

/// <summary>
/// Cli options for the Info command
/// </summary>
public class InfoOptions
{
/// <summary>
/// File path to the data file
/// </summary>
public FileInfo Datafile { get; set; }

/// <summary>
/// Determines if Cli should print out verbose logs
/// </summary>
public bool Verbose { get; set; } = false;
}
}
Loading

0 comments on commit 55bb7bc

Please sign in to comment.