Merge remote branch 'upstream/general-devel' into general-devel
This commit is contained in:
commit
e7889a7951
6 changed files with 18 additions and 10 deletions
|
|
@ -721,7 +721,7 @@ namespace TShockAPI
|
|||
}
|
||||
try
|
||||
{
|
||||
args.Player.SendMessage("IP Address: " + players[0].IP + " Logged In As: " + players[0].UserAccountName + "Group: " + players[0].Group.Name, Color.Green);
|
||||
args.Player.SendMessage("IP Address: " + players[0].IP + " Logged In As: " + players[0].UserAccountName + " Group: " + players[0].Group.Name, Color.Green);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -151,6 +151,8 @@ namespace TShockAPI
|
|||
|
||||
[Description("Enable Server Side Inventory checks, EXPERIMENTAL")] public bool ServerSideInventory;
|
||||
|
||||
[Description("How often SSI should save, in minutes")] public int ServerSideInventorySave = 15;
|
||||
|
||||
[Description("Time, in milliseconds, to disallow discarding items after logging in when ServerSideInventory is ON")] public int LogonDiscardThreshold=250;
|
||||
|
||||
[Description("Disables reporting of playercount to the stat system.")] public bool DisablePlayerCountReporting;
|
||||
|
|
|
|||
|
|
@ -57,6 +57,11 @@ namespace TShockAPI
|
|||
/// </summary>
|
||||
public class TileEditEventArgs : HandledEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// The TSPlayer who made the tile edit
|
||||
/// </summary>
|
||||
public TSPlayer Player { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The tile coordinate on the X plane
|
||||
/// </summary>
|
||||
|
|
@ -82,13 +87,14 @@ namespace TShockAPI
|
|||
/// TileEdit - called when a tile is placed or destroyed
|
||||
/// </summary>
|
||||
public static HandlerList<TileEditEventArgs> TileEdit;
|
||||
private static bool OnTileEdit(int x, int y, byte type, byte editType)
|
||||
private static bool OnTileEdit(TSPlayer ply, int x, int y, byte type, byte editType)
|
||||
{
|
||||
if (TileEdit == null)
|
||||
return false;
|
||||
|
||||
var args = new TileEditEventArgs
|
||||
{
|
||||
Player = ply,
|
||||
X = x,
|
||||
Y = y,
|
||||
Type = type,
|
||||
|
|
@ -1598,7 +1604,7 @@ namespace TShockAPI
|
|||
var tileX = args.Data.ReadInt32();
|
||||
var tileY = args.Data.ReadInt32();
|
||||
var tiletype = args.Data.ReadInt8();
|
||||
if (OnTileEdit(tileX, tileY, tiletype, type))
|
||||
if (OnTileEdit(args.Player, tileX, tileY, tiletype, type))
|
||||
return true;
|
||||
if (tileX < 0 || tileX >= Main.maxTilesX || tileY < 0 || tileY >= Main.maxTilesY)
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -196,15 +196,15 @@ namespace TShockAPI
|
|||
}
|
||||
catch (ObjectDisposedException e)
|
||||
{
|
||||
Log.Error(e.ToString());
|
||||
Log.Warn(e.ToString());
|
||||
}
|
||||
catch (SocketException e)
|
||||
{
|
||||
Log.Error(e.ToString());
|
||||
Log.Warn(e.ToString());
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
Log.Error(e.ToString());
|
||||
Log.Warn(e.ToString());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -446,7 +446,7 @@ namespace TShockAPI
|
|||
LastCheck = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
if ((DateTime.UtcNow - LastSave).TotalMinutes >= 15)
|
||||
if ((DateTime.UtcNow - LastSave).TotalMinutes >= Config.ServerSideInventorySave)
|
||||
{
|
||||
foreach (TSPlayer player in Players)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -32,12 +32,12 @@
|
|||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\Tshock Debug\ServerPlugins\</OutputPath>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DocumentationFile>..\..\..\Tshock Debug\ServerPlugins\TShockAPI.XML</DocumentationFile>
|
||||
<DocumentationFile>bin\Debug\TShockAPI.XML</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
|
|
@ -187,7 +187,7 @@
|
|||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<UserProperties BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" BuildVersion_BuildAction="Both" BuildVersion_BuildVersioningStyle="None.None.None.MonthAndDayStamp" BuildVersion_StartDate="2011/6/17" BuildVersion_IncrementBeforeBuild="False" />
|
||||
<UserProperties BuildVersion_IncrementBeforeBuild="False" BuildVersion_StartDate="2011/6/17" BuildVersion_BuildVersioningStyle="None.None.None.MonthAndDayStamp" BuildVersion_BuildAction="Both" BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<!-- 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