From 94838b4ecfd25edf9ce842440339b71c9efe48d0 Mon Sep 17 00:00:00 2001 From: Cai <13110818005@qq.com> Date: Tue, 12 Aug 2025 01:41:10 +0800 Subject: [PATCH 1/5] i18n: Add missing GetString wrapper for `GroupManager` --- TShockAPI/DB/GroupManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TShockAPI/DB/GroupManager.cs b/TShockAPI/DB/GroupManager.cs index 7c8aac4c..4d34098e 100644 --- a/TShockAPI/DB/GroupManager.cs +++ b/TShockAPI/DB/GroupManager.cs @@ -565,7 +565,7 @@ namespace TShockAPI.DB permissions.ForEach(p => group.AddPermission(p)); if (database.Query("UPDATE GroupList SET Commands=@0 WHERE GroupName=@1", group.Permissions, name) == 1) - return "Group " + name + " has been modified successfully."; + return GetString($"Group {name} has been modified successfully."); // Restore old permissions so DB and internal object are in a consistent state group.Permissions = oldperms; @@ -588,7 +588,7 @@ namespace TShockAPI.DB permissions.ForEach(p => group.RemovePermission(p)); if (database.Query("UPDATE GroupList SET Commands=@0 WHERE GroupName=@1", group.Permissions, name) == 1) - return "Group " + name + " has been modified successfully."; + return GetString($"Group {name} has been modified successfully."); // Restore old permissions so DB and internal object are in a consistent state group.Permissions = oldperms; From a867772116d3c5f80347250c48052163214ae581 Mon Sep 17 00:00:00 2001 From: Cardinal System Date: Mon, 25 Aug 2025 16:50:34 +0000 Subject: [PATCH 2/5] =?UTF-8?q?Update=20translation=20template=20=E2=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- i18n/template.pot | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/i18n/template.pot b/i18n/template.pot index a82d89d2..ad722565 100644 --- a/i18n/template.pot +++ b/i18n/template.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: TShock\n" -"POT-Creation-Date: 2025-06-15 18:04:23+0000\n" -"PO-Revision-Date: 2025-06-15 18:04:24+0000\n" +"POT-Creation-Date: 2025-08-25 16:50:33+0000\n" +"PO-Revision-Date: 2025-08-25 16:50:34+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -1476,9 +1476,9 @@ msgid "" "Arguments: send [player] [warp name], hide [warp name] [Enable(true/false)]." msgstr "" +#: ../../TShockAPI/Commands.cs:913 #: ../../TShockAPI/GetDataHandlers.cs:2673 #: ../../TShockAPI/GetDataHandlers.cs:3288 -#: ../../TShockAPI/Commands.cs:913 #, csharp-format msgid "Authenticated as {0} successfully." msgstr "" @@ -3793,6 +3793,12 @@ msgstr "" msgid "Group {0} has been deleted successfully." msgstr "" +#: ../../TShockAPI/DB/GroupManager.cs:568 +#: ../../TShockAPI/DB/GroupManager.cs:591 +#, csharp-format +msgid "Group {0} has been modified successfully." +msgstr "" + #: ../../TShockAPI/DB/GroupManager.cs:501 #, csharp-format msgid "Group {0} has been renamed to {1}." @@ -4034,8 +4040,8 @@ msgstr "" msgid "Incorrect setup code. This incident has been logged." msgstr "" -#: ../../TShockAPI/DB/ProjectileManager.cs:210 #: ../../TShockAPI/DB/TileManager.cs:220 +#: ../../TShockAPI/DB/ProjectileManager.cs:210 #, csharp-format msgid "Infinite group parenting ({0})" msgstr "" @@ -5102,9 +5108,9 @@ msgid "" "token was not valid." msgstr "" -#: ../../TShockAPI/Rest/SecureRest.cs:180 #: ../../TShockAPI/Rest/RestCommand.cs:95 #: ../../TShockAPI/Rest/RestCommand.cs:101 +#: ../../TShockAPI/Rest/SecureRest.cs:180 msgid "Not authorized. The specified API endpoint requires a token." msgstr "" @@ -5440,8 +5446,8 @@ msgstr "" msgid "Reached projectile threshold" msgstr "" -#: ../../TShockAPI/Bouncer.cs:946 #: ../../TShockAPI/TShock.cs:1114 +#: ../../TShockAPI/Bouncer.cs:946 msgid "Reached TileKill threshold." msgstr "" @@ -7372,8 +7378,8 @@ msgstr "" msgid "You do not have permission to modify a Hat Rack in a protected area!" msgstr "" -#: ../../TShockAPI/Handlers/DisplayDollItemSyncHandler.cs:21 #: ../../TShockAPI/Handlers/RequestTileEntityInteractionHandler.cs:28 +#: ../../TShockAPI/Handlers/DisplayDollItemSyncHandler.cs:21 msgid "You do not have permission to modify a Mannequin in a protected area!" msgstr "" From 7c41775d6db3e073b48f9c52886a42c423780357 Mon Sep 17 00:00:00 2001 From: Cai <13110818005@qq.com> Date: Wed, 17 Sep 2025 21:36:30 +0800 Subject: [PATCH 3/5] chore: silent kick on invalid client connection --- TShockAPI/TShock.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 99153deb..d3b01b6d 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -1456,7 +1456,7 @@ namespace TShockAPI if (!tsplr.FinishedHandshake) { - tsplr.Kick(GetString("Your client didn't send the right connection information."), true); + tsplr.Kick(GetString("Your client didn't send the right connection information."), true, true); args.Handled = true; return; } From 0cc0f7733a288d2b83217e8ac741945115d9a87e Mon Sep 17 00:00:00 2001 From: Cai <13110818005@qq.com> Date: Fri, 26 Sep 2025 23:28:00 +0800 Subject: [PATCH 4/5] fix: allow evil grass to grow during world generation even when `Allow...Creep` is false --- TShockAPI/TShock.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 99153deb..538e5ba4 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -1263,6 +1263,11 @@ namespace TShockAPI /// True if allowed, otherwise false private bool OnCreep(int tileType) { + if (WorldGen.generatingWorld) + { + return true; + } + if (!Config.Settings.AllowCrimsonCreep && (tileType == TileID.Dirt || tileType == TileID.CrimsonGrass || TileID.Sets.Crimson[tileType])) { From e6f3013a764ae19faa28cd3581aebc509e2c1bb1 Mon Sep 17 00:00:00 2001 From: Cai <13110818005@qq.com> Date: Sat, 17 Jan 2026 20:41:09 +0800 Subject: [PATCH 5/5] fix: ignore `respawnTimer` when players are spawning into the world * Players who die in single-player mode without respawning should not be marked as Dead on the SSC server. * In my tests, only the SSC server receives a non-zero `respawnTimer`. Therefore, this may be a client-side bug. closed: #3151 --- TShockAPI/GetDataHandlers.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 6ed0f8de..a21fe55f 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -2734,8 +2734,11 @@ namespace TShockAPI if (OnPlayerSpawn(args.Player, args.Data, player, spawnX, spawnY, respawnTimer, numberOfDeathsPVE, numberOfDeathsPVP, context)) return true; - - args.Player.Dead = respawnTimer > 0; + + if (!Main.ServerSideCharacter || context != PlayerSpawnContext.SpawningIntoWorld) + { + args.Player.Dead = respawnTimer > 0; + } if (Main.ServerSideCharacter) {