From fa6b5845f031bc5618359c1795ff612e903e0d7c Mon Sep 17 00:00:00 2001 From: Zt Wang Date: Wed, 15 Feb 2017 18:42:53 +0800 Subject: [PATCH] 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 {