Esempio n. 1
0
 public static void Postfix()
 {
     if (MeetingHud.Instance == null)
     {
         try
         {
             if (PlayerControl.AllPlayerControls.Count > 1 && NameColorPatch.hasAnyRole(PlayerControl.LocalPlayer))
             {
                 foreach (RoleGenerator role in allRoles)
                 {
                     if (role.NameOfRole == PlayerControl.LocalPlayer.getModdedControl().Role)
                     {
                         PlayerControl.LocalPlayer.nameText.color = role.RoleColor;
                     }
                 }
             }
         }
         catch
         { }
     }
     else
     {
         upMetPatch.updateMeetingHUD(MeetingHud.Instance);
     }
 }
Esempio n. 2
0
 public static void Postfix()
 {
     if (MeetingHud.Instance != null)
     {
         upMetPatch.Postfix(MeetingHud.Instance);
     }
     else if (ShipStatus.Instance != null)
     {
         if (PlayerControl.LocalPlayer.Data.IsImpostor)
         {
             PlayerControl.LocalPlayer.nameText.color = Palette.ImpostorRed;
         }
         else
         {
             PlayerControl.LocalPlayer.nameText.color = Palette.White;
         }
         if (PlayerControl.AllPlayerControls.Count > 1 && NameColorPatch.hasAnyRole(PlayerControl.LocalPlayer))
         {
             foreach (RoleGenerator role in allRoles)
             {
                 if (role.containedPlayerIds.Contains(PlayerControl.LocalPlayer.PlayerId))
                 {
                     PlayerControl.LocalPlayer.nameText.color = role.RoleColor;
                 }
             }
         }
     }
 }
Esempio n. 3
0
 public static void updateMeetingHUD(MeetingHud __instance)
 {
     foreach (PlayerVoteArea player in __instance.playerStates)
     {
         if (player.NameText.text == PlayerControl.LocalPlayer.nameText.text && NameColorPatch.hasAnyRole(PlayerControl.LocalPlayer))
         {
             foreach (RoleGenerator role in allRoles)
             {
                 if (role.NameOfRole == PlayerControl.LocalPlayer.getModdedControl().Role)
                 {
                     player.NameText.color = role.RoleColor;
                 }
             }
         }
     }
 }