From fa6b5845f031bc5618359c1795ff612e903e0d7c Mon Sep 17 00:00:00 2001 From: Zt Wang Date: Wed, 15 Feb 2017 18:42:53 +0800 Subject: [PATCH 1/3] Add Evil Type option during world creation --- TShockAPI/TShock.cs | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 46835113..7a9ea983 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -185,20 +185,24 @@ namespace TShockAPI string logFilename; string logPathSetupWarning; - OTAPI.Hooks.Net.Socket.Create = () => - { - //Console.WriteLine($"Creating socket {nameof(LinuxTcpSocket)}"); - return new LinuxTcpSocket(); - //return new OTAPI.Sockets.PoolSocket(); - //return new Terraria.Net.Sockets.TcpSocket(); - }; - OTAPI.Hooks.Player.Announce = (int playerId) => - { - //TShock handles this - return OTAPI.HookResult.Cancel; - }; + OTAPI.Hooks.Net.Socket.Create = () => + { + //Console.WriteLine($"Creating socket {nameof(LinuxTcpSocket)}"); + return new LinuxTcpSocket(); + //return new OTAPI.Sockets.PoolSocket(); + //return new Terraria.Net.Sockets.TcpSocket(); + }; + OTAPI.Hooks.Player.Announce = (int playerId) => + { + //TShock handles this + return OTAPI.HookResult.Cancel; + }; + OTAPI.Hooks.Game.PostInitialize += () => + { + Main.SettingsUnlock_WorldEvil = true; + }; - TerrariaApi.Reporting.CrashReporter.HeapshotRequesting += CrashReporter_HeapshotRequesting; + TerrariaApi.Reporting.CrashReporter.HeapshotRequesting += CrashReporter_HeapshotRequesting; try { From 6446cdc2b634b161e78302f6128b7a536e2d0da2 Mon Sep 17 00:00:00 2001 From: Zt Wang Date: Wed, 15 Feb 2017 21:13:20 +0800 Subject: [PATCH 2/3] Remove redundant codes --- TShockAPI/TShock.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 7a9ea983..481cb903 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -197,10 +197,8 @@ namespace TShockAPI //TShock handles this return OTAPI.HookResult.Cancel; }; - OTAPI.Hooks.Game.PostInitialize += () => - { - Main.SettingsUnlock_WorldEvil = true; - }; + + Main.SettingsUnlock_WorldEvil = true; TerrariaApi.Reporting.CrashReporter.HeapshotRequesting += CrashReporter_HeapshotRequesting; From 74f98ff555b96b0c921cff35f4a7479a716a54aa Mon Sep 17 00:00:00 2001 From: Zt Wang Date: Thu, 16 Feb 2017 12:33:33 +0800 Subject: [PATCH 3/3] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c101ba5e..8669a5d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when adding new entries; sign your name off when you add or change something. This should primarily be things like user changes, not necessarily codebase changes unless it's really relevant or large. ## Upcoming Changes +* Added evil type option during world creation (@mistzzt) ## TShock 4.3.22 * Compatibility with Terraria 1.3.4.4