Add AllowCrimsonCreep config option
This commit is contained in:
parent
e5d01b19d6
commit
6a4e7584a0
3 changed files with 37 additions and 28 deletions
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -845,22 +845,28 @@ namespace TShockAPI
|
||||||
if (args.Handled)
|
if (args.Handled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!Config.AllowCorruptionCreep && ( args.Type == 23 || args.Type == 25 || args.Type == 0 ||
|
if (!Config.AllowCrimsonCreep && (args.Type == 0 || args.Type == 199 || args.Type == 203 || args.Type == 234))
|
||||||
args.Type == 112 || args.Type == 23 || args.Type == 32 ) )
|
|
||||||
{
|
{
|
||||||
args.Handled = true;
|
args.Handled = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Config.AllowHallowCreep && (args.Type == 109 || args.Type == 117 || args.Type == 116 ) )
|
if (!Config.AllowCorruptionCreep && (args.Type == 23 || args.Type == 25 || args.Type == 0 ||
|
||||||
|
args.Type == 112 || args.Type == 32))
|
||||||
|
{
|
||||||
|
args.Handled = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Config.AllowHallowCreep && (args.Type == 109 || args.Type == 117 || args.Type == 116))
|
||||||
{
|
{
|
||||||
args.Handled = true;
|
args.Handled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnStatueSpawn( StatueSpawnEventArgs args )
|
private void OnStatueSpawn(StatueSpawnEventArgs args)
|
||||||
{
|
{
|
||||||
if( args.Within200 < Config.StatueSpawn200 && args.Within600 < Config.StatueSpawn600 && args.WorldWide < Config.StatueSpawnWorld )
|
if (args.Within200 < Config.StatueSpawn200 && args.Within600 < Config.StatueSpawn600 && args.WorldWide < Config.StatueSpawnWorld)
|
||||||
{
|
{
|
||||||
args.Handled = true;
|
args.Handled = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 92aeb65461a164c5a715dd72e8fc7a6e3dfbb24b
|
Subproject commit 886d5eeb3342d8436f5819d731ae0c8b947955de
|
||||||
Loading…
Add table
Add a link
Reference in a new issue