From 69569a5be5664430a6ddeb1c377e8ebe96a9dae1 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Fri, 10 Mar 2023 10:37:15 +0900 Subject: [PATCH 1/3] Added obvious warning about spamming github to code of conduct --- .github/CODE_OF_CONDUCT.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index 990b9ed1..a6b7aa40 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -1,3 +1,5 @@ > By participating in the TShock for Terraria community, all members will adhere to maintaining decorum with respect to all humans, in and out of the community. Members will not engage in discussion that inappropriately disparages or marginalizes any group of people or any individual. Members will not attempt to further or advance an agenda to the point of being overbearing or close minded (such as through spreading FUD). Members will not abuse services provided to them and will follow the guidance of community leaders on a situational basis about what abuse consists of. Members will adhere to United States and international law. If members notice a violation of this code of conduct, they will not engage but will instead contact the leadership team on either the forums or Discord. -> Do not attempt to circumvent or bypass the code of conduct by using clever logic or reasoning (e.g., insulting Facepunch members, because they weren't directly mentioned here). \ No newline at end of file +> Do not attempt to circumvent or bypass the code of conduct by using clever logic or reasoning (e.g., insulting Facepunch members, because they weren't directly mentioned here). + +> Do not abuse GitHub services by generating useless emails to all people who watch the repo. This includes unnecessary PR approvals and off-topic discussion, issue, and PR comments that serve no purpose. Due to the high visibility nature of actions that create emails, you may be blocked temporarily as your first warning. From 7b7de04a7f76c42dc72774ec7256e3367bbe4b36 Mon Sep 17 00:00:00 2001 From: James Puleo Date: Mon, 13 Mar 2023 01:43:12 -0400 Subject: [PATCH 2/3] Relax custom death message restrictions to allow Inferno potions in PvP For some reason, Inferno potions do PvP damage without specifying the source player in the `PlayerDeathReason` -- so special-case the only identifying information being the other index value of `16`. --- TShockAPI/Bouncer.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index affa1609..6ff7fd1a 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -2659,9 +2659,12 @@ namespace TShockAPI * If the player was not specified, that is, the player index is -1, then it is definitely a custom cause, as you can only deal damage with a projectile or another player. * This is how everything else works. If an NPC is specified, its value is not -1, which is a custom cause. * + * An exception to this is damage dealt by the Inferno potion to other players -- it is only identified by the other index value of 16, + * even lacking a source player index. + * * Checking whether this damage came from the player is necessary, because the damage from the player can come even when it is hit by a NPC */ - if (TShock.Config.Settings.DisableCustomDeathMessages && id != args.Player.Index && + if (TShock.Config.Settings.DisableCustomDeathMessages && id != args.Player.Index && reason._sourceOtherIndex != 16 && (reason._sourcePlayerIndex == -1 || reason._sourceNPCIndex != -1 || reason._sourceOtherIndex != -1 || reason._sourceCustomReason != null)) { TShock.Log.ConsoleDebug(GetString("Bouncer / OnPlayerDamage rejected custom death message from {0}", args.Player.Name)); From 359fe8caf841e02bd5de54abf7baa57e67e7edcf Mon Sep 17 00:00:00 2001 From: James Puleo Date: Mon, 13 Mar 2023 02:11:03 -0400 Subject: [PATCH 3/3] Update `docs/changelog.md` --- docs/changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog.md b/docs/changelog.md index be96f88c..2f0f20c9 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -106,6 +106,7 @@ Use past tense when adding new entries; sign your name off when you add or chang * Allowed multiple test cases to be in TShock's test suite. (@drunderscore) * Fixed unable to use Purification/Evil Powder in jungle. (@sgkoishi) * Set the `GetDataHandledEventArgs.Player` property for the `SyncTilePicking` data handler. (@drunderscore) +* Relaxed custom death message restrictions to allow Inferno potions in PvP. (@drunderscore) ## TShock 5.1.3 * Added support for Terraria 1.4.4.9 via OTAPI 3.1.20. (@SignatureBeef)