diff --git a/TShockAPI/ConfigFile.cs b/TShockAPI/ConfigFile.cs index f835105d..bebfc148 100755 --- a/TShockAPI/ConfigFile.cs +++ b/TShockAPI/ConfigFile.cs @@ -223,7 +223,10 @@ namespace TShockAPI [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; diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 105ca044..e529d5e1 100755 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -840,35 +840,41 @@ namespace TShockAPI Config.MaxSlots, Netplay.serverListenIP, Netplay.serverPort, Version); } - private void OnHardUpdate(HardmodeTileUpdateEventArgs args) - { - if (args.Handled) - return; + private void OnHardUpdate(HardmodeTileUpdateEventArgs args) + { + if (args.Handled) + return; - if (!Config.AllowCorruptionCreep && ( args.Type == 23 || args.Type == 25 || args.Type == 0 || - args.Type == 112 || args.Type == 23 || args.Type == 32 ) ) - { - args.Handled = true; - return; - } + if (!Config.AllowCrimsonCreep && (args.Type == 0 || args.Type == 199 || args.Type == 203 || args.Type == 234)) + { + args.Handled = true; + return; + } - if (!Config.AllowHallowCreep && (args.Type == 109 || args.Type == 117 || args.Type == 116 ) ) - { - args.Handled = true; - } - } + if (!Config.AllowCorruptionCreep && (args.Type == 23 || args.Type == 25 || args.Type == 0 || + args.Type == 112 || args.Type == 32)) + { + args.Handled = true; + return; + } - private void OnStatueSpawn( StatueSpawnEventArgs args ) - { - if( args.Within200 < Config.StatueSpawn200 && args.Within600 < Config.StatueSpawn600 && args.WorldWide < Config.StatueSpawnWorld ) - { - args.Handled = true; - } - else - { - args.Handled = false; - } - } + if (!Config.AllowHallowCreep && (args.Type == 109 || args.Type == 117 || args.Type == 116)) + { + args.Handled = true; + } + } + + private void OnStatueSpawn(StatueSpawnEventArgs args) + { + if (args.Within200 < Config.StatueSpawn200 && args.Within600 < Config.StatueSpawn600 && args.WorldWide < Config.StatueSpawnWorld) + { + args.Handled = true; + } + else + { + args.Handled = false; + } + } private void OnConnect(ConnectEventArgs args) { diff --git a/TerrariaServerAPI b/TerrariaServerAPI index 92aeb654..886d5eeb 160000 --- a/TerrariaServerAPI +++ b/TerrariaServerAPI @@ -1 +1 @@ -Subproject commit 92aeb65461a164c5a715dd72e8fc7a6e3dfbb24b +Subproject commit 886d5eeb3342d8436f5819d731ae0c8b947955de