Fix settings that don't have an argument (shop shuffle)

This commit is contained in:
2025-03-02 16:25:14 -06:00
parent a3fbefe888
commit 45653067ce
2 changed files with 8 additions and 3 deletions

View File

@@ -5,6 +5,7 @@
public class SeedSettings {
public const string Omit = "<null>";
public const string NoArg = "<noarg>";
public Mode Mode { get; set; } = Mode.Open;
@@ -135,7 +136,7 @@
[CommonValue("shopsanity")]
public enum ShopShuffle {
[CommonValue(SeedSettings.Omit)] Vanilla,
[CommonValue("true")] Shuffled,
[CommonValue(SeedSettings.NoArg)] Shuffled,
}
public enum DropShuffle {

View File

@@ -108,8 +108,12 @@
}
private void AddArgs(ICollection<string> args, KeyValuePair<string, string> setting) {
if (setting.Value != null && setting.Value != "<null>") {
args.Add(string.Format("--{0}={1}", setting.Key, setting.Value));
if (setting.Value != null) {
if (setting.Value == SeedSettings.NoArg) {
args.Add(string.Format("--{0}", setting.Key));
} else if (setting.Value != SeedSettings.Omit) {
args.Add(string.Format("--{0}={1}", setting.Key, setting.Value));
}
}
}