Merge branch 'general-devel' into dependabot/nuget/TShockAPI/Newtonsoft.Json-13.0.1

This commit is contained in:
Lucas Nicodemus 2022-07-27 21:32:11 -07:00 committed by GitHub
commit 1c1ab95f4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 0 deletions

View file

@ -768,6 +768,28 @@ namespace TShockAPI
}
})
.AddFlag("-worldevil", (value) =>
{
int worldEvil;
switch (value.ToLower())
{
case "random":
worldEvil = -1;
break;
case "corrupt":
worldEvil = 0;
break;
case "crimson":
worldEvil = 1;
break;
default:
throw new InvalidOperationException("Invalid value given for command line argument \"-worldevil\".");
}
ServerApi.LogWriter.PluginWriteLine(this, String.Format("New worlds will be generated with the {0} world evil type!", value), TraceLevel.Verbose);
WorldGen.WorldGenParam_Evil = worldEvil;
})
//Flags without arguments
.AddFlag("-logclear", () => LogClear = true)