mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add version feature for SabreTools
This commit is contained in:
@@ -15,7 +15,7 @@ namespace RombaSharp.Features
|
|||||||
Flags = new List<string>() { "version" };
|
Flags = new List<string>() { "version" };
|
||||||
Description = "Prints version";
|
Description = "Prints version";
|
||||||
_featureType = ParameterType.Flag;
|
_featureType = ParameterType.Flag;
|
||||||
LongDescription = "Prints version.";
|
LongDescription = "Prints current program version.";
|
||||||
Features = new Dictionary<string, Feature>();
|
Features = new Dictionary<string, Feature>();
|
||||||
|
|
||||||
// Common Features
|
// Common Features
|
||||||
|
|||||||
@@ -1182,6 +1182,9 @@ Features and Options:
|
|||||||
directory, if set). This flag enables users to write out to the
|
directory, if set). This flag enables users to write out to the
|
||||||
directory that the DATs originated from.
|
directory that the DATs originated from.
|
||||||
|
|
||||||
|
v, version Prints version
|
||||||
|
Prints current program version.
|
||||||
|
|
||||||
ve, verify Verify a folder against DATs
|
ve, verify Verify a folder against DATs
|
||||||
When used, this will use an input DAT or set of DATs to blindly check
|
When used, this will use an input DAT or set of DATs to blindly check
|
||||||
against an input folder. The base of the folder is considered the base
|
against an input folder. The base of the folder is considered the base
|
||||||
|
|||||||
35
SabreTools/Features/Version.cs
Normal file
35
SabreTools/Features/Version.cs
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
using SabreTools.Core;
|
||||||
|
using SabreTools.Help;
|
||||||
|
|
||||||
|
namespace SabreTools.Features
|
||||||
|
{
|
||||||
|
internal class Version : BaseFeature
|
||||||
|
{
|
||||||
|
public const string Value = "Version";
|
||||||
|
|
||||||
|
public Version()
|
||||||
|
{
|
||||||
|
Name = Value;
|
||||||
|
Flags = new List<string>() { "v", "version" };
|
||||||
|
Description = "Prints version";
|
||||||
|
_featureType = ParameterType.Flag;
|
||||||
|
LongDescription = "Prints current program version.";
|
||||||
|
Features = new Dictionary<string, Feature>();
|
||||||
|
|
||||||
|
// Common Features
|
||||||
|
AddCommonFeatures();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool ProcessFeatures(Dictionary<string, Feature> features)
|
||||||
|
{
|
||||||
|
// If the base fails, just fail out
|
||||||
|
if (!base.ProcessFeatures(features))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
logger.User($"SabreTools version: {Prepare.Version}");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user