// Intro display role static void Postfix(IntroCutscene.Nested_0 __instance) { List <RoleInfo> infos = RoleInfo.getRoleInfoForPlayer(PlayerControl.LocalPlayer); if (infos.Count == 0) { return; } RoleInfo roleInfo = infos[0]; if (PlayerControl.LocalPlayer == Lovers.lover1 || PlayerControl.LocalPlayer == Lovers.lover2) { PlayerControl otherLover = PlayerControl.LocalPlayer == Lovers.lover1 ? Lovers.lover2 : Lovers.lover1; __instance.__this.Title.text = PlayerControl.LocalPlayer.Data.IsImpostor ? "<color=#FF1919FF>Imp</color><color=#FC03BEFF>Lover</color>" : "<color=#FC03BEFF>Lover</color>"; __instance.__this.Title.color = PlayerControl.LocalPlayer.Data.IsImpostor ? Color.white : Lovers.color; __instance.__this.ImpostorText.text = "You are in <color=#FC03BEFF>Love</color><color=#FFFFFFFF> with </color><color=#FC03BEFF>" + (otherLover?.Data?.PlayerName ?? "") + "</color>"; __instance.__this.ImpostorText.gameObject.SetActive(true); __instance.__this.BackgroundBar.material.color = Lovers.color; } else if (roleInfo.name == "Crewmate" || roleInfo.name == "Impostor") { } else { __instance.__this.Title.text = roleInfo.name; __instance.__this.Title.color = roleInfo.color; __instance.__this.ImpostorText.gameObject.SetActive(true); __instance.__this.ImpostorText.text = roleInfo.introDescription; __instance.__this.BackgroundBar.material.color = roleInfo.color; } }
// Intro special teams static void Prefix(IntroCutscene.Nested_0 __instance) { if (PlayerControl.LocalPlayer == Jester.jester) { var jesterTeam = new Il2CppSystem.Collections.Generic.List <PlayerControl>(); jesterTeam.Add(PlayerControl.LocalPlayer); __instance.yourTeam = jesterTeam; } else if (PlayerControl.LocalPlayer == Jackal.jackal) { var jackalTeam = new Il2CppSystem.Collections.Generic.List <PlayerControl>(); jackalTeam.Add(PlayerControl.LocalPlayer); __instance.yourTeam = jackalTeam; } // Add the Spy to the Impostor team (for the Impostors) if (Spy.spy != null && PlayerControl.LocalPlayer.Data.IsImpostor) { List <PlayerControl> players = PlayerControl.AllPlayerControls.ToArray().ToList().OrderBy(x => Guid.NewGuid()).ToList(); var fakeImpostorTeam = new Il2CppSystem.Collections.Generic.List <PlayerControl>(); foreach (PlayerControl p in players) { if (p == Spy.spy || p.Data.IsImpostor) { fakeImpostorTeam.Add(p); } } __instance.yourTeam = fakeImpostorTeam; } }
static void Postfix(IntroCutscene.Nested_0 __instance) { foreach (RoleGenerator role in allRoles) { if (PlayerControl.LocalPlayer.getModdedControl().Role == role.NameOfRole) { __instance.__this.Title.text = role.NameOfRole; __instance.__this.Title.color = role.RoleColor; __instance.__this.ImpostorText.text = role.IntroText; __instance.__this.BackgroundBar.material.color = role.RoleColor; } } }
static void Prefix(IntroCutscene.Nested_0 __instance) { if (!Jester.jesterEnabled) { return; } if (PlayerController.LocalPlayer.hasComponent("Jester")) { var jesterTeam = new Il2CppSystem.Collections.Generic.List <PlayerControl>(); jesterTeam.Add(PlayerControl.LocalPlayer); __instance.yourTeam = jesterTeam; } }
public virtual void SetIntro(IntroCutscene.Nested_0 instance) { instance.__this.Title.text = Name; instance.__this.Title.color = Color; instance.__this.Title.renderer?.material.SetColor(ShaderOutlineColor, OutlineColor); instance.__this.Title.transform.localScale = TitleScale; instance._c_5__2 = Color; // TODO Which to use? instance._impColor_5__4 = Color; // TODO Which to use? instance.__this.ImpostorText.text = RoleTask; instance.__this.BackgroundBar.material.color = Color; instance.__this.Title.autoSizeTextContainer = false; instance.__this.Title.enableAutoSizing = false; instance.__this.Title.fontSize = 10F; }
static void Postfix(IntroCutscene.Nested_0 __instance) { ModdedPlayerClass localPlayer = Main.Instance.GetLocalModdedPlayer(); if (localPlayer.Role == null) { return; } localPlayer.Role.ResetCooldowns(); __instance.__this.ImpostorText.gameObject.SetActive(true); __instance.__this.ImpostorText.transform.localScale = new Vector3(0.7f, 0.7f); __instance.__this.Title.text = localPlayer.Role.RoleName; __instance.__this.Title.color = localPlayer.Role.RoleColor; __instance.__this.ImpostorText.text = localPlayer.Role.IntroString; __instance.__this.BackgroundBar.material.color = localPlayer.Role.RoleColor2; }
public static void Postfix(IntroCutscene.Nested_0 __instance) { Role role = RolesManager.GetPlayerRole(PlayerControl.LocalPlayer); PluginSingleton <FloofUsPlugin> .Instance.Log.LogInfo(string.Format("Displaying Player Role {0} with Text {1}", role.name, role.ImpostorText.Invoke())); var alpha = __instance.__this.Title.color.a; if (role != null && !role.IsRoleHidden()) { __instance.__this.Title.text = role.name; __instance.__this.Title.color = role.color; __instance.__this.ImpostorText.text = role.ImpostorText.Invoke(); __instance.__this.ImpostorText.gameObject.SetActive(true); __instance.__this.BackgroundBar.material.color = role.color; } }
public static void Postfix(IntroCutscene.Nested_0 __instance) { if (!Jester.jesterEnabled) { return; } Jester.jesterWon = false; if (PlayerController.getLocalPlayer().hasComponent("Jester")) { __instance.__this.Title.Text = "Jester"; __instance.__this.Title.Color = Jester.jesterColor; __instance.__this.ImpostorText.Text = "Get voted off to win"; __instance.__this.BackgroundBar.material.color = Jester.jesterColor; } }
public static void Prefix(IntroCutscene.Nested_0 __instance) { LocalRole.SetIntro(__instance); __instance.__this.ImpostorText.gameObject.SetActive(true); }
static void Prefix(IntroCutscene.Nested_0 __instance) { __instance.__this.IntroStinger = Main.Instance.Assets.HPTheme; }