Added Region class with a few overloads and IsProtectedArea
This commit is contained in:
parent
18ee7eccab
commit
1b858be7a9
3 changed files with 7 additions and 5 deletions
|
|
@ -21,6 +21,7 @@ using System.IO;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using TerrariaAPI;
|
using TerrariaAPI;
|
||||||
|
using TShockAPI.DB;
|
||||||
using TShockAPI.Net;
|
using TShockAPI.Net;
|
||||||
|
|
||||||
namespace TShockAPI
|
namespace TShockAPI
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ namespace TShockAPI
|
||||||
public class TShock : TerrariaPlugin
|
public class TShock : TerrariaPlugin
|
||||||
{
|
{
|
||||||
public static readonly Version VersionNum = Assembly.GetExecutingAssembly().GetName().Version;
|
public static readonly Version VersionNum = Assembly.GetExecutingAssembly().GetName().Version;
|
||||||
public static readonly string VersionCodename = "Skanky Hacker: The Deathly Database Part 2";
|
public static readonly string VersionCodename = "The Deathly Database Part 2";
|
||||||
|
|
||||||
public static string SavePath = "tshock";
|
public static string SavePath = "tshock";
|
||||||
|
|
||||||
|
|
@ -66,7 +66,7 @@ namespace TShockAPI
|
||||||
|
|
||||||
public static IDbConnection DB;
|
public static IDbConnection DB;
|
||||||
|
|
||||||
public static Process p;
|
public static Process TShockProcess;
|
||||||
public static bool OverridePort = false;
|
public static bool OverridePort = false;
|
||||||
|
|
||||||
public override Version Version
|
public override Version Version
|
||||||
|
|
@ -108,8 +108,8 @@ namespace TShockAPI
|
||||||
File.Delete(Path.Combine(SavePath, "tshock.pid"));
|
File.Delete(Path.Combine(SavePath, "tshock.pid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
p = Process.GetCurrentProcess();
|
TShockProcess = Process.GetCurrentProcess();
|
||||||
int pid = p.Id;
|
int pid = TShockProcess.Id;
|
||||||
TextWriter tw = new StreamWriter(Path.Combine(SavePath, "tshock.pid"));
|
TextWriter tw = new StreamWriter(Path.Combine(SavePath, "tshock.pid"));
|
||||||
tw.Write(pid);
|
tw.Write(pid);
|
||||||
tw.Close();
|
tw.Close();
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,7 @@
|
||||||
<Compile Include="Net\WorldInfoMsg.cs" />
|
<Compile Include="Net\WorldInfoMsg.cs" />
|
||||||
<Compile Include="DB\RegionManager.cs" />
|
<Compile Include="DB\RegionManager.cs" />
|
||||||
<Compile Include="RconHandler.cs" />
|
<Compile Include="RconHandler.cs" />
|
||||||
|
<Compile Include="Region.cs" />
|
||||||
<Compile Include="RememberPosManager.cs" />
|
<Compile Include="RememberPosManager.cs" />
|
||||||
<Compile Include="Resources.Designer.cs">
|
<Compile Include="Resources.Designer.cs">
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
|
|
@ -162,7 +163,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<VisualStudio>
|
<VisualStudio>
|
||||||
<UserProperties BuildVersion_IncrementBeforeBuild="False" BuildVersion_StartDate="2011/6/17" BuildVersion_BuildVersioningStyle="None.None.None.MonthAndDayStamp" BuildVersion_BuildAction="Both" BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" />
|
<UserProperties BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" BuildVersion_BuildAction="Both" BuildVersion_BuildVersioningStyle="None.None.None.MonthAndDayStamp" BuildVersion_StartDate="2011/6/17" BuildVersion_IncrementBeforeBuild="False" />
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue