Merge branch 'general-devel' into general-devel
This commit is contained in:
commit
7e08b9a8d0
3 changed files with 39 additions and 11 deletions
|
|
@ -18,7 +18,7 @@ Note: This includes the API by default. If you need only the API, you need to cd
|
|||
- Run ```msbuild TShock.sln``` in the root of the cloned folder on Windows in a 'Developer Command Prompt' OR
|
||||
- Run ```xbuild TShock.sln``` in the root of the cloned folder on Unix.
|
||||
|
||||
Need help? Drop by Slack and we'll be happy to explain it with more words, step by step.
|
||||
Need help? Drop by Discord and we'll be happy to explain it with more words, step by step.
|
||||
|
||||
### TShock Additions
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ If something is better suited to be a plugin for TShock, rather than a TShock co
|
|||
|
||||
_If you are confused, make a suggestion. We will determine scope and relevance for you._
|
||||
|
||||
_If a person makes a suggestion in Slack, capture the suggestion as a Github issue. If a suggestion crops up on the forums, make a Github issue to capture it. If you want, direct the user to make a suggestion on Github, but set an alarm/timer/reminder so that if they don't know how to use Github or they don't have an account, an issue is still made and discussed. Make it clear that the issue is a surrogate issue for a suggestion from Slack/the forums too._
|
||||
_If a person makes a suggestion in Discord, capture the suggestion as a Github issue. If a suggestion crops up on the forums, make a Github issue to capture it. If you want, direct the user to make a suggestion on Github, but set an alarm/timer/reminder so that if they don't know how to use Github or they don't have an account, an issue is still made and discussed. Make it clear that the issue is a surrogate issue for a suggestion from Discord/the forums too._
|
||||
|
||||
### Pull Request Dev Guidelines
|
||||
|
||||
|
|
|
|||
|
|
@ -349,6 +349,7 @@ namespace TShockAPI
|
|||
ServerApi.Hooks.WorldHalloweenCheck.Register(this, OnHalloweenCheck);
|
||||
ServerApi.Hooks.NetNameCollision.Register(this, NetHooks_NameCollision);
|
||||
ServerApi.Hooks.ItemForceIntoChest.Register(this, OnItemForceIntoChest);
|
||||
ServerApi.Hooks.WorldGrassSpread.Register(this, OnWorldGrassSpread);
|
||||
Hooks.PlayerHooks.PlayerPreLogin += OnPlayerPreLogin;
|
||||
Hooks.PlayerHooks.PlayerPostLogin += OnPlayerLogin;
|
||||
Hooks.AccountHooks.AccountDelete += OnAccountDelete;
|
||||
|
|
@ -419,6 +420,7 @@ namespace TShockAPI
|
|||
ServerApi.Hooks.WorldHalloweenCheck.Deregister(this, OnHalloweenCheck);
|
||||
ServerApi.Hooks.NetNameCollision.Deregister(this, NetHooks_NameCollision);
|
||||
ServerApi.Hooks.ItemForceIntoChest.Deregister(this, OnItemForceIntoChest);
|
||||
ServerApi.Hooks.WorldGrassSpread.Deregister(this, OnWorldGrassSpread);
|
||||
TShockAPI.Hooks.PlayerHooks.PlayerPostLogin -= OnPlayerLogin;
|
||||
|
||||
if (File.Exists(Path.Combine(SavePath, "tshock.pid")))
|
||||
|
|
@ -1208,24 +1210,50 @@ namespace TShockAPI
|
|||
if (args.Handled)
|
||||
return;
|
||||
|
||||
if (!Config.AllowCrimsonCreep && (args.Type == TileID.Dirt || args.Type == TileID.FleshWeeds
|
||||
|| TileID.Sets.Crimson[args.Type]))
|
||||
if (!OnCreep(args.Type))
|
||||
{
|
||||
args.Handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>OnWorldGrassSpread - Fired when grass is attempting to spread.</summary>
|
||||
/// <param name="args">args - The GrassSpreadEventArgs object.</param>
|
||||
private void OnWorldGrassSpread(GrassSpreadEventArgs args)
|
||||
{
|
||||
if (args.Handled)
|
||||
return;
|
||||
|
||||
if(!OnCreep(args.Grass))
|
||||
{
|
||||
args.Handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the tile type is allowed to creep
|
||||
/// </summary>
|
||||
/// <param name="tileType">Tile id</param>
|
||||
/// <returns>True if allowed, otherwise false</returns>
|
||||
private bool OnCreep(int tileType)
|
||||
{
|
||||
if (!Config.AllowCrimsonCreep && (tileType == TileID.Dirt || tileType == TileID.FleshWeeds
|
||||
|| TileID.Sets.Crimson[tileType]))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!Config.AllowCorruptionCreep && (args.Type == TileID.Dirt || args.Type == TileID.CorruptThorns
|
||||
|| TileID.Sets.Corrupt[args.Type]))
|
||||
if (!Config.AllowCorruptionCreep && (tileType == TileID.Dirt || tileType == TileID.CorruptThorns
|
||||
|| TileID.Sets.Corrupt[tileType]))
|
||||
{
|
||||
args.Handled = true;
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!Config.AllowHallowCreep && (TileID.Sets.Hallow[args.Type]))
|
||||
if (!Config.AllowHallowCreep && (TileID.Sets.Hallow[tileType]))
|
||||
{
|
||||
args.Handled = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>OnStatueSpawn - Fired when a statue spawns.</summary>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit a9d1b0e4e096ecbd0b2033ce4ff636759c9448c3
|
||||
Subproject commit d3b7d9f4575602f468cf1e009ebc4bc5b79547c4
|
||||
Loading…
Add table
Add a link
Reference in a new issue