Added spawn protection radius to config.

This commit is contained in:
Deathmax 2011-06-04 14:25:47 +08:00
parent 48ea956724
commit b9ff874351
3 changed files with 5 additions and 1 deletions

View file

@ -30,6 +30,7 @@ namespace TShockAPI
public static bool banBoom = true;
public static bool kickBoom = true;
public static bool spawnProtect = true;
public static int spawnProtectRadius = 5;
public enum NPCList : int
{
@ -60,6 +61,7 @@ namespace TShockAPI
banBoom = cfg.BanExplosives;
kickBoom = cfg.KickExplosives;
spawnProtect = cfg.SpawnProtection;
spawnProtectRadius = cfg.SpawnProtectionRadius;
}
public static void WriteJsonConfiguration()
@ -90,6 +92,7 @@ namespace TShockAPI
cfg.BanExplosives = true;
cfg.KickExplosives = true;
cfg.SpawnProtection = true;
cfg.SpawnProtectionRadius = 5;
string json = JsonConvert.SerializeObject(cfg, Formatting.Indented);
TextWriter tr = new StreamWriter(FileTools.SaveDir + "config.json");