Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few CLI improvements #812

Merged
merged 5 commits into from
Apr 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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