Added RangeChecks config to disable the range part of the grief checks

This commit is contained in:
high 2011-06-08 13:44:25 -04:00
parent 11f5d9a116
commit 4ae6733f81
3 changed files with 8 additions and 4 deletions

View file

@ -26,6 +26,7 @@ namespace TShockAPI
public static bool banBoom = true;
public static bool kickBoom = true;
public static bool spawnProtect = true;
public static bool rangeChecks = true;
public static int spawnProtectRadius = 5;
public static string distributationAgent = "facepunch";
public static int authToken;
@ -63,6 +64,7 @@ namespace TShockAPI
spawnProtectRadius = cfg.SpawnProtectionRadius;
distributationAgent = cfg.DistributationAgent;
maxSlots = cfg.MaxSlots;
rangeChecks = cfg.RangeChecks;
NPC.maxSpawns = defaultMaxSpawns;
NPC.defaultSpawnRate = defaultSpawnRate;
}
@ -97,6 +99,7 @@ namespace TShockAPI
cfg.SpawnProtection = true;
cfg.SpawnProtectionRadius = 5;
cfg.MaxSlots = maxSlots;
cfg.RangeChecks = rangeChecks;
string json = JsonConvert.SerializeObject(cfg, Formatting.Indented);
TextWriter tr = new StreamWriter(FileTools.SaveDir + "config.json");