Merge pull request #2633 from NotGeri/general-devel
World Evil Startup Parameter
This commit is contained in:
commit
4ceb039f82
2 changed files with 23 additions and 0 deletions
|
|
@ -16,6 +16,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
|
||||||
* Fixed `TSPlayer.GiveItem` not working if the player is in lava. (@gohjoseph)
|
* Fixed `TSPlayer.GiveItem` not working if the player is in lava. (@gohjoseph)
|
||||||
* Only allow using Teleportation Potions, Magic Conch, and Demon Conch whilst holding them. (@drunderscore)
|
* Only allow using Teleportation Potions, Magic Conch, and Demon Conch whilst holding them. (@drunderscore)
|
||||||
* Updated server startup language to be more clear when encountering a fatal startup error. Now, the server gives more context as to what happened so that there's a better chance of people being able to help themselves. (@hakusaro)
|
* Updated server startup language to be more clear when encountering a fatal startup error. Now, the server gives more context as to what happened so that there's a better chance of people being able to help themselves. (@hakusaro)
|
||||||
|
* Added `-worldevil <type>` command line argument (@NotGeri)
|
||||||
|
|
||||||
## TShock 4.5.17
|
## TShock 4.5.17
|
||||||
* Fixed duplicate characters (twins) after repeatedly logging in as the same character due to connection not being immediately closed during `NetHooks_NameCollision`. (@gohjoseph)
|
* Fixed duplicate characters (twins) after repeatedly logging in as the same character due to connection not being immediately closed during `NetHooks_NameCollision`. (@gohjoseph)
|
||||||
|
|
|
||||||
|
|
@ -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
|
//Flags without arguments
|
||||||
.AddFlag("-logclear", () => LogClear = true)
|
.AddFlag("-logclear", () => LogClear = true)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue