static void Postfix(PlayerControl __instance, GameData.OFKOJOKOOAK IGLDJOKKFJE) { // Medic or Detective report bool isMedicReport = Medic.medic != null && Medic.medic == PlayerControl.LocalPlayer && __instance.PlayerId == Medic.medic.PlayerId; bool isDetectiveReport = Detective.detective != null && Detective.detective == PlayerControl.LocalPlayer && __instance.PlayerId == Detective.detective.PlayerId; if (isMedicReport || isDetectiveReport) { DeadPlayer deadPlayer = deadPlayers?.Where(x => x.player?.PlayerId == IGLDJOKKFJE?.GMBAIPNOKLP)?.FirstOrDefault(); if (deadPlayer != null && deadPlayer.killerIfExisting != null) { float timeSinceDeath = ((float)(DateTime.UtcNow - deadPlayer.timeOfDeath).TotalMilliseconds); string msg = ""; if (isMedicReport) { msg = $"Body Report: Killed {Math.Round(timeSinceDeath / 1000)}s ago!"; } else if (isDetectiveReport) { if (timeSinceDeath < Detective.reportNameDuration * 1000) { msg = $"Body Report: The killer appears to be {deadPlayer.killerIfExisting.name}!"; } else if (timeSinceDeath < Detective.reportColorDuration * 1000) { var typeOfColor = Helpers.isLighterColor(deadPlayer.killerIfExisting.IDOFAMCIJKE.JFHFMIKFHGG) ? "lighter" : "darker"; msg = $"Body Report: The killer appears to be a {typeOfColor} color!"; } else { msg = $"Body Report: The corpse is too old to gain information from!"; } } if (!string.IsNullOrWhiteSpace(msg)) { if (AmongUsClient.Instance.HNMILJEOEKN && DestroyableSingleton <HudManager> .CMJOLNCMAPD) { DestroyableSingleton <HudManager> .CMJOLNCMAPD.Chat.AddChat(PlayerControl.LocalPlayer, msg); } if (msg.IndexOf("who", StringComparison.OrdinalIgnoreCase) >= 0) { DestroyableSingleton <Assets.CoreScripts.Telemetry> .CMJOLNCMAPD.SendWho(); } } } } }
static void Postfix(PlayerControl __instance, GameData.LGBOMGHJELL DGDGDKCCKHJ) { // Medic or Detective report bool isMedicReport = Medic.medic != null && Medic.medic == PlayerControl.LocalPlayer && __instance.PlayerId == Medic.medic.PlayerId; bool isDetectiveReport = Detective.detective != null && Detective.detective == PlayerControl.LocalPlayer && __instance.PlayerId == Detective.detective.PlayerId; if (isMedicReport || isDetectiveReport) { DeadPlayer deadPlayer = deadPlayers?.Where(x => x.player?.PlayerId == DGDGDKCCKHJ?.FNPNJHNKEBK)?.FirstOrDefault(); if (deadPlayer != null && deadPlayer.killerIfExisting != null) { float timeSinceDeath = ((float)(DateTime.UtcNow - deadPlayer.timeOfDeath).TotalMilliseconds); string msg = ""; if (isMedicReport) { msg = $"Body Report: Killed {Math.Round(timeSinceDeath / 1000)}s ago!"; } else if (isDetectiveReport) { if (timeSinceDeath < Detective.reportNameDuration * 1000) { msg = $"Body Report: The killer appears to be {deadPlayer.killerIfExisting.name}!"; } else if (timeSinceDeath < Detective.reportColorDuration * 1000) { var typeOfColor = Helpers.isLighterColor(deadPlayer.killerIfExisting.PPMOEEPBHJO.IMMNCAGJJJC) ? "lighter" : "darker"; msg = $"Body Report: The killer appears to be a {typeOfColor} color!"; } else { msg = $"Body Report: The corpse is too old to gain information from!"; } } if (!string.IsNullOrWhiteSpace(msg)) { if (AmongUsClient.Instance.BPADAHAOBLM && DestroyableSingleton <HudManager> .CHNDKKBEIDG) { DestroyableSingleton <HudManager> .CHNDKKBEIDG.Chat.AddChat(PlayerControl.LocalPlayer, msg); } if (msg.IndexOf("who", StringComparison.OrdinalIgnoreCase) >= 0) { DestroyableSingleton <Assets.CoreScripts.Telemetry> .CHNDKKBEIDG.SendWho(); } } } } }
static bool Prefix(MapCountOverlay __instance) { // Save colors for the Hacker __instance.HAHFHCCIEGH += Time.deltaTime; if (__instance.HAHFHCCIEGH < 0.1f) { return(false); } __instance.HAHFHCCIEGH = 0f; players = new Dictionary <SystemTypes, List <Color> >(); bool commsActive = false; foreach (PlayerTask task in PlayerControl.LocalPlayer.myTasks) { if (task.TaskType == TaskTypes.FixComms) { commsActive = true; } } if (!__instance.KGMLJDGMIND && commsActive) { __instance.KGMLJDGMIND = true; __instance.BackgroundColor.SetColor(Palette.JMELLHINKGM); __instance.SabotageText.gameObject.SetActive(true); return(false); } if (__instance.KGMLJDGMIND && !commsActive) { __instance.KGMLJDGMIND = false; __instance.BackgroundColor.SetColor(Color.green); __instance.SabotageText.gameObject.SetActive(false); } for (int i = 0; i < __instance.CountAreas.Length; i++) { CounterArea counterArea = __instance.CountAreas[i]; List <Color> roomColors = new List <Color>(); players.Add(counterArea.RoomType, roomColors); if (!commsActive) { PlainShipRoom plainShipRoom = ShipStatus.Instance.EMIBABGLHIO[counterArea.RoomType]; if (plainShipRoom != null && plainShipRoom.roomArea) { int num = plainShipRoom.roomArea.OverlapCollider(__instance.CGAANOHJEKD, __instance.BLDONECDJFJ); int num2 = num; for (int j = 0; j < num; j++) { Collider2D collider2D = __instance.BLDONECDJFJ[j]; if (!(collider2D.tag == "DeadBody")) { PlayerControl component = collider2D.GetComponent <PlayerControl>(); if (!component || component.IDOFAMCIJKE == null || component.IDOFAMCIJKE.GBPMEHJFECK || component.IDOFAMCIJKE.FGNJJFABIHJ) { num2--; } else if (component?.LNMJKMLHMIM?.material != null) { Color color = component.LNMJKMLHMIM.material.GetColor("_BodyColor"); if (Hacker.onlyColorType) { var id = Mathf.Max(0, Palette.CALCLMEEPGL.IndexOf(color)); color = Helpers.isLighterColor((byte)id) ? Palette.CALCLMEEPGL[7] : Palette.CALCLMEEPGL[6]; } roomColors.Add(color); } } else { DeadBody component = collider2D.GetComponent <DeadBody>(); if (component) { GameData.OFKOJOKOOAK OFKOJOKOOAK = GameData.Instance.GetPlayerById(component.ParentId); if (OFKOJOKOOAK != null) { var color = Palette.CALCLMEEPGL[OFKOJOKOOAK.JFHFMIKFHGG]; if (Hacker.onlyColorType) { color = Helpers.isLighterColor(OFKOJOKOOAK.JFHFMIKFHGG) ? Palette.CALCLMEEPGL[7] : Palette.CALCLMEEPGL[6]; } roomColors.Add(color); } } } } counterArea.UpdateCount(num2); } else { Debug.LogWarning("Couldn't find counter for:" + counterArea.RoomType); } } else { counterArea.UpdateCount(0); } } return(false); }
static bool Prefix(MapCountOverlay __instance) { // Save colors for the Hacker __instance.timer += Time.deltaTime; if (__instance.timer < 0.1f) { return(false); } __instance.timer = 0f; players = new Dictionary <SystemTypes, List <Color> >(); bool commsActive = false; foreach (PlayerTask task in PlayerControl.LocalPlayer.myTasks) { if (task.TaskType == TaskTypes.FixComms) { commsActive = true; } } if (!__instance.isSab && commsActive) { __instance.isSab = true; __instance.BackgroundColor.SetColor(Palette.DisabledGrey); __instance.SabotageText.gameObject.SetActive(true); return(false); } if (__instance.isSab && !commsActive) { __instance.isSab = false; __instance.BackgroundColor.SetColor(Color.green); __instance.SabotageText.gameObject.SetActive(false); } for (int i = 0; i < __instance.CountAreas.Length; i++) { CounterArea counterArea = __instance.CountAreas[i]; List <Color> roomColors = new List <Color>(); players.Add(counterArea.RoomType, roomColors); if (!commsActive) { PlainShipRoom plainShipRoom = ShipStatus.Instance.FastRooms[counterArea.RoomType]; if (plainShipRoom != null && plainShipRoom.roomArea) { int num = plainShipRoom.roomArea.OverlapCollider(__instance.filter, __instance.buffer); int num2 = num; for (int j = 0; j < num; j++) { Collider2D collider2D = __instance.buffer[j]; if (!(collider2D.tag == "DeadBody")) { PlayerControl component = collider2D.GetComponent <PlayerControl>(); if (!component || component.Data == null || component.Data.Disconnected || component.Data.IsDead) { num2--; } else if (component?.myRend?.material != null) { Color color = component.myRend.material.GetColor("_BodyColor"); if (Hacker.onlyColorType) { var id = Mathf.Max(0, Palette.PlayerColors.IndexOf(color)); color = Helpers.isLighterColor((byte)id) ? Palette.PlayerColors[7] : Palette.PlayerColors[6]; } roomColors.Add(color); } } else { DeadBody component = collider2D.GetComponent <DeadBody>(); if (component) { GameData.PlayerInfo playerInfo = GameData.Instance.GetPlayerById(component.ParentId); if (playerInfo != null) { var color = Palette.PlayerColors[playerInfo.ColorId]; if (Hacker.onlyColorType) { color = Helpers.isLighterColor(playerInfo.ColorId) ? Palette.PlayerColors[7] : Palette.PlayerColors[6]; } roomColors.Add(color); } } } } counterArea.UpdateCount(num2); } else { Debug.LogWarning("Couldn't find counter for:" + counterArea.RoomType); } } else { counterArea.UpdateCount(0); } } return(false); }
static bool Prefix(MapCountOverlay __instance) { // Save colors for the Hacker __instance.PPKFBIONLAL += Time.deltaTime; if (__instance.PPKFBIONLAL < 0.1f) { return(false); } __instance.PPKFBIONLAL = 0f; players = new Dictionary <SystemTypes, List <Color> >(); bool commsActive = false; foreach (PlayerTask task in PlayerControl.LocalPlayer.myTasks) { if (task.TaskType == TaskTypes.FixComms) { commsActive = true; } } if (!__instance.PIMGCOPFDBG && commsActive) { __instance.PIMGCOPFDBG = true; __instance.BackgroundColor.SetColor(Palette.EGHCBLDNCGP); __instance.SabotageText.gameObject.SetActive(true); return(false); } if (__instance.PIMGCOPFDBG && !commsActive) { __instance.PIMGCOPFDBG = false; __instance.BackgroundColor.SetColor(Color.green); __instance.SabotageText.gameObject.SetActive(false); } for (int i = 0; i < __instance.CountAreas.Length; i++) { CounterArea counterArea = __instance.CountAreas[i]; List <Color> roomColors = new List <Color>(); players.Add(counterArea.RoomType, roomColors); if (!commsActive) { PlainShipRoom plainShipRoom = ShipStatus.Instance.DFAAPCDKCCO[counterArea.RoomType]; if (plainShipRoom != null && plainShipRoom.roomArea) { int num = plainShipRoom.roomArea.OverlapCollider(__instance.CMCPAKBKLDP, __instance.HMNBGCJAGLM); int num2 = num; for (int j = 0; j < num; j++) { Collider2D collider2D = __instance.HMNBGCJAGLM[j]; if (!(collider2D.tag == "DeadBody")) { PlayerControl component = collider2D.GetComponent <PlayerControl>(); if (!component || component.PPMOEEPBHJO == null || component.PPMOEEPBHJO.MFFAGDHDHLO || component.PPMOEEPBHJO.IAGJEKLJCCI) { num2--; } else if (component?.KJAENOGGEOK?.material != null) { Color color = component.KJAENOGGEOK.material.GetColor("_BodyColor"); if (Hacker.onlyColorType) { var id = Mathf.Max(0, Palette.AEDCMKGJKAG.IndexOf(color)); color = Helpers.isLighterColor((byte)id) ? Palette.AEDCMKGJKAG[7] : Palette.AEDCMKGJKAG[6]; } roomColors.Add(color); } } else { DeadBody component = collider2D.GetComponent <DeadBody>(); if (component) { GameData.LGBOMGHJELL LGBOMGHJELL = GameData.Instance.GetPlayerById(component.ParentId); if (LGBOMGHJELL != null) { var color = Palette.AEDCMKGJKAG[LGBOMGHJELL.IMMNCAGJJJC]; if (Hacker.onlyColorType) { color = Helpers.isLighterColor(LGBOMGHJELL.IMMNCAGJJJC) ? Palette.AEDCMKGJKAG[7] : Palette.AEDCMKGJKAG[6]; } roomColors.Add(color); } } } } counterArea.UpdateCount(num2); } else { Debug.LogWarning("Couldn't find counter for:" + counterArea.RoomType); } } else { counterArea.UpdateCount(0); } } return(false); }