From c2c48930bbd1923bcebcd3c74029d504ab4a8f07 Mon Sep 17 00:00:00 2001 From: Niko233 <139348239+NikoCat233@users.noreply.github.com> Date: Thu, 16 Jan 2025 04:21:46 +0800 Subject: [PATCH] Fix wrong strings after utf8 purge --- Patches/IntroPatch.cs | 2 +- Patches/OutroPatch.cs | 6 +++--- Patches/PlayerJoinAndLeftPatch.cs | 4 ++-- Roles/Crewmate/Marshall.cs | 2 +- Roles/Crewmate/Snitch.cs | 6 +++--- Roles/Crewmate/Telecommunication.cs | 8 ++++---- Roles/Impostor/Consigliere.cs | 2 +- Roles/Impostor/Deathpact.cs | 2 +- Roles/Impostor/EvilHacker.cs | 2 +- Roles/Impostor/EvilTracker.cs | 4 ++-- Roles/Neutral/Berserker.cs | 2 +- Roles/Neutral/Executioner.cs | 2 +- Roles/Neutral/Follower.cs | 4 ++-- Roles/Neutral/Lawyer.cs | 4 ++-- Roles/Neutral/PlagueBearer.cs | 4 ++-- Roles/Neutral/Shroud.cs | 2 +- 16 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Patches/IntroPatch.cs b/Patches/IntroPatch.cs index eed75cad0..d789ad969 100644 --- a/Patches/IntroPatch.cs +++ b/Patches/IntroPatch.cs @@ -288,7 +288,7 @@ private static System.Collections.IEnumerator CoLoggerGameInfo() foreach (OptionItem o in OptionItem.AllOptions) { if (!o.IsHiddenOn(Options.CurrentGameMode) && (o.Parent?.GetBool() ?? !o.GetString().Equals("0%"))) - sb.Append($"{(o.Parent == null ? o.GetName(true, true).RemoveHtmlTags().PadRightV2(40) : $"â”— {o.GetName(true, true).RemoveHtmlTags()}".PadRightV2(41))}:{o.GetString().RemoveHtmlTags()}\n"); + sb.Append($"{(o.Parent == null ? o.GetName(true, true).RemoveHtmlTags().PadRightV2(40) : $"┗ {o.GetName(true, true).RemoveHtmlTags()}".PadRightV2(41))}:{o.GetString().RemoveHtmlTags()}\n"); } yield return null; diff --git a/Patches/OutroPatch.cs b/Patches/OutroPatch.cs index 49d818d34..0171a91ae 100644 --- a/Patches/OutroPatch.cs +++ b/Patches/OutroPatch.cs @@ -92,7 +92,7 @@ public static void Postfix(AmongUsClient __instance, [HarmonyArgument(0)] ref En var targetId = kvp.Key; sb.Append($"\n{date:T} {Main.AllPlayerNames[targetId]}({(Options.CurrentGameMode == CustomGameMode.FFA ? string.Empty : Utils.GetDisplayRoleAndSubName(targetId, targetId, true))}{(Options.CurrentGameMode == CustomGameMode.FFA ? string.Empty : Utils.GetSubRolesText(targetId, summary: true))}) [{Utils.GetVitalText(kvp.Key)}]"); if (killerId != byte.MaxValue && killerId != targetId) - sb.Append($"\n\tÔçÉ {Main.AllPlayerNames[killerId]}({(Options.CurrentGameMode == CustomGameMode.FFA ? string.Empty : Utils.GetDisplayRoleAndSubName(killerId, killerId, true))}{(Options.CurrentGameMode == CustomGameMode.FFA ? string.Empty : Utils.GetSubRolesText(killerId, summary: true))})"); + sb.Append($"\n\t⇐ {Main.AllPlayerNames[killerId]}({(Options.CurrentGameMode == CustomGameMode.FFA ? string.Empty : Utils.GetDisplayRoleAndSubName(killerId, killerId, true))}{(Options.CurrentGameMode == CustomGameMode.FFA ? string.Empty : Utils.GetSubRolesText(killerId, summary: true))})"); } else { @@ -104,9 +104,9 @@ public static void Postfix(AmongUsClient __instance, [HarmonyArgument(0)] ref En var killerId = kvp.Value.GetRealKiller(); var targetId = kvp.Key; - sb.Append($"\n{date:T} {Main.AllPlayerNames[targetId]}({(Options.CurrentGameMode == CustomGameMode.FFA ? string.Empty : Utils.GetDisplayRoleAndSubName(targetId, targetId, true))}{(Options.CurrentGameMode == CustomGameMode.FFA ? string.Empty : Utils.GetSubRolesText(targetId, summary: true))}) ÒÇÄ{Utils.GetVitalText(kvp.Key, true)}ÒÇÅ"); + sb.Append($"\n{date:T} {Main.AllPlayerNames[targetId]}({(Options.CurrentGameMode == CustomGameMode.FFA ? string.Empty : Utils.GetDisplayRoleAndSubName(targetId, targetId, true))}{(Options.CurrentGameMode == CustomGameMode.FFA ? string.Empty : Utils.GetSubRolesText(targetId, summary: true))}) 『{Utils.GetVitalText(kvp.Key, true)}』"); if (killerId != byte.MaxValue && killerId != targetId) - sb.Append($"
\t {Main.AllPlayerNames[killerId]}({(Options.CurrentGameMode == CustomGameMode.FFA ? string.Empty : Utils.GetDisplayRoleAndSubName(killerId, killerId, true))}{(Options.CurrentGameMode == CustomGameMode.FFA ? string.Empty : Utils.GetSubRolesText(killerId, summary: true))})"); + sb.Append($"
\t⇐ {Main.AllPlayerNames[killerId]}({(Options.CurrentGameMode == CustomGameMode.FFA ? string.Empty : Utils.GetDisplayRoleAndSubName(killerId, killerId, true))}{(Options.CurrentGameMode == CustomGameMode.FFA ? string.Empty : Utils.GetSubRolesText(killerId, summary: true))})"); } } diff --git a/Patches/PlayerJoinAndLeftPatch.cs b/Patches/PlayerJoinAndLeftPatch.cs index 8cb4a4bdc..e7bdd29dd 100644 --- a/Patches/PlayerJoinAndLeftPatch.cs +++ b/Patches/PlayerJoinAndLeftPatch.cs @@ -272,7 +272,7 @@ public static void Postfix(/*AmongUsClient __instance,*/ [HarmonyArgument(0)] Cl if (DestroyableSingleton.Instance.IsPlayerBlockedUsername(client.FriendCode) && AmongUsClient.Instance.AmHost) { AmongUsClient.Instance.KickPlayer(client.Id, true); - Logger.Info($"Ban Player Òâ╝ {client?.PlayerName}({client.FriendCode}) has been banned.", "BAN"); + Logger.Info($"Ban Player => {client?.PlayerName}({client.FriendCode}) has been banned.", "BAN"); } BanManager.CheckBanPlayer(client); @@ -293,7 +293,7 @@ public static void Postfix(/*AmongUsClient __instance,*/ [HarmonyArgument(0)] Cl BanManager.TempBanWhiteList.Add(client.GetHashedPuid()); AmongUsClient.Instance.KickPlayer(client.Id, true); Logger.SendInGame(string.Format(GetString("Message.TempBannedForSpamQuitting"), client.PlayerName)); - Logger.Info($"Temp Ban Player Òâ╝ {client?.PlayerName}({client.FriendCode}) has been temp banned.", "BAN"); + Logger.Info($"Temp Ban Player => {client?.PlayerName}({client.FriendCode}) has been temp banned.", "BAN"); } } } diff --git a/Roles/Crewmate/Marshall.cs b/Roles/Crewmate/Marshall.cs index a056c1eb3..958a2a79e 100644 --- a/Roles/Crewmate/Marshall.cs +++ b/Roles/Crewmate/Marshall.cs @@ -32,7 +32,7 @@ public override string GetMark(PlayerControl seer, PlayerControl target = null, { target ??= seer; - return IsMarshallTarget(seer) && GetExpose(target) ? Utils.ColorString(RoleColor, "★") : string.Empty; + return IsMarshallTarget(seer) && GetExpose(target) ? Utils.ColorString(RoleColor, "★") : string.Empty; } private static bool VisibleToCrewmate(PlayerControl seer, PlayerControl target) => target.GetPlayerTaskState().IsTaskFinished && target.Is(CustomRoles.Marshall) && seer.Is(Custom_Team.Crewmate); diff --git a/Roles/Crewmate/Snitch.cs b/Roles/Crewmate/Snitch.cs index 03a905326..cb1c5960b 100644 --- a/Roles/Crewmate/Snitch.cs +++ b/Roles/Crewmate/Snitch.cs @@ -202,7 +202,7 @@ public override string GetMark(PlayerControl seer, PlayerControl seen, bool isFo { if (seen == seer) return string.Empty; - return IsSnitchTarget(seen) && IsComplete[seer.PlayerId] ? Utils.ColorString(RoleColor, "ÔÜá") : string.Empty; + return IsSnitchTarget(seen) && IsComplete[seer.PlayerId] ? Utils.ColorString(RoleColor, "⚠") : string.Empty; } public override string GetSuffix(PlayerControl seer, PlayerControl target = null, bool isForMeeting = false) { @@ -222,7 +222,7 @@ public override string GetMarkOthers(PlayerControl seer, PlayerControl target, b { if (target == null) return string.Empty; - return IsSnitchTarget(seer) && GetExpose(target) ? Utils.ColorString(RoleColor, "ÔÜá") : string.Empty; + return IsSnitchTarget(seer) && GetExpose(target) ? Utils.ColorString(RoleColor, "⚠") : string.Empty; } public override string GetSuffixOthers(PlayerControl seer, PlayerControl target, bool isForMeeting = false) @@ -233,7 +233,7 @@ public override string GetSuffixOthers(PlayerControl seer, PlayerControl target, var exposedSnitch = playerIdList.Where(s => !Main.PlayerStates[s].IsDead && IsExposed[s]).ToArray(); if (exposedSnitch.Length <= 0) return string.Empty; - var warning = "ÔÜá"; + var warning = "⚠"; if (EnableTargetArrow) warning += TargetArrow.GetArrows(seer, [.. exposedSnitch]); diff --git a/Roles/Crewmate/Telecommunication.cs b/Roles/Crewmate/Telecommunication.cs index 5ce8caae4..f54860715 100644 --- a/Roles/Crewmate/Telecommunication.cs +++ b/Roles/Crewmate/Telecommunication.cs @@ -144,10 +144,10 @@ public override string GetSuffix(PlayerControl seer, PlayerControl seen = null, if (seer.PlayerId != seen.PlayerId || isForMeeting) return string.Empty; StringBuilder sb = new(); - if (IsAdminWatch) sb.Append(ColorString(GetRoleColor(CustomRoles.Telecommunication), "★")).Append(ColorString(GetRoleColor(CustomRoles.Telecommunication), GetString("AdminWarning"))); - if (IsVitalWatch) sb.Append(ColorString(GetRoleColor(CustomRoles.Telecommunication), "★")).Append(ColorString(GetRoleColor(CustomRoles.Telecommunication), GetString("VitalsWarning"))); - if (IsDoorLogWatch) sb.Append(ColorString(GetRoleColor(CustomRoles.Telecommunication), "★")).Append(ColorString(GetRoleColor(CustomRoles.Telecommunication), GetString("DoorlogWarning"))); - if (IsCameraWatch) sb.Append(ColorString(GetRoleColor(CustomRoles.Telecommunication), "★")).Append(ColorString(GetRoleColor(CustomRoles.Telecommunication), GetString("CameraWarning"))); + if (IsAdminWatch) sb.Append(ColorString(GetRoleColor(CustomRoles.Telecommunication), "★")).Append(ColorString(GetRoleColor(CustomRoles.Telecommunication), GetString("AdminWarning"))); + if (IsVitalWatch) sb.Append(ColorString(GetRoleColor(CustomRoles.Telecommunication), "★")).Append(ColorString(GetRoleColor(CustomRoles.Telecommunication), GetString("VitalsWarning"))); + if (IsDoorLogWatch) sb.Append(ColorString(GetRoleColor(CustomRoles.Telecommunication), "★")).Append(ColorString(GetRoleColor(CustomRoles.Telecommunication), GetString("DoorlogWarning"))); + if (IsCameraWatch) sb.Append(ColorString(GetRoleColor(CustomRoles.Telecommunication), "★")).Append(ColorString(GetRoleColor(CustomRoles.Telecommunication), GetString("CameraWarning"))); return sb.ToString(); } diff --git a/Roles/Impostor/Consigliere.cs b/Roles/Impostor/Consigliere.cs index 3bda1214a..4d41f6c45 100644 --- a/Roles/Impostor/Consigliere.cs +++ b/Roles/Impostor/Consigliere.cs @@ -92,7 +92,7 @@ private static void SetDivination(PlayerControl killer, PlayerControl target) { DivinationCount[killer.PlayerId]--; DivinationTarget[killer.PlayerId].Add(target.PlayerId); - Logger.Info($"{killer.GetNameWithRole()}:Checked→{target.GetNameWithRole()} || Remaining Ability: {DivinationCount[killer.PlayerId]}", "Consigliere"); + Logger.Info($"{killer.GetNameWithRole()}: Checked -> {target.GetNameWithRole()} || Remaining Ability: {DivinationCount[killer.PlayerId]}", "Consigliere"); Utils.NotifyRoles(SpecifySeer: killer, SpecifyTarget: target, ForceLoop: true); SendRPC(killer.PlayerId, target.PlayerId); diff --git a/Roles/Impostor/Deathpact.cs b/Roles/Impostor/Deathpact.cs index 435ca9de6..bab77f3bf 100644 --- a/Roles/Impostor/Deathpact.cs +++ b/Roles/Impostor/Deathpact.cs @@ -222,7 +222,7 @@ private static void KillPlayerInDeathpact(PlayerControl deathpact, PlayerControl } public override string GetMark(PlayerControl seer, PlayerControl seen, bool isForMeeting = false) - => IsInDeathpact(seer.PlayerId, seen) ? ColorString(Palette.ImpostorRed, "â—€") : string.Empty; + => IsInDeathpact(seer.PlayerId, seen) ? ColorString(Palette.ImpostorRed, "◀") : string.Empty; public override string GetSuffix(PlayerControl seer, PlayerControl seen, bool isForMeeting = false) { diff --git a/Roles/Impostor/EvilHacker.cs b/Roles/Impostor/EvilHacker.cs index d559d255a..d30ec6d98 100644 --- a/Roles/Impostor/EvilHacker.cs +++ b/Roles/Impostor/EvilHacker.cs @@ -104,7 +104,7 @@ public override void OnReportDeadBody(PlayerControl reporter, NetworkedPlayerInf if (canSeeImpostorMark && entry.NumImpostors > 0) { - var ImpostorMark = "★".Color(Palette.ImpostorRed); + var ImpostorMark = "★".Color(Palette.ImpostorRed); builder.Append(ImpostorMark); } diff --git a/Roles/Impostor/EvilTracker.cs b/Roles/Impostor/EvilTracker.cs index 77adc2df9..62bcaf4fa 100644 --- a/Roles/Impostor/EvilTracker.cs +++ b/Roles/Impostor/EvilTracker.cs @@ -179,13 +179,13 @@ public static void ReceiveRPC(MessageReader reader) } public override string GetProgressText(byte PlayerId, bool comms) - => CanTarget(PlayerId) ? Utils.ColorString(Palette.ImpostorRed.ShadeColor(0.5f), "Γùü") : string.Empty; + => CanTarget(PlayerId) ? Utils.ColorString(Palette.ImpostorRed.ShadeColor(0.5f), "◁") : string.Empty; public override string GetMark(PlayerControl seer, PlayerControl seen = null, bool isForMeeting = false) { seen ??= seer; return Target.ContainsValue(seen.PlayerId) - ? Utils.ColorString(Palette.ImpostorRed.ShadeColor(0.5f), "ΓùÇ") : string.Empty; + ? Utils.ColorString(Palette.ImpostorRed.ShadeColor(0.5f), "◀") : string.Empty; } public override string GetSuffix(PlayerControl seer, PlayerControl seen = null, bool isForMeeting = false) { diff --git a/Roles/Neutral/Berserker.cs b/Roles/Neutral/Berserker.cs index 4bac42911..56481ce98 100644 --- a/Roles/Neutral/Berserker.cs +++ b/Roles/Neutral/Berserker.cs @@ -149,7 +149,7 @@ public override bool OnCheckMurderAsKiller(PlayerControl killer, PlayerControl t if (BerserkerKillMax[killer.PlayerId] >= BerserkerBomberLevel.GetInt() && BerserkerThreeCanBomber.GetBool()) { - Logger.Info("þé©Õ╝╣þêåþé©õ║å", "Boom"); + Logger.Info("Bomb exploded", "Boom"); CustomSoundsManager.RPCPlayCustomSoundAll("Boom"); foreach (var player in Main.AllAlivePlayerControls) { diff --git a/Roles/Neutral/Executioner.cs b/Roles/Neutral/Executioner.cs index aaee157e8..3398f3d49 100644 --- a/Roles/Neutral/Executioner.cs +++ b/Roles/Neutral/Executioner.cs @@ -248,7 +248,7 @@ public override string GetMarkOthers(PlayerControl seer, PlayerControl target, b { if ((!seer.IsAlive() || seer.Is(CustomRoles.Executioner)) && IsTarget(target.PlayerId)) { - return Utils.ColorString(Utils.GetRoleColor(CustomRoles.Executioner), "♦"); + return Utils.ColorString(Utils.GetRoleColor(CustomRoles.Executioner), "♦"); } return string.Empty; } diff --git a/Roles/Neutral/Follower.cs b/Roles/Neutral/Follower.cs index 49d8c09f2..8c49c9365 100644 --- a/Roles/Neutral/Follower.cs +++ b/Roles/Neutral/Follower.cs @@ -130,10 +130,10 @@ public override string GetMarkOthers(PlayerControl seer, PlayerControl target, b { if (!BetTargetKnowFollower.GetBool()) return ""; return (BetPlayer.TryGetValue(target.PlayerId, out var x) && seer.PlayerId == x) ? - Utils.ColorString(Utils.GetRoleColor(CustomRoles.Follower), "♩") : ""; + Utils.ColorString(Utils.GetRoleColor(CustomRoles.Follower), "♦") : ""; } var GetValue = BetPlayer.TryGetValue(seer.PlayerId, out var targetId); - return GetValue && targetId == target.PlayerId ? Utils.ColorString(Utils.GetRoleColor(CustomRoles.Follower), "♩") : ""; + return GetValue && targetId == target.PlayerId ? Utils.ColorString(Utils.GetRoleColor(CustomRoles.Follower), "♦") : ""; } public override string GetProgressText(byte playerId, bool coooms) { diff --git a/Roles/Neutral/Lawyer.cs b/Roles/Neutral/Lawyer.cs index 7380315fa..147731ce3 100644 --- a/Roles/Neutral/Lawyer.cs +++ b/Roles/Neutral/Lawyer.cs @@ -200,11 +200,11 @@ public override string GetMarkOthers(PlayerControl seer, PlayerControl target, b if ((!seer.IsAlive() || seer.Is(CustomRoles.Lawyer)) && IsTarget(target.PlayerId)) { - return Utils.ColorString(Utils.GetRoleColor(CustomRoles.Lawyer), "♦"); + return Utils.ColorString(Utils.GetRoleColor(CustomRoles.Lawyer), "♦"); } else if (seer.IsAlive() && TargetKnowsLawyer.GetBool() && IsTarget(seer.PlayerId) && _state.PlayerId == target.PlayerId) { - return Utils.ColorString(Utils.GetRoleColor(CustomRoles.Lawyer), "♦"); + return Utils.ColorString(Utils.GetRoleColor(CustomRoles.Lawyer), "♦"); } return string.Empty; diff --git a/Roles/Neutral/PlagueBearer.cs b/Roles/Neutral/PlagueBearer.cs index 8dfd02156..082400183 100644 --- a/Roles/Neutral/PlagueBearer.cs +++ b/Roles/Neutral/PlagueBearer.cs @@ -214,12 +214,12 @@ public override void AfterMeetingTasks() CheckPlagueAllPlayers(); } public override string GetMark(PlayerControl seer, PlayerControl seen, bool isForMeeting = false) - => IsPlagued(seer.PlayerId, seen.PlayerId) ? ColorString(GetRoleColor(CustomRoles.PlagueBearer), "⊿") : string.Empty; + => IsPlagued(seer.PlayerId, seen.PlayerId) ? ColorString(GetRoleColor(CustomRoles.PlagueBearer), "⦿") : string.Empty; public override string GetMarkOthers(PlayerControl seer, PlayerControl target, bool isForMeeting = false) { if (playerIdList.Any() && IsPlagued(playerIdList.First(), target.PlayerId) && seer.IsNeutralApocalypse() && seer.PlayerId != playerIdList.First()) { - return ColorString(GetRoleColor(CustomRoles.PlagueBearer), "⊿"); + return ColorString(GetRoleColor(CustomRoles.PlagueBearer), "⦿"); } return string.Empty; } diff --git a/Roles/Neutral/Shroud.cs b/Roles/Neutral/Shroud.cs index 1b8fb9851..d1409b2ae 100644 --- a/Roles/Neutral/Shroud.cs +++ b/Roles/Neutral/Shroud.cs @@ -170,7 +170,7 @@ public override void AfterMeetingTasks() } public override string GetMarkOthers(PlayerControl seer, PlayerControl target, bool isMeeting = false) - => isMeeting && ShroudList.ContainsKey(target.PlayerId) ? Utils.ColorString(Utils.GetRoleColor(CustomRoles.Shroud), "Γùê") : string.Empty; + => isMeeting && ShroudList.ContainsKey(target.PlayerId) ? Utils.ColorString(Utils.GetRoleColor(CustomRoles.Shroud), "◈") : string.Empty; public override void SetAbilityButtonText(HudManager hud, byte playerId) {