fix gm in ffa with chat during game

This commit is contained in:
Gurge44 committed 2024-10-30 10:45:55 +01:00
1 parent 59d7fc41fe
commit fd5240c0ee
3 files changed
+18 -20

No files matched your search

+1
View File
@@ -129,6 +129,7 @@ internal static class FFAManager
PlayerTeams = [];
var allPlayers = Main.AllAlivePlayerControls;
if (Main.GM.Value && AmongUsClient.Instance.AmHost) allPlayers = allPlayers.Without(PlayerControl.LocalPlayer).ToArray();
foreach (PlayerControl pc in allPlayers)
{
+15 -18
View File
@@ -176,32 +176,29 @@ static class ExileControllerWrapUpPatch
Logger.Msg($"Ejection Text: {CheckForEndVotingPatch.EjectionText}", "ExilePatch");
if ((showRemainingKillers || appendEjectionNotify) && Options.CurrentGameMode == CustomGameMode.Standard)
{
LateTask.New(() =>
var text = showRemainingKillers ? Utils.GetRemainingKillers(notify: true) : string.Empty;
text = $"<#ffffff>{text}</color>";
var r = IRandom.Instance;
foreach (var pc in Main.AllAlivePlayerControls)
{
var text = showRemainingKillers ? Utils.GetRemainingKillers(notify: true) : string.Empty;
text = $"<#ffffff>{text}</color>";
var r = IRandom.Instance;
foreach (var pc in Main.AllAlivePlayerControls)
string finalText = text;
if (appendEjectionNotify && !finalText.Contains(CheckForEndVotingPatch.EjectionText, StringComparison.OrdinalIgnoreCase))
{
string finalText = text;
if (appendEjectionNotify && !finalText.Contains(CheckForEndVotingPatch.EjectionText, StringComparison.OrdinalIgnoreCase))
{
finalText = $"\n<#ffffff>{CheckForEndVotingPatch.EjectionText}</color>\n{finalText}";
}
if (!showRemainingKillers) finalText = finalText.TrimStart();
pc.Notify(finalText, r.Next(7, 13));
finalText = $"\n<#ffffff>{CheckForEndVotingPatch.EjectionText}</color>\n{finalText}";
}
}, 0.5f, log: false);
if (!showRemainingKillers) finalText = finalText.TrimStart();
pc.Notify(finalText, r.Next(7, 13));
}
}
LateTask.New(() => ChatManager.SendPreviousMessagesToAll(clear: true), 3f, log: false);
}
[HarmonyPatch(typeof(ExileController), nameof(ExileController.WrapUp))]
class BaseExileControllerPatch
static class BaseExileControllerPatch
{
public static void Postfix(ExileController __instance)
{
@@ -217,7 +214,7 @@ static class ExileControllerWrapUpPatch
}
[HarmonyPatch(typeof(AirshipExileController), nameof(AirshipExileController.WrapUpAndSpawn))]
class AirshipExileControllerPatch
static class AirshipExileControllerPatch
{
public static void Postfix(AirshipExileController __instance)
{
+2 -2
View File
@@ -240,7 +240,7 @@ static class CoBeginPatch
longInfo = $"<#ffffff>{longInfo}</color>";
var lines = longInfo.Count(x => x == '\n');
var readTime = 30 + (lines * 5);
var readTime = 20 + (lines * 5);
Utils.LongRoleDescriptions[seer.PlayerId] = (longInfo, readTime, tooLong);
}
@@ -901,7 +901,7 @@ static class IntroCutsceneDestroyPatch
{
lp.RpcExile();
Main.PlayerStates[lp.PlayerId].SetDead();
}, 1f, "Set GM Dead");
}, Options.CurrentGameMode == CustomGameMode.FFA && FFAManager.FFAChatDuringGame.GetBool() ? 12.5f : 1f, "Set GM Dead");
}
if (Options.RandomSpawn.GetBool())