Merge branch 'master' into general-devel

Conflicts:
	TShockAPI/ConfigurationManager.cs
	TShockAPI/TShock.cs
This commit is contained in:
Shank 2011-06-04 21:36:11 -06:00
commit 30a200b6e0
5 changed files with 28 additions and 14 deletions

View file

@ -421,18 +421,18 @@ namespace TShockAPI
public static void MaxSpawns(CommandArgs args)
{
int ply = args.PlayerID;
int amount = 4;//Convert.ToInt32(args.Message.Remove(0, 10));
int amount = Convert.ToInt32(args.Message.Remove(0, 10));
int.TryParse(args.Message.Remove(0, 10), out amount);
NPC.maxSpawns = amount;
NPC.defaultSpawnRate = amount;
Tools.Broadcast(Tools.FindPlayer(ply) + " changed the maximum spawns to: " + amount);
}
public static void SpawnRate(CommandArgs args)
{
int ply = args.PlayerID;
int amount = 700;//Convert.ToInt32(args.Message.Remove(0, 10));
int amount = Convert.ToInt32(args.Message.Remove(0, 10));
int.TryParse(args.Message.Remove(0, 10), out amount);
NPC.spawnRate = amount;
NPC.defaultSpawnRate = amount;
Tools.Broadcast(Tools.FindPlayer(ply) + " changed the spawn rate to: " + amount);
}

View file

@ -62,10 +62,16 @@ namespace TShockAPI
kickBoom = cfg.KickExplosives;
spawnProtect = cfg.SpawnProtection;
spawnProtectRadius = cfg.SpawnProtectionRadius;
Terraria.NPC.maxSpawns = defaultMaxSpawns;
Terraria.NPC.defaultSpawnRate = defaultSpawnRate;
}
public static void WriteJsonConfiguration()
{
if (!System.IO.Directory.Exists(FileTools.SaveDir))
{
System.IO.Directory.CreateDirectory(FileTools.SaveDir);
}
if (System.IO.File.Exists(FileTools.SaveDir + "config.json"))
{
return;

View file

@ -84,7 +84,7 @@ namespace TShockAPI
String text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture) + " - " + caller + message;
Console.WriteLine(text);
//Console.WriteLine(text);
if (!MayWriteType(level))
{

View file

@ -15,7 +15,7 @@ namespace TShockAPI
public static string saveDir = "./tshock/";
public static Version VersionNum = new Version(1, 5, 0, 1);
public static Version VersionNum = new Version(1, 6, 0, 0);
public static bool shownVersion = false;
@ -103,6 +103,14 @@ namespace TShockAPI
public override void Initialize()
{
try
{
FileTools.SetupConfig();
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
Log.Initialize(FileTools.SaveDir + "log.txt", LogLevel.All, true);
Log.Info("Starting...");
GameHooks.OnPreInitialize += OnPreInit;
@ -364,8 +372,11 @@ namespace TShockAPI
}
}
}
<<<<<<< HEAD
else if (e.MsgID == 0x22) // Client only KillTile
e.Handled = true; // Client only uses it for chests, but sends regular 17 as well.
=======
>>>>>>> master
}
catch (Exception ex)
{
@ -473,14 +484,6 @@ namespace TShockAPI
void OnPreInit()
{
try
{
FileTools.SetupConfig();
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
}
void OnPostInit()

View file

@ -1,6 +1,11 @@
For the full list of changes, please take a look at GitHub:
https://github.com/TShock/TShock/commits/master
Changes in API release 1.6.0.0:
- Added spawn protection
- Fixed numerous bugs
- Added a few commands
Changes in API release 1.5.0.1:
- Fixed cheat detection