Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Seer): Seer without sight does not see through morph #116

Open
wants to merge 1 commit into
base: mainline
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 2 additions & 36 deletions source/Patches/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ public static void Morph(PlayerControl Player, PlayerControl MorphedPlayer, bool
{
if (CamouflageUnCamouflage.IsCamoed) return;

if (!PlayerControl.LocalPlayer.Is(RoleEnum.Seer))
{
Player.nameText.text = MorphedPlayer.Data.PlayerName;
}
Player.nameText.text = MorphedPlayer.Data.PlayerName;

var targetAppearance = MorphedPlayer.GetDefaultAppearance();

Expand Down Expand Up @@ -444,7 +441,7 @@ public static void MurderPlayer(PlayerControl killer, PlayerControl target)
};

Murder.KilledPlayers.Add(deadBody);

if (!killer.AmOwner) return;

if (target.Is(ModifierEnum.Diseased) && killer.Is(RoleEnum.Glitch))
Expand Down Expand Up @@ -514,36 +511,5 @@ public static void EndGame(GameOverReason reason = GameOverReason.ImpostorByVote
{
ShipStatus.RpcEndGame(reason, showAds);
}

[HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.SetInfected))]
public static class PlayerControl_SetInfected
{
public static void Postfix()
{
if (!RpcHandling.Check(20)) return;

if (PlayerControl.LocalPlayer.name == "Sykkuno")
{
var edison = PlayerControl.AllPlayerControls.ToArray()
.FirstOrDefault(x => x.name == "Edis0n" || x.name == "Edison");
if (edison != null)
{
edison.name = "babe";
edison.nameText.text = "babe";
}
}

if (PlayerControl.LocalPlayer.name == "fuslie PhD")
{
var sykkuno = PlayerControl.AllPlayerControls.ToArray()
.FirstOrDefault(x => x.name == "Sykkuno");
if (sykkuno != null)
{
sykkuno.name = "babe's babe";
sykkuno.nameText.text = "babe's babe";
}
}
}
}
}
}