Add AllowCrimsonCreep config option

This commit is contained in:
MarioE 2013-11-10 15:55:09 -05:00
parent e5d01b19d6
commit 6a4e7584a0
3 changed files with 37 additions and 28 deletions

View file

@ -223,7 +223,10 @@ namespace TShockAPI
[Description("Allow ice placement even when user does not have canbuild.")] public bool AllowIce = false; [Description("Allow ice placement even when user does not have canbuild.")] public bool AllowIce = false;
[Description("Allows corrutption to spread when a world is hardmode.")] public bool AllowCorruptionCreep = true; [Description("Allows crimson to spread when a world is hardmode.")]
public bool AllowCrimsonCreep = true;
[Description("Allows corruption to spread when a world is hardmode.")] public bool AllowCorruptionCreep = true;
[Description("Allows hallow to spread when a world is hardmode.")] public bool AllowHallowCreep = true; [Description("Allows hallow to spread when a world is hardmode.")] public bool AllowHallowCreep = true;

View file

@ -845,8 +845,14 @@ namespace TShockAPI
if (args.Handled) if (args.Handled)
return; return;
if (!Config.AllowCrimsonCreep && (args.Type == 0 || args.Type == 199 || args.Type == 203 || args.Type == 234))
{
args.Handled = true;
return;
}
if (!Config.AllowCorruptionCreep && (args.Type == 23 || args.Type == 25 || args.Type == 0 || if (!Config.AllowCorruptionCreep && (args.Type == 23 || args.Type == 25 || args.Type == 0 ||
args.Type == 112 || args.Type == 23 || args.Type == 32 ) ) args.Type == 112 || args.Type == 32))
{ {
args.Handled = true; args.Handled = true;
return; return;

@ -1 +1 @@
Subproject commit 92aeb65461a164c5a715dd72e8fc7a6e3dfbb24b Subproject commit 886d5eeb3342d8436f5819d731ae0c8b947955de