Skip to content

Commit

Permalink
Initial OTAPI3 port
Browse files Browse the repository at this point in the history
TODO: sqlite
  • Loading branch information
SignatureBeef committed Nov 23, 2021
1 parent e303071 commit 8edd039
Show file tree
Hide file tree
Showing 15 changed files with 86 additions and 359 deletions.
62 changes: 25 additions & 37 deletions TShock.sln
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio Version 17
VisualStudioVersion = 17.0.31825.309
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{755F5B05-0924-47E9-9563-26EB20FE3F67}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TShockAPI", "TShockAPI\TShockAPI.csproj", "{49606449-072B-4CF5-8088-AA49DA586694}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TShockAPI", "TShockAPI\TShockAPI.csproj", "{49606449-072B-4CF5-8088-AA49DA586694}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TerrariaServerAPI", "TerrariaServerAPI\TerrariaServerAPI\TerrariaServerAPI.csproj", "{6877506E-ADC6-4142-98A6-79E4FA02855A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TerrariaServerAPI", "TerrariaServerAPI\TerrariaServerAPI\TerrariaServerAPI.csproj", "{6877506E-ADC6-4142-98A6-79E4FA02855A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Mono|Any CPU = Mono|Any CPU
Mono|Mixed Platforms = Mono|Mixed Platforms
Mono|x64 = Mono|x64
Mono|x86 = Mono|x86
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|x64 = Release|x64
Expand All @@ -32,46 +28,38 @@ Global
{49606449-072B-4CF5-8088-AA49DA586694}.Debug|x64.ActiveCfg = Debug|Any CPU
{49606449-072B-4CF5-8088-AA49DA586694}.Debug|x64.Build.0 = Debug|Any CPU
{49606449-072B-4CF5-8088-AA49DA586694}.Debug|x86.ActiveCfg = Debug|Any CPU
{49606449-072B-4CF5-8088-AA49DA586694}.Mono|Any CPU.ActiveCfg = Release|Any CPU
{49606449-072B-4CF5-8088-AA49DA586694}.Mono|Any CPU.Build.0 = Release|Any CPU
{49606449-072B-4CF5-8088-AA49DA586694}.Mono|Mixed Platforms.ActiveCfg = Release|Any CPU
{49606449-072B-4CF5-8088-AA49DA586694}.Mono|Mixed Platforms.Build.0 = Release|Any CPU
{49606449-072B-4CF5-8088-AA49DA586694}.Mono|x64.ActiveCfg = Release|Any CPU
{49606449-072B-4CF5-8088-AA49DA586694}.Mono|x64.Build.0 = Release|Any CPU
{49606449-072B-4CF5-8088-AA49DA586694}.Mono|x86.ActiveCfg = Release|Any CPU
{49606449-072B-4CF5-8088-AA49DA586694}.Mono|x86.Build.0 = Release|Any CPU
{49606449-072B-4CF5-8088-AA49DA586694}.Debug|x86.Build.0 = Debug|Any CPU
{49606449-072B-4CF5-8088-AA49DA586694}.Release|Any CPU.ActiveCfg = Release|Any CPU
{49606449-072B-4CF5-8088-AA49DA586694}.Release|Any CPU.Build.0 = Release|Any CPU
{49606449-072B-4CF5-8088-AA49DA586694}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{49606449-072B-4CF5-8088-AA49DA586694}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{49606449-072B-4CF5-8088-AA49DA586694}.Release|x64.ActiveCfg = Release|Any CPU
{49606449-072B-4CF5-8088-AA49DA586694}.Release|x64.Build.0 = Release|Any CPU
{49606449-072B-4CF5-8088-AA49DA586694}.Release|x86.ActiveCfg = Release|Any CPU
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Debug|Any CPU.ActiveCfg = Debug|x86
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Debug|Mixed Platforms.Build.0 = Debug|x86
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Debug|x64.ActiveCfg = Debug|x64
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Debug|x64.Build.0 = Debug|x64
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Debug|x86.ActiveCfg = Debug|x86
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Debug|x86.Build.0 = Debug|x86
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Mono|Any CPU.ActiveCfg = Mono|x86
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Mono|Mixed Platforms.ActiveCfg = Mono|x86
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Mono|Mixed Platforms.Build.0 = Mono|x86
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Mono|x64.ActiveCfg = Mono|x64
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Mono|x64.Build.0 = Mono|x64
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Mono|x86.ActiveCfg = Mono|x86
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Mono|x86.Build.0 = Mono|x86
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Release|Any CPU.ActiveCfg = Release|x86
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Release|Mixed Platforms.ActiveCfg = Release|x86
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Release|Mixed Platforms.Build.0 = Release|x86
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Release|x64.ActiveCfg = Release|x64
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Release|x64.Build.0 = Release|x64
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Release|x86.ActiveCfg = Release|x86
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Release|x86.Build.0 = Release|x86
{49606449-072B-4CF5-8088-AA49DA586694}.Release|x86.Build.0 = Release|Any CPU
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Debug|x64.ActiveCfg = Debug|Any CPU
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Debug|x64.Build.0 = Debug|Any CPU
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Debug|x86.ActiveCfg = Debug|Any CPU
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Debug|x86.Build.0 = Debug|Any CPU
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Release|Any CPU.Build.0 = Release|Any CPU
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Release|x64.ActiveCfg = Release|Any CPU
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Release|x64.Build.0 = Release|Any CPU
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Release|x86.ActiveCfg = Release|Any CPU
{6877506E-ADC6-4142-98A6-79E4FA02855A}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B56F0765-BADD-48CF-8A19-436BD0EAD34A}
EndGlobalSection
GlobalSection(TestCaseManagementSettings) = postSolution
CategoryFile = Terraria.vsmdi
EndGlobalSection
Expand Down
1 change: 0 additions & 1 deletion TShockAPI/Bouncer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ You should have received a copy of the GNU General Public License
using TShockAPI.Net;
using Terraria;
using Microsoft.Xna.Framework;
using OTAPI.Tile;
using TShockAPI.Localization;
using static TShockAPI.GetDataHandlers;
using Terraria.ObjectData;
Expand Down
1 change: 0 additions & 1 deletion TShockAPI/Commands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ You should have received a copy of the GNU General Public License
using TShockAPI.Hooks;
using Terraria.GameContent.Events;
using Microsoft.Xna.Framework;
using OTAPI.Tile;
using TShockAPI.Localization;
using System.Text.RegularExpressions;
using Terraria.DataStructures;
Expand Down
1 change: 0 additions & 1 deletion TShockAPI/GetDataHandlers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ You should have received a copy of the GNU General Public License
using Terraria.GameContent.Tile_Entities;
using Terraria.Localization;
using Microsoft.Xna.Framework;
using OTAPI.Tile;
using TShockAPI.Localization;
using TShockAPI.Models;
using TShockAPI.Models.PlayerUpdate;
Expand Down
4 changes: 1 addition & 3 deletions TShockAPI/Handlers/SendTileRectHandler.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using OTAPI.Tile;

using System;
using System;
using System.Collections.Generic;
using System.Linq;

Expand Down
1 change: 0 additions & 1 deletion TShockAPI/ItemBans.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ You should have received a copy of the GNU General Public License
using TShockAPI.Net;
using Terraria;
using Microsoft.Xna.Framework;
using OTAPI.Tile;
using TShockAPI.Localization;
using static TShockAPI.GetDataHandlers;
using TerrariaApi.Server;
Expand Down
57 changes: 0 additions & 57 deletions TShockAPI/Properties/AssemblyInfo.cs

This file was deleted.

1 change: 0 additions & 1 deletion TShockAPI/TSPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ You should have received a copy of the GNU General Public License
using System.Text;
using System.Threading;
using System.Timers;
using OTAPI.Tile;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
Expand Down
1 change: 0 additions & 1 deletion TShockAPI/TSServerPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License
*/

using Microsoft.Xna.Framework;
using OTAPI.Tile;
using System;
using System.Collections.Generic;
using Terraria;
Expand Down
11 changes: 4 additions & 7 deletions TShockAPI/TShock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,17 +197,14 @@ public override void Initialize()
string logFilename;
string logPathSetupWarning;

OTAPI.Hooks.Net.Socket.Create = () =>
OTAPI.Hooks.Netplay.CreateTcpListener += (sender, args) =>
{
//Console.WriteLine($"Creating socket {nameof(LinuxTcpSocket)}");
return new LinuxTcpSocket();
//return new OTAPI.Sockets.PoolSocket();
//return new Terraria.Net.Sockets.TcpSocket();
args.Result = new LinuxTcpSocket();
};
OTAPI.Hooks.Player.Announce = (int playerId) =>
OTAPI.Hooks.NetMessage.PlayerAnnounce += (sender, args) =>
{
//TShock handles this
return OTAPI.HookResult.Cancel;
args.Result = OTAPI.HookResult.Cancel;
};

Main.SettingsUnlock_WorldEvil = true;
Expand Down
Loading

0 comments on commit 8edd039

Please sign in to comment.