From 131923043a3a0d9e85aee7b1e356b773972259bf Mon Sep 17 00:00:00 2001 From: ertugrul kutluer Date: Wed, 14 Oct 2026 16:31:44 +0300 Subject: [PATCH] fix(parser): strip apostrophes from queue names Queue building names were only stripped of spaces, so "Hero's Mansion" became "Hero'sMansion" and failed to parse as BuildingEnums.HerosMansion, stopping the bot with "Cannot parse Hero'sMansion. Is language English ?". Strip straight and typographic apostrophes too. Co-Authored-By: Claude Opus 5.5 --- MainCore/Parsers/BuildingLayoutParser.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MainCore/Parsers/BuildingLayoutParser.cs b/MainCore/Parsers/BuildingLayoutParser.cs index 2b9940d1..b947d485 100644 --- a/MainCore/Parsers/BuildingLayoutParser.cs +++ b/MainCore/Parsers/BuildingLayoutParser.cs @@ -141,7 +141,8 @@ public static async Task> GetQueueBuilding(IPage page) foreach (var raw in rawQueueData) { - string cleanedType = (raw.TypeName ?? "").Replace(" ", ""); + // "Hero's Mansion" -> "HerosMansion" to match BuildingEnums + string cleanedType = (raw.TypeName ?? "").Replace(" ", "").Replace("'", "").Replace("’", ""); var levelMatch = LevelExtractor().Match(raw.LevelText ?? ""); int level = levelMatch.Success && int.TryParse(levelMatch.Value, out var l) ? l : 0;