Fix settings that don't have an argument (shop shuffle)
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
public class SeedSettings {
|
public class SeedSettings {
|
||||||
public const string Omit = "<null>";
|
public const string Omit = "<null>";
|
||||||
|
public const string NoArg = "<noarg>";
|
||||||
|
|
||||||
public Mode Mode { get; set; } = Mode.Open;
|
public Mode Mode { get; set; } = Mode.Open;
|
||||||
|
|
||||||
@@ -135,7 +136,7 @@
|
|||||||
[CommonValue("shopsanity")]
|
[CommonValue("shopsanity")]
|
||||||
public enum ShopShuffle {
|
public enum ShopShuffle {
|
||||||
[CommonValue(SeedSettings.Omit)] Vanilla,
|
[CommonValue(SeedSettings.Omit)] Vanilla,
|
||||||
[CommonValue("true")] Shuffled,
|
[CommonValue(SeedSettings.NoArg)] Shuffled,
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum DropShuffle {
|
public enum DropShuffle {
|
||||||
|
|||||||
@@ -108,10 +108,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void AddArgs(ICollection<string> args, KeyValuePair<string, string> setting) {
|
private void AddArgs(ICollection<string> args, KeyValuePair<string, string> setting) {
|
||||||
if (setting.Value != null && setting.Value != "<null>") {
|
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));
|
args.Add(string.Format("--{0}={1}", setting.Key, setting.Value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private async Task GenerationSucceeded(string id, SeedSettings settings) {
|
private async Task GenerationSucceeded(string id, SeedSettings settings) {
|
||||||
var rom = Path.Join(Path.GetTempPath(), string.Format("OR_{0}.sfc", id));
|
var rom = Path.Join(Path.GetTempPath(), string.Format("OR_{0}.sfc", id));
|
||||||
|
|||||||
Reference in New Issue
Block a user