Merge branch 'master' into general-devel
Conflicts: TShockAPI/ConfigurationManager.cs TShockAPI/TShock.cs
This commit is contained in:
commit
30a200b6e0
5 changed files with 28 additions and 14 deletions
|
|
@ -421,18 +421,18 @@ namespace TShockAPI
|
||||||
public static void MaxSpawns(CommandArgs args)
|
public static void MaxSpawns(CommandArgs args)
|
||||||
{
|
{
|
||||||
int ply = args.PlayerID;
|
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);
|
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);
|
Tools.Broadcast(Tools.FindPlayer(ply) + " changed the maximum spawns to: " + amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SpawnRate(CommandArgs args)
|
public static void SpawnRate(CommandArgs args)
|
||||||
{
|
{
|
||||||
int ply = args.PlayerID;
|
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);
|
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);
|
Tools.Broadcast(Tools.FindPlayer(ply) + " changed the spawn rate to: " + amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,10 +62,16 @@ namespace TShockAPI
|
||||||
kickBoom = cfg.KickExplosives;
|
kickBoom = cfg.KickExplosives;
|
||||||
spawnProtect = cfg.SpawnProtection;
|
spawnProtect = cfg.SpawnProtection;
|
||||||
spawnProtectRadius = cfg.SpawnProtectionRadius;
|
spawnProtectRadius = cfg.SpawnProtectionRadius;
|
||||||
|
Terraria.NPC.maxSpawns = defaultMaxSpawns;
|
||||||
|
Terraria.NPC.defaultSpawnRate = defaultSpawnRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void WriteJsonConfiguration()
|
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"))
|
if (System.IO.File.Exists(FileTools.SaveDir + "config.json"))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ namespace TShockAPI
|
||||||
|
|
||||||
String text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture) + " - " + caller + message;
|
String text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture) + " - " + caller + message;
|
||||||
|
|
||||||
Console.WriteLine(text);
|
//Console.WriteLine(text);
|
||||||
|
|
||||||
if (!MayWriteType(level))
|
if (!MayWriteType(level))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ namespace TShockAPI
|
||||||
|
|
||||||
public static string saveDir = "./tshock/";
|
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;
|
public static bool shownVersion = false;
|
||||||
|
|
||||||
|
|
@ -103,6 +103,14 @@ namespace TShockAPI
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
FileTools.SetupConfig();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine(ex.ToString());
|
||||||
|
}
|
||||||
Log.Initialize(FileTools.SaveDir + "log.txt", LogLevel.All, true);
|
Log.Initialize(FileTools.SaveDir + "log.txt", LogLevel.All, true);
|
||||||
Log.Info("Starting...");
|
Log.Info("Starting...");
|
||||||
GameHooks.OnPreInitialize += OnPreInit;
|
GameHooks.OnPreInitialize += OnPreInit;
|
||||||
|
|
@ -364,8 +372,11 @@ namespace TShockAPI
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
<<<<<<< HEAD
|
||||||
else if (e.MsgID == 0x22) // Client only KillTile
|
else if (e.MsgID == 0x22) // Client only KillTile
|
||||||
e.Handled = true; // Client only uses it for chests, but sends regular 17 as well.
|
e.Handled = true; // Client only uses it for chests, but sends regular 17 as well.
|
||||||
|
=======
|
||||||
|
>>>>>>> master
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
@ -473,14 +484,6 @@ namespace TShockAPI
|
||||||
|
|
||||||
void OnPreInit()
|
void OnPreInit()
|
||||||
{
|
{
|
||||||
try
|
|
||||||
{
|
|
||||||
FileTools.SetupConfig();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Console.WriteLine(ex.ToString());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnPostInit()
|
void OnPostInit()
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,11 @@
|
||||||
For the full list of changes, please take a look at GitHub:
|
For the full list of changes, please take a look at GitHub:
|
||||||
https://github.com/TShock/TShock/commits/master
|
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:
|
Changes in API release 1.5.0.1:
|
||||||
- Fixed cheat detection
|
- Fixed cheat detection
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue