Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
impostor4291 authored Jan 9, 2025
1 parent 27ae011 commit ab15e34
Showing 1 changed file with 5 additions and 24 deletions.
29 changes: 5 additions & 24 deletions Patches/IntroPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -330,17 +330,6 @@ public static bool Prefix(IntroCutscene __instance, ref Il2CppSystem.Collections
__instance.overlayHandle.color = new Color32(86, 0, 255, byte.MaxValue);
return true;
}
else if (PlayerControl.LocalPlayer.Is(CustomRoles.Narc))
{
var narcDisplay = new Il2CppSystem.Collections.Generic.List<PlayerControl>();
narcDisplay.Add(PlayerControl.LocalPlayer);
foreach (var pc in Main.AllAlivePlayerControls)
{
if (pc != PlayerControl.LocalPlayer)
narcDisplay.Add(pc);
}
teamToDisplay = narcDisplay;
}
else if (role.IsMadmate() || PlayerControl.LocalPlayer.Is(CustomRoles.Madmate))
{
teamToDisplay = new Il2CppSystem.Collections.Generic.List<PlayerControl>();
Expand Down Expand Up @@ -599,14 +588,6 @@ public static void Postfix(IntroCutscene __instance)
__instance.ImpostorText.gameObject.SetActive(true);
__instance.ImpostorText.text = GetString("SubText.Egoist");
}
else if (PlayerControl.LocalPlayer.Is(CustomRoles.Narc))
{
__instance.TeamTitle.text = GetString("TeamCrewmate");
__instance.TeamTitle.color = __instance.BackgroundBar.material.color = new Color32(140, 255, 255, byte.MaxValue);
PlayerControl.LocalPlayer.Data.Role.IntroSound = GetIntroSound(RoleTypes.Crewmate);
__instance.ImpostorText.gameObject.SetActive(true);
__instance.ImpostorText.text = GetString("SubText.Crewmate");
}
else if (PlayerControl.LocalPlayer.Is(CustomRoles.Madmate) || role.IsMadmate())
{
__instance.TeamTitle.text = GetString("TeamMadmate");
Expand Down Expand Up @@ -689,12 +670,12 @@ public static bool Prefix(IntroCutscene __instance, ref Il2CppSystem.Collections
}
// Madmate called from BeginCrewmate, need to skip previous Lovers and Egoist check here

if ((role.IsMadmate() || PlayerControl.LocalPlayer.Is(CustomRoles.Madmate)) && !PlayerControl.LocalPlayer.Is(CustomRoles.Narc))
if (role.IsMadmate() || PlayerControl.LocalPlayer.Is(CustomRoles.Madmate))
{
yourTeam = new();
yourTeam.Add(PlayerControl.LocalPlayer);

if (PlayerControl.LocalPlayer.CheckMMCanSeeImp(CheckImp:false)) // Parasite and Impostor doesnt know each other
if (role != CustomRoles.Parasite) // Parasite and Impostor doesnt know each other
{
// Crew postor is counted as madmate but should be a impostor
if (Madmate.MadmateKnowWhosImp.GetBool() || role != CustomRoles.Madmate)
Expand All @@ -718,7 +699,7 @@ public static bool Prefix(IntroCutscene __instance, ref Il2CppSystem.Collections
return true;
}

if ((role.IsCrewmate() && role.GetDYRole() == RoleTypes.Impostor) || PlayerControl.LocalPlayer.Is(CustomRoles.Narc))
if (role.IsCrewmate() && role.GetDYRole() == RoleTypes.Impostor)
{
yourTeam = new();
yourTeam.Add(PlayerControl.LocalPlayer);
Expand All @@ -739,13 +720,13 @@ public static bool Prefix(IntroCutscene __instance, ref Il2CppSystem.Collections
}

// We only check Impostor main role here!
if (role.IsImpostor() && !PlayerControl.LocalPlayer.Is(CustomRoles.Narc))
if (role.IsImpostor())
{
yourTeam = new();
yourTeam.Add(PlayerControl.LocalPlayer);

// Parasite and Impostor doesnt know each other
foreach (var pc in Main.AllAlivePlayerControls.Where(x => !x.AmOwner && x.CheckMMCanSeeImp(CheckImp:false)))
foreach (var pc in Main.AllAlivePlayerControls.Where(x => !x.AmOwner && !x.Is(CustomRoles.Parasite) && (x.GetCustomRole().IsImpostor() || !x.Is(CustomRoles.Madmate) && x.GetCustomRole().IsMadmate())))
{
yourTeam.Add(pc);
}
Expand Down

0 comments on commit ab15e34

Please sign in to comment.