mirror of
https://github.com/FalloutCollaborationProject/FCP-Mod-Updater.git
synced 2026-07-27 17:04:05 -07:00
Version 1.0
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using System.ComponentModel;
|
||||
using JetBrains.Annotations;
|
||||
using Spectre.Console;
|
||||
using Spectre.Console.Cli;
|
||||
|
||||
namespace FCPModUpdater.Commands.Settings;
|
||||
|
||||
[UsedImplicitly]
|
||||
public class ModPathSettings : CommandSettings
|
||||
{
|
||||
[CommandOption("-d|--directory")]
|
||||
[Description("Path to the RimWorld/Mods folder. If not specified, will attempt to auto-discover.")]
|
||||
public DirectoryInfo? ModDirectory { get; init; }
|
||||
|
||||
public override ValidationResult Validate()
|
||||
{
|
||||
if (ModDirectory != null && !ModDirectory.Exists)
|
||||
{
|
||||
return ValidationResult.Error($"Directory does not exist: {ModDirectory.FullName}");
|
||||
}
|
||||
|
||||
return ValidationResult.Success();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user