Add DisableTombstones
This commit is contained in:
parent
77b9fcaf98
commit
28c4f9ed9c
3 changed files with 13 additions and 2 deletions
|
|
@ -199,6 +199,9 @@ namespace TShockAPI
|
||||||
[Description("This is the port which the rest api will listen on.")]
|
[Description("This is the port which the rest api will listen on.")]
|
||||||
public int RestApiPort = 7878;
|
public int RestApiPort = 7878;
|
||||||
|
|
||||||
|
[Description("Disable tombstones for all players.")]
|
||||||
|
public bool DisableTombstones = true;
|
||||||
|
|
||||||
public static ConfigFile Read(string path)
|
public static ConfigFile Read(string path)
|
||||||
{
|
{
|
||||||
if (!File.Exists(path))
|
if (!File.Exists(path))
|
||||||
|
|
|
||||||
|
|
@ -36,5 +36,5 @@ using System.Runtime.InteropServices;
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
|
||||||
|
|
||||||
[assembly: AssemblyVersion("3.3.4.1203")]
|
[assembly: AssemblyVersion("3.3.4.1204")]
|
||||||
[assembly: AssemblyFileVersion("3.3.4.1203")]
|
[assembly: AssemblyFileVersion("3.3.4.1204")]
|
||||||
|
|
|
||||||
|
|
@ -195,6 +195,7 @@ namespace TShockAPI
|
||||||
NetHooks.SendData += NetHooks_SendData;
|
NetHooks.SendData += NetHooks_SendData;
|
||||||
NetHooks.GreetPlayer += OnGreetPlayer;
|
NetHooks.GreetPlayer += OnGreetPlayer;
|
||||||
NpcHooks.StrikeNpc += NpcHooks_OnStrikeNpc;
|
NpcHooks.StrikeNpc += NpcHooks_OnStrikeNpc;
|
||||||
|
ProjectileHooks.SetDefaults += OnProjectileSetDefaults;
|
||||||
|
|
||||||
GetDataHandlers.InitGetDataHandler();
|
GetDataHandlers.InitGetDataHandler();
|
||||||
Commands.InitCommands();
|
Commands.InitCommands();
|
||||||
|
|
@ -707,6 +708,13 @@ namespace TShockAPI
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OnProjectileSetDefaults(SetDefaultsEventArgs<Projectile, int> e)
|
||||||
|
{
|
||||||
|
if (e.Info == 43)
|
||||||
|
if (Config.DisableTombstones)
|
||||||
|
e.Object.SetDefaults(0);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Send bytes to client using packetbuffering if available
|
/// Send bytes to client using packetbuffering if available
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue