String fixes (#444)

* Update Vector.cs

* Update RPC.cs

* Update Main.cs

* Update Magistrate.cs

* Update Gaslighter.cs

* Update Witch.cs
This commit is contained in:
PEPPERcula authored and GitHub committed 2025-12-23 17:25:54 +01:00
1 parent 1c5dbae3d8
commit 56f653760f
6 files changed
+31 -11

No files matched your search

-2
View File
@@ -1208,6 +1208,4 @@ public enum TieMode
Random
}
public class Coroutines : MonoBehaviour { }
+1 -1
View File
@@ -474,7 +474,7 @@ internal static class RPCHandlerPatch
listOptions.Add(OptionItem.AllOptions[option]);
int countOptions = listOptions.Count;
Logger.Msg($"StartAmount: {startAmount} - LastAmount: {lastAmount} ({startAmount}/{lastAmount}) :--: ListOptionsCount: {countOptions} - AllOptions: {countAllOptions} ({countOptions}/{countAllOptions})", "SyncCustomSettings");
Logger.Info($"StartAmount: {startAmount} - LastAmount: {lastAmount} ({startAmount}/{lastAmount}) :--: ListOptionsCount: {countOptions} - AllOptions: {countAllOptions} ({countOptions}/{countAllOptions})", "SyncCustomSettings");
// Sync Settings
foreach (OptionItem option in listOptions)
+5 -3
View File
@@ -312,7 +312,7 @@ public class Witch : RoleBase
public override string GetSuffix(PlayerControl seer, PlayerControl target, bool hud = false, bool meeting = false)
{
if (seer == null || meeting || seer.PlayerId != target.PlayerId || !seer.Is(CustomRoles.Witch) || (seer.IsModdedClient() && !hud)) return string.Empty;
if (seer == null || seer.PlayerId != target.PlayerId || (seer.IsModdedClient() && !hud) || meeting) return string.Empty;
var str = new StringBuilder();
@@ -339,8 +339,10 @@ public class Witch : RoleBase
public override void SetButtonTexts(HudManager hud, byte id)
{
if (SpellMode && NowSwitchTrigger is not SwitchTrigger.DoubleTrigger and not SwitchTrigger.Vanish)
hud.KillButton.OverrideText(GetString("WitchSpellButtonText"));
if (SpellMode && NowSwitchTrigger != SwitchTrigger.DoubleTrigger)
hud.KillButton.OverrideText(IsHM ? GetString("HexButtonText") : GetString("WitchSpellButtonText"));
else if (SpellMode && NowSwitchTrigger == SwitchTrigger.Vanish)
hud.AbilityButton.OverrideText(IsHM ? GetString("HexButtonText") : GetString("WitchSpellButtonText"));
else
hud.KillButton.OverrideText(GetString("KillButtonText"));
}
+20 -1
View File
@@ -80,6 +80,22 @@ public class Gaslighter : RoleBase
};
}
public override void SetButtonTexts(HudManager hud, byte id)
{
switch (CurrentRound)
{
case Round.Knight:
hud.KillButton?.OverrideText(Translator.GetString("MonarchKillButtonText"));
break;
case Round.Curse:
hud.KillButton?.OverrideText(Translator.GetString("WarlockCurseButtonText"));
break;
case Round.Shield:
hud.KillButton?.OverrideText(Translator.GetString("MedicalerButtonText"));
break;
}
}
public static void OnExile(byte[] exileIds)
{
try
@@ -195,12 +211,15 @@ public class Gaslighter : RoleBase
killer.SetKillCooldown();
break;
case Round.Curse:
killer.RPCPlayCustomSound("Curse");
CursedPlayers.Add(target.PlayerId);
Utils.SendRPC(CustomRPC.SyncRoleData, GaslighterId, 1, target.PlayerId);
Utils.NotifyRoles(SpecifySeer: killer, SpecifyTarget: target);
killer.SetKillCooldown();
break;
case Round.Shield when killer.GetAbilityUseLimit() > 0:
killer.RPCPlayCustomSound("Shield");
target.RPCPlayCustomSound("Shield");
ShieldedPlayers.Add(target.PlayerId);
Utils.NotifyRoles(SpecifySeer: killer, SpecifyTarget: target);
Utils.NotifyRoles(SpecifySeer: target, SpecifyTarget: target);
@@ -273,4 +292,4 @@ public class Gaslighter : RoleBase
Curse,
Shield
}
}
}
+2 -1
View File
@@ -79,6 +79,7 @@ public class Magistrate : RoleBase
private static void UseAbility(PlayerControl pc)
{
pc.RPCPlayCustomSound("Line");
pc.RpcRemoveAbilityUse();
CallCourtNextMeeting = true;
}
@@ -89,4 +90,4 @@ public class Magistrate : RoleBase
Pet,
Vanish
}
}
}
+3 -3
View File
@@ -81,11 +81,11 @@ internal class Vector : RoleBase
VectorVentCount[pc.PlayerId]++;
Utils.SendRPC(CustomRPC.SyncRoleData, pc.PlayerId, pc.PlayerId);
Utils.NotifyRoles(SpecifySeer: pc, SpecifyTarget: pc);
pc.RPCPlayCustomSound("VectorJump");
pc.RPCPlayCustomSound("MarioJump");
if (AmongUsClient.Instance.AmHost && VectorVentCount[pc.PlayerId] >= VectorVentNumWin)
{
pc.RPCPlayCustomSound("VectorCoin");
pc.RPCPlayCustomSound("MarioCoin");
CustomWinnerHolder.ResetAndSetWinner(CustomWinner.Vector);
CustomWinnerHolder.WinnerIds.Add(pc.PlayerId);
}
@@ -97,4 +97,4 @@ internal class Vector : RoleBase
VectorVentCount.TryAdd(id, 0);
VectorVentCount[id]++;
}
}
}