Skip to content

Commit

Permalink
Merge pull request EnhancedNetwork#1355 from PEPPERcula/main
Browse files Browse the repository at this point in the history
More punctuation fixes
  • Loading branch information
NikoCat233 authored Jan 9, 2025
2 parents 4dce461 + a04e60d commit bac4aeb
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 64 deletions.
19 changes: 14 additions & 5 deletions Patches/IntroPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,6 @@ public static void Postfix(IntroCutscene __instance)
case CustomRoles.SoulCatcher:
case CustomRoles.Specter:
case CustomRoles.Stalker:
case CustomRoles.CovenLeader:
case CustomRoles.PhantomTOHE:
PlayerControl.LocalPlayer.Data.Role.IntroSound = GetIntroSound(RoleTypes.Phantom);
break;
Expand Down Expand Up @@ -557,17 +556,27 @@ public static void Postfix(IntroCutscene __instance)
PlayerControl.LocalPlayer.Data.Role.IntroSound = PlayerControl.LocalPlayer.MyPhysics.ImpostorDiscoveredSound;
break;
case CustomRoles.Jinx:
case CustomRoles.Romantic:
PlayerControl.LocalPlayer.Data.Role.IntroSound = RoleManager.Instance.AllRoles.FirstOrDefault((role) => role.Role == RoleTypes.GuardianAngel)?.UseSound;
break;
case CustomRoles.Illusionist:
case CustomRoles.MoonDancer:
PlayerControl.LocalPlayer.Data.Role.IntroSound = RoleManager.Instance.AllRoles.FirstOrDefault((role) => role.Role == RoleTypes.Phantom)?.UseSound;
break;
case CustomRoles.Telecommunication:
PlayerControl.LocalPlayer.Data.Role.IntroSound = RoleManager.Instance.AllRoles.FirstOrDefault((role) => role.Role == RoleTypes.Tracker)?.UseSound;
break;
case CustomRoles.Morphling:
case CustomRoles.Twister:
PlayerControl.LocalPlayer.Data.Role.IntroSound = RoleManager.Instance.AllRoles.FirstOrDefault((role) => role.Role == RoleTypes.Shapeshifter)?.UseSound;
break;
}

if (PlayerControl.LocalPlayer.Is(CustomRoles.Lovers))
{
__instance.TeamTitle.text = GetString("TeamLovers");
__instance.TeamTitle.color = __instance.BackgroundBar.material.color = new Color32(255, 154, 206, byte.MaxValue);
PlayerControl.LocalPlayer.Data.Role.IntroSound = RoleManager.Instance.AllRoles.FirstOrDefault((role) => role.Role == RoleTypes.GuardianAngel)?.UseSound;
__instance.ImpostorText.gameObject.SetActive(true);
__instance.ImpostorText.text = GetString("SubText.Lovers");
}
Expand Down Expand Up @@ -659,7 +668,7 @@ public static bool Prefix(IntroCutscene __instance, ref Il2CppSystem.Collections
__instance.BeginCrewmate(yourTeam);
return false;
}
// Madmate called from BeginCrewmate, need to skip previous lovers and egoist check here
// Madmate called from BeginCrewmate, need to skip previous Lovers and Egoist check here

if (role.IsMadmate() || PlayerControl.LocalPlayer.Is(CustomRoles.Madmate))
{
Expand All @@ -676,7 +685,7 @@ public static bool Prefix(IntroCutscene __instance, ref Il2CppSystem.Collections
yourTeam.Add(pc);
}
}
// Crew postor is counted as madmate but should be a impostor
// Crewpostor is counted as Madmate but should be a Impostor
if (Madmate.MadmateKnowWhosMadmate.GetBool() || role != CustomRoles.Madmate && Madmate.ImpKnowWhosMadmate.GetBool())
{
foreach (var pc in Main.AllAlivePlayerControls.Where(x => x.Is(CustomRoles.Madmate) && x.PlayerId != PlayerControl.LocalPlayer.PlayerId))
Expand Down Expand Up @@ -710,7 +719,7 @@ public static bool Prefix(IntroCutscene __instance, ref Il2CppSystem.Collections
return false;
}

// We only check impostor main role here!
// We only check Impostor main role here!
if (role.IsImpostor())
{
yourTeam = new();
Expand Down Expand Up @@ -783,7 +792,7 @@ public static void Prefix()
// Set all players as killable players
target.Data.Role.CanBeKilled = true;

// When target is impostor, set name color as white
// When target is Impostor, set name color as white
target.cosmetics.SetNameColor(Color.white);
target.Data.Role.NameColor = Color.white;
}
Expand Down
Loading

0 comments on commit bac4aeb

Please sign in to comment.