mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-11-19 13:16:56 +00:00
worse chat spam on vanilla servers
This commit is contained in:
1 parent
4e80042324
commit
247a6a8dc9
35 files changed
+153
-119
No files matched your search
@@ -445,11 +445,11 @@ public static class BedWars
|
||||
.Flatten()
|
||||
.ToDictionary(x => x.Key, x => x.Value);
|
||||
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
yield return new WaitForSecondsRealtime(0.2f);
|
||||
|
||||
Utils.SetChatVisibleForAll();
|
||||
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
yield return new WaitForSecondsRealtime(0.2f);
|
||||
|
||||
MapNames map = Main.CurrentMap;
|
||||
Dictionary<BedWarsTeam, Base> bases = Bases[map];
|
||||
@@ -512,10 +512,10 @@ public static class BedWars
|
||||
|
||||
Data[pc.PlayerId] = data;
|
||||
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
yield return new WaitForSecondsRealtime(0.2f);
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
yield return new WaitForSecondsRealtime(0.5f);
|
||||
|
||||
if (GameStates.IsEnded || !GameStates.InGame || GameStates.IsLobby)
|
||||
{
|
||||
@@ -542,14 +542,14 @@ public static class BedWars
|
||||
if (bed != null) AllNetObjects[team] = new(bed, new(itemShop), new(upgradeShop));
|
||||
rooms.Add(Utils.ColorString(team.GetColor(), Translator.GetString($"{room}")));
|
||||
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
yield return new WaitForSecondsRealtime(0.2f);
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
yield return new WaitForSecondsRealtime(0.2f);
|
||||
|
||||
players.NotifyPlayers($"{rooms[0]}\n{string.Join(" | ", rooms.Skip(1))}", 20f, setName: false);
|
||||
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
yield return new WaitForSecondsRealtime(0.2f);
|
||||
|
||||
foreach ((Item item, List<Vector2> positions) in ItemGeneratorPositions[map])
|
||||
{
|
||||
@@ -570,7 +570,7 @@ public static class BedWars
|
||||
if (generator != null) ItemGenerators.Add(generator);
|
||||
});
|
||||
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
yield return new WaitForSecondsRealtime(0.2f);
|
||||
}
|
||||
|
||||
GracePeriodEnd = Utils.TimeStamp + GracePeriod;
|
||||
@@ -808,7 +808,7 @@ public static class BedWars
|
||||
if (pc == null) yield break;
|
||||
|
||||
pc.Notify(string.Format(Translator.GetString("Bedwars.ReviveCountdown"), time), overrideAll: true, sendOption: SendOption.None);
|
||||
yield return new WaitForSeconds(1f);
|
||||
yield return new WaitForSecondsRealtime(1f);
|
||||
time--;
|
||||
}
|
||||
|
||||
|
||||
@@ -297,7 +297,7 @@ public static class CaptureTheFlag
|
||||
|
||||
public static IEnumerator OnGameStart()
|
||||
{
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
yield return new WaitForSecondsRealtime(0.2f);
|
||||
|
||||
Main.AllPlayerKillCooldown.SetAllValues(TagCooldown.GetFloat());
|
||||
|
||||
@@ -330,7 +330,7 @@ public static class CaptureTheFlag
|
||||
yield return null;
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
yield return new WaitForSecondsRealtime(0.5f);
|
||||
|
||||
// Create flags
|
||||
(Vector2 Position, string RoomName) blueFlagBase = BlueFlagBase;
|
||||
@@ -367,7 +367,7 @@ public static class CaptureTheFlag
|
||||
yield return null;
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
yield return new WaitForSecondsRealtime(0.2f);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -412,7 +412,7 @@ public static class CaptureTheFlag
|
||||
}
|
||||
catch (Exception e) { Utils.ThrowException(e); }
|
||||
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
yield return new WaitForSecondsRealtime(0.2f);
|
||||
|
||||
ValidTag = true;
|
||||
GameStartTS = Utils.TimeStamp;
|
||||
|
||||
@@ -198,7 +198,7 @@ public static class Deathrace
|
||||
|
||||
public static System.Collections.IEnumerator GameStart()
|
||||
{
|
||||
yield return new WaitForSeconds(2f);
|
||||
yield return new WaitForSecondsRealtime(2f);
|
||||
|
||||
Track = Tracks[Main.CurrentMap].ToList();
|
||||
Logger.Info($"Track: {string.Join(" » ", Track)}", "Deathrace");
|
||||
@@ -225,20 +225,20 @@ public static class Deathrace
|
||||
if (showTutorial)
|
||||
{
|
||||
players.NotifyPlayers("<#ffffff>" + Translator.GetString("Deathrace.Tutorial.Basics"), 100f);
|
||||
yield return new WaitForSeconds(Main.CurrentMap == MapNames.Airship ? 10f : 5f);
|
||||
yield return new WaitForSecondsRealtime(Main.CurrentMap == MapNames.Airship ? 10f : 5f);
|
||||
NameNotifyManager.Reset();
|
||||
}
|
||||
|
||||
var track = Track.ToList();
|
||||
if (!Clockwise) track.Reverse();
|
||||
players.NotifyPlayers("<#ffffff>" + string.Format(Translator.GetString("Deathrace.Tutorial.Track"), string.Join(" » ", track.ConvertAll(x => Translator.GetString(x.ToString())))), 100f);
|
||||
yield return new WaitForSeconds(Track.Count);
|
||||
yield return new WaitForSecondsRealtime(Track.Count);
|
||||
NameNotifyManager.Reset();
|
||||
|
||||
if (showTutorial && SpawnPowerUps)
|
||||
{
|
||||
players.NotifyPlayers("<#ffffff>" + Translator.GetString("Deathrace.Tutorial.PowerUps"), 100f);
|
||||
yield return new WaitForSeconds(4f);
|
||||
yield return new WaitForSecondsRealtime(4f);
|
||||
NameNotifyManager.Reset();
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ public static class Deathrace
|
||||
}
|
||||
else if (Main.CurrentMap == MapNames.Airship)
|
||||
{
|
||||
yield return new WaitForSeconds(3f);
|
||||
yield return new WaitForSecondsRealtime(3f);
|
||||
players.MassTP(new RandomSpawn.AirshipSpawnMap().Positions[Clockwise ? Track[^1] : Track[0]]);
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ public static class Deathrace
|
||||
{
|
||||
NameNotifyManager.Reset();
|
||||
players.NotifyPlayers("<#ffffff>" + string.Format(Translator.GetString("RR_ReadyQM"), i));
|
||||
yield return new WaitForSeconds(1f);
|
||||
yield return new WaitForSecondsRealtime(1f);
|
||||
}
|
||||
|
||||
NameNotifyManager.Reset();
|
||||
|
||||
@@ -356,7 +356,7 @@ public static class KingOfTheZones
|
||||
yield return null;
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(showTutorial ? 8f : 2f);
|
||||
yield return new WaitForSecondsRealtime(showTutorial ? 8f : 2f);
|
||||
NameNotifyManager.Reset();
|
||||
if (!GameStates.InGame || !Main.IntroDestroyed) goto End;
|
||||
|
||||
@@ -382,14 +382,14 @@ public static class KingOfTheZones
|
||||
};
|
||||
|
||||
aapc.NotifyPlayers($"<#ffffff>{gameEnd}</color>", 100f);
|
||||
yield return new WaitForSeconds(4f);
|
||||
yield return new WaitForSecondsRealtime(4f);
|
||||
NameNotifyManager.Reset();
|
||||
if (!GameStates.InGame || !Main.IntroDestroyed) goto End;
|
||||
|
||||
string tags = string.Format(GetString("KOTZ.Notify.Tutorial.Tagging"), tagCooldown, respawnTime);
|
||||
|
||||
aapc.NotifyPlayers($"<#ffffff>{tags}</color>", 100f);
|
||||
yield return new WaitForSeconds(4f);
|
||||
yield return new WaitForSecondsRealtime(4f);
|
||||
NameNotifyManager.Reset();
|
||||
if (!GameStates.InGame || !Main.IntroDestroyed) goto End;
|
||||
|
||||
@@ -398,7 +398,7 @@ public static class KingOfTheZones
|
||||
string zoneMovement = string.Format(GetString(AllZonesMoveAtOnce.GetBool() ? "KOTZ.Notify.Tutorial.ZonesMoving.AllAtOnce" : "KOTZ.Notify.Tutorial.ZonesMoving.Separately"), ZoneMoveTime.GetInt());
|
||||
|
||||
aapc.NotifyPlayers($"<#ffffff>{zoneMovement}</color>", 100f);
|
||||
yield return new WaitForSeconds(4f);
|
||||
yield return new WaitForSecondsRealtime(4f);
|
||||
NameNotifyManager.Reset();
|
||||
if (!GameStates.InGame || !Main.IntroDestroyed) goto End;
|
||||
|
||||
@@ -409,7 +409,7 @@ public static class KingOfTheZones
|
||||
string downTimeInfo = string.Format(GetString("KOTZ.Notify.Tutorial.ZonesMoving.Downtime"), downTime);
|
||||
|
||||
aapc.NotifyPlayers($"<#ffffff>{downTimeInfo}</color>", 100f);
|
||||
yield return new WaitForSeconds(4f);
|
||||
yield return new WaitForSecondsRealtime(4f);
|
||||
NameNotifyManager.Reset();
|
||||
if (!GameStates.InGame || !Main.IntroDestroyed) goto End;
|
||||
}
|
||||
@@ -425,7 +425,7 @@ public static class KingOfTheZones
|
||||
{
|
||||
LastShortInfo = info;
|
||||
aapc.NotifyPlayers($"<#ffffff>{info}</color>", 100f);
|
||||
yield return new WaitForSeconds(4f);
|
||||
yield return new WaitForSecondsRealtime(4f);
|
||||
NameNotifyManager.Reset();
|
||||
if (!GameStates.InGame || !Main.IntroDestroyed) goto End;
|
||||
}
|
||||
@@ -470,7 +470,7 @@ public static class KingOfTheZones
|
||||
{
|
||||
NameNotifyManager.Reset();
|
||||
aapc.NotifyPlayers($"<#ffffff>{string.Format(GetString("RR_ReadyQM"), i)}</color>", 100f);
|
||||
yield return new WaitForSeconds(1f);
|
||||
yield return new WaitForSecondsRealtime(1f);
|
||||
}
|
||||
|
||||
NameNotifyManager.Reset();
|
||||
|
||||
+3
-3
@@ -241,7 +241,7 @@ public static class Mingle
|
||||
AllRooms.RemoveWhere(x => x.ToString().Contains("Decontamination"));
|
||||
if (SubmergedCompatibility.IsSubmerged()) AllRooms.RemoveWhere(x => (byte)x > 135);
|
||||
|
||||
yield return new WaitForSeconds(Main.CurrentMap == MapNames.Airship ? 8f : 3f);
|
||||
yield return new WaitForSecondsRealtime(Main.CurrentMap == MapNames.Airship ? 8f : 3f);
|
||||
|
||||
List<PlayerControl> players = Main.AllAlivePlayerControls.ToList();
|
||||
if (Main.GM.Value) players.RemoveAll(x => x.IsHost());
|
||||
@@ -252,7 +252,7 @@ public static class Mingle
|
||||
if (showTutorial)
|
||||
{
|
||||
players.NotifyPlayers("<#ffffff>" + Translator.GetString("Mingle.Tutorial"), 100f);
|
||||
yield return new WaitForSeconds(12f);
|
||||
yield return new WaitForSecondsRealtime(12f);
|
||||
NameNotifyManager.Reset();
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ public static class Mingle
|
||||
{
|
||||
NameNotifyManager.Reset();
|
||||
players.NotifyPlayers(string.Format(Translator.GetString("RR_ReadyQM"), i));
|
||||
yield return new WaitForSeconds(1f);
|
||||
yield return new WaitForSecondsRealtime(1f);
|
||||
}
|
||||
|
||||
NameNotifyManager.Reset();
|
||||
|
||||
+18
-18
@@ -270,7 +270,7 @@ public static class Quiz
|
||||
|
||||
public static IEnumerator OnGameStart()
|
||||
{
|
||||
if (Chat) yield return new WaitForSeconds(1f);
|
||||
if (Chat) yield return new WaitForSecondsRealtime(1f);
|
||||
|
||||
NoSuffix = true;
|
||||
PlayerControl[] aapc = Main.AllAlivePlayerControls;
|
||||
@@ -278,14 +278,14 @@ public static class Quiz
|
||||
|
||||
var usedRooms = string.Join('\n', UsedRooms[Main.CurrentMap].Select(x => $"{x.Key}: {GetString(x.Value.ToString())}"));
|
||||
aapc.NotifyPlayers(string.Format(GetString("Quiz.Tutorial.Basics"), usedRooms), 11f);
|
||||
yield return new WaitForSeconds(showTutorial ? 9f : 5f);
|
||||
yield return new WaitForSecondsRealtime(showTutorial ? 9f : 5f);
|
||||
if (GameStates.IsMeeting || ExileController.Instance || !GameStates.InGame || GameStates.IsLobby) yield break;
|
||||
NameNotifyManager.Reset();
|
||||
|
||||
if (showTutorial)
|
||||
{
|
||||
aapc.NotifyPlayers(GetString("Quiz.Tutorial.TestRound"));
|
||||
yield return new WaitForSeconds(3f);
|
||||
yield return new WaitForSecondsRealtime(3f);
|
||||
if (GameStates.IsMeeting || ExileController.Instance || !GameStates.InGame || GameStates.IsLobby) yield break;
|
||||
NameNotifyManager.Reset();
|
||||
|
||||
@@ -296,27 +296,27 @@ public static class Quiz
|
||||
|
||||
while (QuestionTimeLimitEndTS != 0)
|
||||
{
|
||||
yield return new WaitForSeconds(1f);
|
||||
yield return new WaitForSecondsRealtime(1f);
|
||||
if (GameStates.IsMeeting || ExileController.Instance || !GameStates.InGame || GameStates.IsLobby) yield break;
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(3f);
|
||||
yield return new WaitForSecondsRealtime(3f);
|
||||
NoSuffix = true;
|
||||
|
||||
aapc.NotifyPlayers(GetString("Quiz.Tutorial.OnWrongAnswer"), 10f);
|
||||
yield return new WaitForSeconds(3f);
|
||||
yield return new WaitForSecondsRealtime(3f);
|
||||
if (GameStates.IsMeeting || ExileController.Instance || !GameStates.InGame || GameStates.IsLobby) yield break;
|
||||
NameNotifyManager.Reset();
|
||||
|
||||
aapc.NotifyPlayers(GetString("Quiz.Tutorial.OnCorrectAnswer"));
|
||||
yield return new WaitForSeconds(2f);
|
||||
yield return new WaitForSecondsRealtime(2f);
|
||||
}
|
||||
else
|
||||
{
|
||||
NoSuffix = true;
|
||||
var settings = Settings[CurrentDifficulty];
|
||||
Main.AllAlivePlayerControls.NotifyPlayers(string.Format(GetString("Quiz.Notify.NextStage"), (int)CurrentDifficulty, settings.Rounds.GetInt(), settings.QuestionsAsked.GetInt(), settings.CorrectRequirement.GetInt(), settings.QuestionsAsked.GetInt(), settings.TimeLimit.GetInt()), 8f);
|
||||
yield return new WaitForSeconds(6f);
|
||||
yield return new WaitForSecondsRealtime(6f);
|
||||
}
|
||||
|
||||
if (GameStates.IsMeeting || ExileController.Instance || !GameStates.InGame || GameStates.IsLobby) yield break;
|
||||
@@ -334,7 +334,7 @@ public static class Quiz
|
||||
NoSuffix = true;
|
||||
var settings = Settings[CurrentDifficulty];
|
||||
Main.AllAlivePlayerControls.NotifyPlayers(string.Format(GetString("Quiz.Notify.NextStage"), (int)CurrentDifficulty, settings.Rounds.GetInt(), settings.QuestionsAsked.GetInt(), settings.CorrectRequirement.GetInt(), settings.QuestionsAsked.GetInt(), settings.TimeLimit.GetInt()), 8f);
|
||||
yield return new WaitForSeconds(6f);
|
||||
yield return new WaitForSecondsRealtime(6f);
|
||||
if (GameStates.IsMeeting || ExileController.Instance || !GameStates.InGame || GameStates.IsLobby) yield break;
|
||||
NameNotifyManager.Reset();
|
||||
}
|
||||
@@ -345,7 +345,7 @@ public static class Quiz
|
||||
|
||||
NoSuffix = true;
|
||||
Main.AllAlivePlayerControls.NotifyPlayers(string.Format(GetString("Quiz.Notify.NextRound"), Round + 1));
|
||||
yield return new WaitForSeconds(3f);
|
||||
yield return new WaitForSecondsRealtime(3f);
|
||||
if (GameStates.IsMeeting || ExileController.Instance || !GameStates.InGame || GameStates.IsLobby) yield break;
|
||||
NameNotifyManager.Reset();
|
||||
}
|
||||
@@ -459,7 +459,7 @@ public static class Quiz
|
||||
if (everyoneWasWrong) QuestionsAsked--;
|
||||
Utils.NotifyRoles();
|
||||
|
||||
yield return new WaitForSeconds(everyoneWasWrong ? aapc.Length <= 3 ? 4f : 6f : 3f);
|
||||
yield return new WaitForSecondsRealtime(everyoneWasWrong ? aapc.Length <= 3 ? 4f : 6f : 3f);
|
||||
if (GameStates.IsMeeting || ExileController.Instance || !GameStates.InGame || GameStates.IsLobby) yield break;
|
||||
|
||||
var settings = Settings[CurrentDifficulty];
|
||||
@@ -470,7 +470,7 @@ public static class Quiz
|
||||
yield break;
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(2f);
|
||||
yield return new WaitForSecondsRealtime(2f);
|
||||
|
||||
var correctRequirement = settings.CorrectRequirement.GetInt();
|
||||
List<byte> dyingPlayers = NumCorrectAnswers.Where(x => x.Value[CurrentDifficulty][Round] < correctRequirement).Select(x => x.Key).Where(x => Main.PlayerStates.TryGetValue(x, out var s) && !s.IsDead).ToList();
|
||||
@@ -496,19 +496,19 @@ public static class Quiz
|
||||
goto case 0;
|
||||
default:
|
||||
if (aapc.Length is 3 or 2) aapc.Do(x => x.RpcMakeVisible());
|
||||
yield return new WaitForSeconds(2f);
|
||||
yield return new WaitForSecondsRealtime(2f);
|
||||
AllowKills = true;
|
||||
FFAEndTS = Utils.TimeStamp + FFAEventLength.GetInt();
|
||||
var spectators = aapc.ExceptBy(dyingPlayers, x => x.PlayerId).ToArray();
|
||||
spectators.Do(x => x.ExileTemporarily());
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
yield return new WaitForSecondsRealtime(0.2f);
|
||||
var stillLiving = dyingPlayers.ToValidPlayers().FindAll(x => x.IsAlive());
|
||||
stillLiving.ForEach(x => x.RpcChangeRoleBasis(CustomRoles.SerialKiller));
|
||||
Utils.SendRPC(CustomRPC.QuizSync, AllowKills);
|
||||
|
||||
while (Utils.TimeStamp < FFAEndTS)
|
||||
{
|
||||
yield return new WaitForSeconds(1f);
|
||||
yield return new WaitForSecondsRealtime(1f);
|
||||
if (GameStates.IsMeeting || ExileController.Instance || !GameStates.InGame || GameStates.IsLobby) yield break;
|
||||
Utils.NotifyRoles(SendOption: SendOption.None);
|
||||
stillLiving.RemoveAll(x => x == null || !x.IsAlive());
|
||||
@@ -535,17 +535,17 @@ public static class Quiz
|
||||
break;
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(1f);
|
||||
yield return new WaitForSecondsRealtime(1f);
|
||||
|
||||
if (Chat)
|
||||
{
|
||||
Utils.SetChatVisibleForAll();
|
||||
yield return new WaitForSeconds(1f);
|
||||
yield return new WaitForSecondsRealtime(1f);
|
||||
}
|
||||
|
||||
spectators.Do(x => x.TP(location));
|
||||
|
||||
yield return new WaitForSeconds(2f);
|
||||
yield return new WaitForSecondsRealtime(2f);
|
||||
if (GameStates.IsMeeting || ExileController.Instance || !GameStates.InGame || GameStates.IsLobby) yield break;
|
||||
|
||||
FFAEndTS = 0;
|
||||
|
||||
@@ -210,7 +210,7 @@ public static class RoomRush
|
||||
|
||||
Map = RandomSpawn.SpawnMap.GetSpawnMap();
|
||||
|
||||
yield return new WaitForSeconds(Main.CurrentMap == MapNames.Airship ? 8f : 3f);
|
||||
yield return new WaitForSecondsRealtime(Main.CurrentMap == MapNames.Airship ? 8f : 3f);
|
||||
|
||||
PlayerControl[] aapc = Main.AllAlivePlayerControls;
|
||||
aapc.Do(x => x.RpcSetCustomRole(CustomRoles.RRPlayer));
|
||||
@@ -288,7 +288,7 @@ public static class RoomRush
|
||||
}
|
||||
|
||||
aapc.NotifyPlayers(sb.Insert(0, "<#ffffff>").Append("</color>").ToString().Trim(), 100f);
|
||||
yield return new WaitForSeconds(readingTime);
|
||||
yield return new WaitForSecondsRealtime(readingTime);
|
||||
if (!GameStates.InGame) yield break;
|
||||
}
|
||||
|
||||
@@ -296,7 +296,7 @@ public static class RoomRush
|
||||
{
|
||||
NameNotifyManager.Reset();
|
||||
aapc.NotifyPlayers(string.Format(Translator.GetString("RR_ReadyQM"), i));
|
||||
yield return new WaitForSeconds(1f);
|
||||
yield return new WaitForSecondsRealtime(1f);
|
||||
}
|
||||
|
||||
if (ventLimit > 0)
|
||||
|
||||
+12
-12
@@ -389,7 +389,7 @@ public static class TheMindGame
|
||||
pc.Notify(string.Format(Translator.GetString(sameAsSomeoneElse ? "TMG.Notify.SamePick" : "TMG.Notify.Pick"), pick, sameAsSomeoneElse ? otherId.ColoredPlayerName() : string.Empty));
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(3f);
|
||||
yield return new WaitForSecondsRealtime(3f);
|
||||
if (Stop) yield break;
|
||||
NameNotifyManager.Reset();
|
||||
|
||||
@@ -533,7 +533,7 @@ public static class TheMindGame
|
||||
pc.Notify(string.Format(Translator.GetString(sameAsSomeoneElse ? "TMG.Notify.SamePick" : "TMG.Notify.Pick"), pick, sameAsSomeoneElse ? otherPc.PlayerId.ColoredPlayerName() : string.Empty));
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(3f);
|
||||
yield return new WaitForSecondsRealtime(3f);
|
||||
if (Stop) yield break;
|
||||
NameNotifyManager.Reset();
|
||||
|
||||
@@ -559,7 +559,7 @@ public static class TheMindGame
|
||||
while (true)
|
||||
{
|
||||
PlayerControl.LocalPlayer.NoCheckStartMeeting(null, true);
|
||||
yield return new WaitForSeconds(8f);
|
||||
yield return new WaitForSecondsRealtime(8f);
|
||||
if (!GameStates.InGame || GameStates.IsLobby || GameStates.IsEnded) yield break;
|
||||
|
||||
WinningBriefcaseHolderId = Main.AllAlivePlayerControls.RandomElement().PlayerId;
|
||||
@@ -569,27 +569,27 @@ public static class TheMindGame
|
||||
|
||||
while (GameStates.IsMeeting || ExileController.Instance || AntiBlackout.SkipTasks)
|
||||
{
|
||||
yield return new WaitForSeconds(1f);
|
||||
yield return new WaitForSecondsRealtime(1f);
|
||||
if (!GameStates.InGame || GameStates.IsLobby || GameStates.IsEnded) yield break;
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(1f);
|
||||
yield return new WaitForSecondsRealtime(1f);
|
||||
|
||||
while (GameStates.IsMeeting || ExileController.Instance || AntiBlackout.SkipTasks)
|
||||
{
|
||||
yield return new WaitForSeconds(1f);
|
||||
yield return new WaitForSecondsRealtime(1f);
|
||||
if (!GameStates.InGame || GameStates.IsLobby || GameStates.IsEnded) yield break;
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(1f);
|
||||
yield return new WaitForSecondsRealtime(1f);
|
||||
|
||||
while (GameStates.IsMeeting || ExileController.Instance || AntiBlackout.SkipTasks)
|
||||
{
|
||||
yield return new WaitForSeconds(1f);
|
||||
yield return new WaitForSecondsRealtime(1f);
|
||||
if (!GameStates.InGame || GameStates.IsLobby || GameStates.IsEnded) yield break;
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(1f);
|
||||
yield return new WaitForSecondsRealtime(1f);
|
||||
|
||||
aapc = Main.AllAlivePlayerControls;
|
||||
|
||||
@@ -627,7 +627,7 @@ public static class TheMindGame
|
||||
NameNotifyManager.Reset();
|
||||
Main.AllAlivePlayerControls.NotifyPlayers(join, 100f);
|
||||
ProceedingInCountdownEndTS = Utils.TimeStamp + 5;
|
||||
yield return new WaitForSeconds(5f);
|
||||
yield return new WaitForSecondsRealtime(5f);
|
||||
if (Stop) yield break;
|
||||
|
||||
Dictionary<byte, int> round4Points = ranking.ToDictionary(x => x, x => (ranking.Count - ranking.IndexOf(x)) * 10);
|
||||
@@ -675,7 +675,7 @@ public static class TheMindGame
|
||||
string str = Translator.GetString(key);
|
||||
Main.AllAlivePlayerControls.NotifyPlayers(args.Length == 0 ? str : string.Format(str, args), 100f);
|
||||
ProceedingInCountdownEndTS = Utils.TimeStamp + time;
|
||||
yield return new WaitForSeconds(time);
|
||||
yield return new WaitForSecondsRealtime(time);
|
||||
NameNotifyManager.Reset();
|
||||
}
|
||||
|
||||
@@ -692,7 +692,7 @@ public static class TheMindGame
|
||||
pc.TP(RandomSpawn.SpawnMap.GetSpawnMap().Positions[groupRoom]);
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(2f);
|
||||
yield return new WaitForSecondsRealtime(2f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -260,7 +260,7 @@ public static class Achievements
|
||||
IEnumerator FetchAchievementsFromApiAsync()
|
||||
{
|
||||
while (PlayerControl.LocalPlayer == null) yield return null;
|
||||
yield return new WaitForSeconds(3f);
|
||||
yield return new WaitForSecondsRealtime(3f);
|
||||
|
||||
string userId = PlayerControl.LocalPlayer.GetClient().GetHashedPuid();
|
||||
var url = $"{ApiLoadEndpoint}?userId={userId}";
|
||||
|
||||
@@ -55,7 +55,7 @@ public static class AutoHaunt
|
||||
HudManager.Instance.AbilityButton.DoClick();
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(5f);
|
||||
yield return new WaitForSecondsRealtime(5f);
|
||||
}
|
||||
|
||||
if (GameStates.IsInTask && !ExileController.Instance && !AntiBlackout.SkipTasks && !PlayerControl.LocalPlayer.IsAlive() && HauntMenuMinigameStartPatch.Instance != null)
|
||||
|
||||
@@ -77,11 +77,11 @@ public static class ChatBubbleShower
|
||||
isColor1 = !isColor1;
|
||||
var text = $"<b>{title}</b>\n<size=80%><color={color}>{message}</color></size>";
|
||||
HudManagerPatch.AchievementUnlockedText = text;
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
yield return new WaitForSecondsRealtime(0.2f);
|
||||
}
|
||||
|
||||
HudManagerPatch.AchievementUnlockedText = $"<b>{title}</b>\n<size=80%>{message}</size>";
|
||||
yield return new WaitForSeconds(7.25f);
|
||||
yield return new WaitForSecondsRealtime(7.25f);
|
||||
HudManagerPatch.AchievementUnlockedText = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ namespace EHR
|
||||
{
|
||||
Logger.Info("Delaying CNO Spawn", "CustomNetObject.CreateNetObject");
|
||||
while (GameStates.InGame && !GameStates.IsEnded && (!Main.IntroDestroyed || Utils.TimeStamp - IntroCutsceneDestroyPatch.IntroDestroyTS < 10)) yield return null;
|
||||
yield return new WaitForSeconds(3f);
|
||||
yield return new WaitForSecondsRealtime(3f);
|
||||
if (!GameStates.InGame || GameStates.IsEnded || GameStates.IsMeeting || ExileController.Instance || AntiBlackout.SkipTasks) yield break;
|
||||
CreateNetObject(sprite, position);
|
||||
}
|
||||
@@ -369,7 +369,7 @@ namespace EHR
|
||||
System.Collections.IEnumerator WaitForMeetingEnd()
|
||||
{
|
||||
while (ReportDeadBodyPatch.MeetingStarted || GameStates.IsMeeting || ExileController.Instance || AntiBlackout.SkipTasks) yield return null;
|
||||
yield return new WaitForSeconds(1f);
|
||||
yield return new WaitForSecondsRealtime(1f);
|
||||
while (ReportDeadBodyPatch.MeetingStarted || GameStates.IsMeeting || ExileController.Instance || AntiBlackout.SkipTasks) yield return null;
|
||||
if (GameStates.IsEnded || !GameStates.InGame || GameStates.IsLobby) yield break;
|
||||
|
||||
@@ -420,7 +420,7 @@ namespace EHR
|
||||
}
|
||||
catch (Exception e) { Utils.ThrowException(e); }
|
||||
|
||||
yield return new WaitForSeconds(0.1f);
|
||||
yield return new WaitForSecondsRealtime(0.1f);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -457,7 +457,7 @@ namespace EHR
|
||||
}
|
||||
catch (Exception e) { Utils.ThrowException(e); }
|
||||
|
||||
yield return new WaitForSeconds(0.1f);
|
||||
yield return new WaitForSecondsRealtime(0.1f);
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -38,7 +38,7 @@ public static class DevManager
|
||||
if (request.result != UnityWebRequest.Result.Success)
|
||||
{
|
||||
Logger.Error($"Error fetching tags: {request.error}", "DevManager.FetchTags");
|
||||
yield return new WaitForSeconds(300f);
|
||||
yield return new WaitForSecondsRealtime(300f);
|
||||
yield return FetchTags();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -496,7 +496,7 @@ internal static class ExtendedPlayerControl
|
||||
IEnumerator DelayBasisChange()
|
||||
{
|
||||
while (AntiBlackout.SkipTasks || ExileController.Instance) yield return null;
|
||||
yield return new WaitForSeconds(1f);
|
||||
yield return new WaitForSecondsRealtime(1f);
|
||||
Logger.Msg($"Now that the anti-blackout processing or ejection screen showing is complete, the role basis of {player.GetNameWithRole()} will be changed", "RpcChangeRoleBasis");
|
||||
player.RpcChangeRoleBasis(newCustomRole, loggerRoleMap);
|
||||
}
|
||||
@@ -1154,7 +1154,7 @@ internal static class ExtendedPlayerControl
|
||||
yield break;
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(pc.IsAlive() ? 1f : 3f);
|
||||
yield return new WaitForSecondsRealtime(pc.IsAlive() ? 1f : 3f);
|
||||
|
||||
if (!GameStates.InGame || GameStates.IsEnded)
|
||||
{
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ internal static class LateTask
|
||||
|
||||
IEnumerator CoLateTask()
|
||||
{
|
||||
yield return new WaitForSeconds(time);
|
||||
yield return new WaitForSecondsRealtime(time);
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@ public static class LobbySharingAPI
|
||||
private static IEnumerator SendLobbyCreatedRequest(string roomCode, string serverName, string language, string version, int gameId, string hostName, string map, string gameMode, string hostHashedPuid)
|
||||
{
|
||||
long timeSinceLastRequest = Utils.TimeStamp - LastRequestTimeStamp;
|
||||
if (timeSinceLastRequest < BufferTime) yield return new WaitForSeconds(BufferTime);
|
||||
if (timeSinceLastRequest < BufferTime) yield return new WaitForSecondsRealtime(BufferTime);
|
||||
LastRequestTimeStamp = Utils.TimeStamp;
|
||||
|
||||
var jsonData = $"{{\"roomCode\":\"{roomCode}\",\"serverName\":\"{serverName}\",\"language\":\"{language}\",\"version\":\"{version}\",\"gameId\":\"{gameId}\",\"hostName\":\"{hostName}\",\"map\":\"{map}\",\"gameMode\":\"{gameMode}\",\"hostHashedPuid\":\"{hostHashedPuid}\"}}";
|
||||
@@ -109,7 +109,7 @@ public static class LobbySharingAPI
|
||||
if (string.IsNullOrWhiteSpace(Token)) yield break;
|
||||
|
||||
long timeSinceLastRequest = Utils.TimeStamp - LastRequestTimeStamp;
|
||||
if (timeSinceLastRequest < BufferTime) yield return new WaitForSeconds(BufferTime);
|
||||
if (timeSinceLastRequest < BufferTime) yield return new WaitForSecondsRealtime(BufferTime);
|
||||
LastRequestTimeStamp = Utils.TimeStamp;
|
||||
|
||||
var jsonData = $"{{\"roomCode\":\"{roomCode}\",\"token\":\"{Token}\",\"newStatus\":\"{newStatus}\",\"players\":\"{players}\",\"map\":\"{map}\",\"gameMode\":\"{gameMode}\"}}";
|
||||
|
||||
+12
-8
@@ -1797,14 +1797,15 @@ public static class Utils
|
||||
}
|
||||
|
||||
public static bool TempReviveHostRunning;
|
||||
private static Stopwatch TempReviveHostStopwatch = new();
|
||||
private static Stopwatch TempReviveHostRevertStopwatch = new();
|
||||
private static Stopwatch TempReviveHostTimeSinceRevivalStopwatch = new();
|
||||
|
||||
public static void SendMultipleMessages(this IEnumerable<Message> messages, SendOption sendOption = SendOption.Reliable)
|
||||
{
|
||||
messages.Do(x => SendMessage(x.Text, x.SendTo, x.Title, sendOption: sendOption));
|
||||
}
|
||||
|
||||
public static CustomRpcSender SendMessage(string text, byte sendTo = byte.MaxValue, string title = "", bool noSplit = false, CustomRpcSender writer = null, bool final = false, bool multiple = false, SendOption sendOption = SendOption.Reliable, bool addToHistory = true, [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = 0)
|
||||
public static CustomRpcSender SendMessage(string text, byte sendTo = byte.MaxValue, string title = "", bool noSplit = false, CustomRpcSender writer = null, bool final = false, bool multiple = false, SendOption sendOption = SendOption.Reliable, bool addToHistory = true, bool force = false, [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1814,7 +1815,7 @@ public static class Utils
|
||||
text = text.RemoveHtmlTags();
|
||||
|
||||
PlayerControl receiver = GetPlayerById(sendTo, false);
|
||||
if (sendTo != byte.MaxValue && receiver == null || title.RemoveHtmlTags().Trim().Length == 0 && text.RemoveHtmlTags().Trim().Length == 0) return writer;
|
||||
if (sendTo != byte.MaxValue && receiver == null || !force && title.RemoveHtmlTags().Trim().Length == 0 && text.RemoveHtmlTags().Trim().Length == 0) return writer;
|
||||
|
||||
if (!AmongUsClient.Instance.AmHost)
|
||||
{
|
||||
@@ -1857,10 +1858,10 @@ public static class Utils
|
||||
}
|
||||
else
|
||||
{
|
||||
if (TempReviveHostStopwatch.ElapsedMilliseconds < 200)
|
||||
if (TempReviveHostTimeSinceRevivalStopwatch.ElapsedMilliseconds < 250)
|
||||
delayMessage = true;
|
||||
|
||||
TempReviveHostStopwatch.Restart();
|
||||
TempReviveHostRevertStopwatch.Restart();
|
||||
}
|
||||
|
||||
if (delayMessage)
|
||||
@@ -1870,7 +1871,7 @@ public static class Utils
|
||||
|
||||
IEnumerator DelaySend()
|
||||
{
|
||||
yield return new WaitForSeconds(0.3f);
|
||||
yield return new WaitForSecondsRealtime(0.3f);
|
||||
SendMessage(text, sendTo, title, noSplit, writer, final, multiple, sendOption, addToHistory);
|
||||
}
|
||||
}
|
||||
@@ -1878,18 +1879,21 @@ public static class Utils
|
||||
IEnumerator TempReviveHost()
|
||||
{
|
||||
TempReviveHostRunning = true;
|
||||
TempReviveHostStopwatch = Stopwatch.StartNew();
|
||||
TempReviveHostRevertStopwatch = Stopwatch.StartNew();
|
||||
TempReviveHostTimeSinceRevivalStopwatch = Stopwatch.StartNew();
|
||||
|
||||
Logger.Msg("Temporarily reviving host to send message....", "TempReviveHost");
|
||||
|
||||
sender.Data.IsDead = false;
|
||||
sender.Data.SendGameData();
|
||||
|
||||
while (TempReviveHostStopwatch.ElapsedMilliseconds < 1000)
|
||||
while (TempReviveHostRevertStopwatch.ElapsedMilliseconds < 1000)
|
||||
yield return null;
|
||||
|
||||
Logger.Msg("Re-killing host after message sent.", "TempReviveHost");
|
||||
|
||||
TempReviveHostTimeSinceRevivalStopwatch.Reset();
|
||||
|
||||
if (!AmongUsClient.Instance.AmHost || GameStates.IsEnded || GameStates.IsLobby)
|
||||
{
|
||||
TempReviveHostRunning = false;
|
||||
|
||||
@@ -477,7 +477,7 @@ internal static class ChatCommands
|
||||
{
|
||||
WaitingToSend = true;
|
||||
while (Utils.TempReviveHostRunning && AmongUsClient.Instance.AmHost) yield return null;
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
yield return new WaitForSecondsRealtime(0.5f);
|
||||
if (GameStates.IsEnded || GameStates.IsLobby) yield break;
|
||||
WaitingToSend = false;
|
||||
if (HudManager.InstanceExists) HudManager.Instance.Chat.SendChat();
|
||||
@@ -1465,7 +1465,7 @@ internal static class ChatCommands
|
||||
|
||||
messages.SendMultipleMessages(index == 0 ? SendOption.Reliable : SendOption.None);
|
||||
|
||||
yield return new WaitForSeconds(20f);
|
||||
yield return new WaitForSecondsRealtime(20f);
|
||||
if (DraftResult.Count >= DraftRoles.Count || !GameStates.IsLobby || GameStates.InGame) yield break;
|
||||
}
|
||||
}
|
||||
@@ -1709,7 +1709,7 @@ internal static class ChatCommands
|
||||
while (!GameStates.IsMeeting && GameStates.InGame) yield return null;
|
||||
if (!GameStates.InGame) yield break;
|
||||
|
||||
if (!meeting) yield return new WaitForSeconds(7f);
|
||||
if (!meeting) yield return new WaitForSecondsRealtime(7f);
|
||||
|
||||
PlayerControl killer = player.GetRealKiller();
|
||||
if (killer == null && id != 3) yield break;
|
||||
@@ -3724,7 +3724,7 @@ internal static class ChatUpdatePatch
|
||||
|
||||
internal static bool SendLastMessages(ref CustomRpcSender sender)
|
||||
{
|
||||
PlayerControl player = GameStates.IsLobby ? Main.AllPlayerControls.Without(PlayerControl.LocalPlayer).RandomElement() : Main.AllAlivePlayerControls.MinBy(x => x.PlayerId) ?? Main.AllPlayerControls.MinBy(x => x.PlayerId) ?? PlayerControl.LocalPlayer;
|
||||
PlayerControl player = GameStates.CurrentServerType == GameStates.ServerType.Vanilla ? PlayerControl.LocalPlayer : GameStates.IsLobby ? Main.AllPlayerControls.Without(PlayerControl.LocalPlayer).RandomElement() : Main.AllAlivePlayerControls.MinBy(x => x.PlayerId) ?? Main.AllPlayerControls.MinBy(x => x.PlayerId) ?? PlayerControl.LocalPlayer;
|
||||
if (player == null) return false;
|
||||
|
||||
bool wasCleared = false;
|
||||
|
||||
@@ -222,6 +222,26 @@ public static class ChatManager
|
||||
PlayerControl[] aapc = Main.AllAlivePlayerControls;
|
||||
if (aapc.Length == 0) return;
|
||||
|
||||
if (GameStates.CurrentServerType == GameStates.ServerType.Vanilla)
|
||||
{
|
||||
ClearChat();
|
||||
|
||||
StringBuilder sb = new();
|
||||
ChatHistory.ForEach(x =>
|
||||
{
|
||||
string[] split = x.Split(':');
|
||||
byte id = byte.Parse(split[0].Trim());
|
||||
string msg = string.Join(':', split[1..]).Trim();
|
||||
sb.Append(id.ColoredPlayerName());
|
||||
sb.Append(':');
|
||||
sb.Append(' ');
|
||||
sb.AppendLine(msg);
|
||||
});
|
||||
LateTask.New(() => Utils.SendMessage("\n", title: sb.ToString().Trim()), 0.2f);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
string[] filtered = ChatHistory.Where(a => Utils.GetPlayerById(Convert.ToByte(a.Split(':')[0].Trim())).IsAlive()).ToArray();
|
||||
ChatController chat = HudManager.Instance.Chat;
|
||||
var writer = CustomRpcSender.Create("SendPreviousMessagesToAll", SendOption.Reliable);
|
||||
@@ -257,8 +277,8 @@ public static class ChatManager
|
||||
|
||||
private static void SendRPC(CustomRpcSender writer, PlayerControl senderPlayer, string senderMessage, int targetClientId = -1)
|
||||
{
|
||||
if (GameStates.IsLobby && senderPlayer.IsHost())
|
||||
senderMessage = senderMessage.Insert(0, new('\n', senderPlayer.GetRealName().Count(x => x == '\n')));
|
||||
if (GameStates.IsLobby && senderPlayer.AmOwner)
|
||||
senderMessage = senderMessage.Insert(0, new('\n', PlayerControl.LocalPlayer.name.Count(x => x == '\n')));
|
||||
|
||||
writer.AutoStartRpc(senderPlayer.NetId, RpcCalls.SendChat, targetClientId)
|
||||
.Write(senderMessage)
|
||||
@@ -269,9 +289,19 @@ public static class ChatManager
|
||||
public static void ClearChat(params PlayerControl[] targets)
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost) return;
|
||||
PlayerControl player = Main.AllAlivePlayerControls.MinBy(x => x.PlayerId) ?? Main.AllPlayerControls.MinBy(x => x.PlayerId) ?? PlayerControl.LocalPlayer;
|
||||
PlayerControl player = GameStates.CurrentServerType == GameStates.ServerType.Vanilla ? PlayerControl.LocalPlayer : Main.AllAlivePlayerControls.MinBy(x => x.PlayerId) ?? Main.AllPlayerControls.MinBy(x => x.PlayerId) ?? PlayerControl.LocalPlayer;
|
||||
if (player == null) return;
|
||||
|
||||
if (GameStates.CurrentServerType == GameStates.ServerType.Vanilla)
|
||||
{
|
||||
if (targets.Length <= 1 || targets.Length >= Main.AllAlivePlayerControls.Length)
|
||||
Loop.Times(30, _ => Utils.SendMessage(string.Empty, targets.Length == 1 ? targets[0].PlayerId : byte.MaxValue, force: true, sendOption: SendOption.None));
|
||||
else
|
||||
targets.Do(x => Loop.Times(30, _ => Utils.SendMessage(string.Empty, x.PlayerId, force: true, sendOption: SendOption.None)));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (targets.Length == 0 || targets.Length == PlayerControl.AllPlayerControls.Count) SendEmptyMessage(null);
|
||||
else targets.Do(SendEmptyMessage);
|
||||
return;
|
||||
|
||||
@@ -408,7 +408,7 @@ internal static class GameEndChecker
|
||||
self.FinishRpcImmediately(winnerWriter);
|
||||
|
||||
// Delay to ensure that resuscitation is delivered after the ghost roll setting
|
||||
yield return new WaitForSeconds(EndGameDelay);
|
||||
yield return new WaitForSecondsRealtime(EndGameDelay);
|
||||
|
||||
if (playersToRevive.Count > 0)
|
||||
{
|
||||
@@ -424,7 +424,7 @@ internal static class GameEndChecker
|
||||
}
|
||||
|
||||
// Delay to ensure that the end of the game is delivered at the end of the game
|
||||
yield return new WaitForSeconds(EndGameDelay);
|
||||
yield return new WaitForSecondsRealtime(EndGameDelay);
|
||||
}
|
||||
|
||||
// Start End Game
|
||||
|
||||
@@ -175,7 +175,7 @@ internal static class ControllerManagerUpdatePatch
|
||||
|
||||
IEnumerator Reset()
|
||||
{
|
||||
yield return new WaitForSeconds(0.1f);
|
||||
yield return new WaitForSecondsRealtime(0.1f);
|
||||
|
||||
string format = GetString("ResettingOptions");
|
||||
HudManager hudManager = HudManager.Instance;
|
||||
|
||||
@@ -788,7 +788,7 @@ public static class StringOptionPatch
|
||||
IEnumerator CoRoutine()
|
||||
{
|
||||
while (HelpShowEndTS > Utils.TimeStamp)
|
||||
yield return new WaitForSeconds(1f);
|
||||
yield return new WaitForSecondsRealtime(1f);
|
||||
|
||||
GameObject gameObject = GameObject.Find("PlayerOptionsMenu(Clone)");
|
||||
|
||||
|
||||
+1
-1
@@ -716,7 +716,7 @@ internal static class HudManagerStartPatch
|
||||
while (!HudManager.Instance)
|
||||
yield return null;
|
||||
|
||||
yield return new WaitForSeconds(0.01f);
|
||||
yield return new WaitForSecondsRealtime(0.01f);
|
||||
ResizeUI(Main.UIScaleFactor.Value);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ public static class CredentialsPatch
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
yield return new WaitForSeconds(1f);
|
||||
yield return new WaitForSecondsRealtime(1f);
|
||||
|
||||
if (__instance != null)
|
||||
{
|
||||
|
||||
@@ -1321,7 +1321,7 @@ internal static class MeetingHudOnDestroyPatch
|
||||
while (!ExileController.Instance && !GameStates.IsEnded) yield return null;
|
||||
if (GameStates.IsEnded) yield break;
|
||||
|
||||
yield return new WaitForSeconds(1f);
|
||||
yield return new WaitForSecondsRealtime(1f);
|
||||
if (!ExileController.Instance || GameStates.IsEnded) yield break;
|
||||
|
||||
if (CheckForEndVotingPatch.EjectionText.EndsWith("<size=0>") && Options.CurrentGameMode is CustomGameMode.Standard or CustomGameMode.TheMindGame && CheckForEndVotingPatch.TempExiledPlayer != null)
|
||||
|
||||
@@ -1174,7 +1174,7 @@ internal static class StartGameHostPatch
|
||||
RpcSetRoleReplacer.EndReplace();
|
||||
|
||||
|
||||
yield return new WaitForSeconds(1.2f);
|
||||
yield return new WaitForSecondsRealtime(1.2f);
|
||||
|
||||
foreach (PlayerControl pc in PlayerControl.AllPlayerControls)
|
||||
{
|
||||
|
||||
@@ -641,7 +641,7 @@ internal static class SetEverythingUpPatch
|
||||
|
||||
static IEnumerator SlideAndFadeIn(RectTransform rect, TextMeshPro text, float delay)
|
||||
{
|
||||
yield return new WaitForSeconds(delay);
|
||||
yield return new WaitForSecondsRealtime(delay);
|
||||
|
||||
Vector2 start = rect.anchoredPosition;
|
||||
Vector2 end = start + new Vector2(5f, 0); // target pos
|
||||
|
||||
@@ -224,7 +224,7 @@ internal static class ExternalRpcPetPatch
|
||||
{
|
||||
HudManagerPatch.CooldownTimerFlashColor = yellow ? Color.red : Color.yellow;
|
||||
yellow = !yellow;
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
yield return new WaitForSecondsRealtime(0.2f);
|
||||
}
|
||||
|
||||
HudManagerPatch.CooldownTimerFlashColor = null;
|
||||
|
||||
@@ -210,7 +210,7 @@ internal static class OnGameJoinedPatch
|
||||
|
||||
IEnumerator CoRoutine()
|
||||
{
|
||||
yield return new WaitForSeconds(10f);
|
||||
yield return new WaitForSecondsRealtime(10f);
|
||||
|
||||
try { Utils.SendMessage(HudManagerPatch.BuildAutoGMRotationStatusText(true), title: GetString("AutoGMRotationStatusText")); }
|
||||
catch (Exception e) { Utils.ThrowException(e); }
|
||||
|
||||
@@ -108,7 +108,7 @@ public class Car : RoleBase
|
||||
if (PhysicsHelpers.AnythingBetween(collider, collider.bounds.center, newPos + (addVector * 2), Constants.ShipOnlyMask, false)) break;
|
||||
|
||||
target.TP(newPos, log: false);
|
||||
yield return new WaitForSeconds(0.05f);
|
||||
yield return new WaitForSecondsRealtime(0.05f);
|
||||
}
|
||||
|
||||
Main.AllPlayerSpeed[target.PlayerId] = oldSpeed;
|
||||
|
||||
@@ -105,18 +105,18 @@ internal class Spiritualist : RoleBase
|
||||
var writer = CustomRpcSender.Create("SpiritualistSendMessage", SendOption.Reliable);
|
||||
writer.StartMessage(target.OwnerId);
|
||||
|
||||
writer.StartRpc(target.NetId, RpcCalls.SetName)
|
||||
.Write(target.Data.NetId)
|
||||
writer.StartRpc(PlayerControl.LocalPlayer.NetId, RpcCalls.SetName)
|
||||
.Write(PlayerControl.LocalPlayer.Data.NetId)
|
||||
.Write(GetString("SpiritualistNoticeTitle"))
|
||||
.EndRpc();
|
||||
|
||||
writer.StartRpc(target.NetId, RpcCalls.SendChat)
|
||||
writer.StartRpc(PlayerControl.LocalPlayer.NetId, RpcCalls.SendChat)
|
||||
.Write(GetString("SpiritualistNoticeMessage"))
|
||||
.EndRpc();
|
||||
|
||||
writer.StartRpc(target.NetId, RpcCalls.SetName)
|
||||
.Write(target.Data.NetId)
|
||||
.Write(target.Data.PlayerName)
|
||||
writer.StartRpc(PlayerControl.LocalPlayer.NetId, RpcCalls.SetName)
|
||||
.Write(PlayerControl.LocalPlayer.Data.NetId)
|
||||
.Write(PlayerControl.LocalPlayer.Data.PlayerName)
|
||||
.EndRpc();
|
||||
|
||||
writer.EndMessage();
|
||||
|
||||
@@ -152,7 +152,7 @@ internal class TimeMaster : RoleBase
|
||||
player.MarkDirtySettings();
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(0.55f);
|
||||
yield return new WaitForSecondsRealtime(0.55f);
|
||||
|
||||
for (long i = now - 1; i >= now - length; i--)
|
||||
{
|
||||
@@ -166,7 +166,7 @@ internal class TimeMaster : RoleBase
|
||||
player.TP(pos);
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(delay);
|
||||
yield return new WaitForSecondsRealtime(delay);
|
||||
}
|
||||
|
||||
if (TimeMasterCanRevive.GetBool())
|
||||
|
||||
@@ -140,7 +140,7 @@ public class Stasis : RoleBase
|
||||
try { imps.NotifyPlayers($"<#00ffa5>{Translator.GetString("Stasis.TimeFrozenNotify")}</color> <#888888>-</color> <#ffffff>{time - i}</color>", overrideAll: true); }
|
||||
catch (Exception e) { Utils.ThrowException(e); }
|
||||
|
||||
yield return new WaitForSeconds(1f);
|
||||
yield return new WaitForSecondsRealtime(1f);
|
||||
}
|
||||
|
||||
UsingAbility = false;
|
||||
|
||||
@@ -149,7 +149,7 @@ public class Venerer : RoleBase
|
||||
});
|
||||
frozenPlayers = nearbyPlayers;
|
||||
|
||||
yield return new WaitForSeconds(1f);
|
||||
yield return new WaitForSecondsRealtime(1f);
|
||||
timer--;
|
||||
}
|
||||
|
||||
|
||||
@@ -119,18 +119,18 @@ public class Spiritcaller : RoleBase
|
||||
var writer = CustomRpcSender.Create("SpiritCallerSendMessage", SendOption.Reliable);
|
||||
writer.StartMessage(target.OwnerId);
|
||||
|
||||
writer.StartRpc(target.NetId, RpcCalls.SetName)
|
||||
.Write(target.Data.NetId)
|
||||
writer.StartRpc(PlayerControl.LocalPlayer.NetId, RpcCalls.SetName)
|
||||
.Write(PlayerControl.LocalPlayer.Data.NetId)
|
||||
.Write(GetString("SpiritcallerNoticeTitle"))
|
||||
.EndRpc();
|
||||
|
||||
writer.StartRpc(target.NetId, RpcCalls.SendChat)
|
||||
writer.StartRpc(PlayerControl.LocalPlayer.NetId, RpcCalls.SendChat)
|
||||
.Write(GetString("SpiritcallerNoticeMessage"))
|
||||
.EndRpc();
|
||||
|
||||
writer.StartRpc(target.NetId, RpcCalls.SetName)
|
||||
.Write(target.Data.NetId)
|
||||
.Write(target.Data.PlayerName)
|
||||
writer.StartRpc(PlayerControl.LocalPlayer.NetId, RpcCalls.SetName)
|
||||
.Write(PlayerControl.LocalPlayer.Data.NetId)
|
||||
.Write(PlayerControl.LocalPlayer.Data.PlayerName)
|
||||
.EndRpc();
|
||||
|
||||
writer.EndMessage();
|
||||
|
||||
Reference in new issue
Block a user