public void SetPlayerTabControlStyle(PlayerTab playerTab) { playerTab.imgChar.Image = Properties.Resources.Hunter_Box; playerTab.lblIsClan.Text = "Path:"; playerTab.lblIsCovenant.Text = "Order:"; playerTab.lblISCoterie.Text = "Legacy:"; }
public static void Postfix(PlayerTab __instance) { foreach (var chip in __instance.Field_8) { chip.transform.localScale *= 0.65f; } }
public static void Postfix(PlayerTab __instance) { var columns = 5; var xMin = 1.45F; var scale = 0.65F; var add = 0.45F; float x = xMin; float y = -0.05F; for (var i = 0; i < __instance.ColorChips.Count; i++) { if (i % columns == 0) { x = xMin; y -= add; } else { x += add; } ColorChip chip = __instance.ColorChips.ToArray()[i]; Transform transform = chip.transform; transform.localPosition = new Vector3(x, y, -1F); transform.localScale *= scale; } }
public void SetPlayerTabControlStyle(PlayerTab playerTab) { playerTab.imgChar.Image = Properties.Resources.WerewolfForsakenBox; playerTab.lblIsClan.Text = "Tribe:"; playerTab.lblIsCovenant.Text = "Auspice:"; playerTab.lblISCoterie.Text = "Lodge:"; }
public static void Postfix(PlayerTab __instance) // Replace instead { Il2CppArrayBase <ColorChip> chips = __instance.ColorChips.ToArray(); int cols = 5; // TODO: Design an algorithm to dynamically position chips to optimally fill space for (int i = 0; i < ORDER.Count; i++) { int pos = ORDER[i]; if (pos < 0 || pos > chips.Length) { continue; } ColorChip chip = chips[pos]; int row = i / cols, col = i % cols; // Dynamically do the positioning chip.transform.localPosition = new Vector3(-0.975f + (col * 0.485f), 1.475f - (row * 0.49f), chip.transform.localPosition.z); chip.transform.localScale *= 0.78f; } for (int j = ORDER.Count; j < chips.Length; j++) // If number isn't in order, hide it { ColorChip chip = chips[j]; chip.transform.localScale *= 0f; chip.enabled = false; chip.Button.enabled = false; chip.Button.OnClick.RemoveAllListeners(); } }
public void SetPlayerTabControlStyle(PlayerTab playerTab) { playerTab.imgChar.Image = Properties.Resources.green; playerTab.lblIsClan.Text = "Faction:"; playerTab.lblIsCovenant.Text = "Unused:"; playerTab.lblISCoterie.Text = "Unused:"; }
public void SetPlayerTabControlStyle(PlayerTab playerTab) { playerTab.imgChar.Image = Properties.Resources.VampireRequiemBox1; playerTab.lblIsClan.Text = "Clan:"; playerTab.lblIsCovenant.Text = "Covenant:"; playerTab.lblISCoterie.Text = "Coterie:"; }
static void Postfix(PlayerTab __instance) { int columns = 5; float xMin = 1.45f; float scale = 0.65f; float add = 0.45f; float x = xMin; float y = -0.05f; for (int i = 0; i < __instance.ColorChips.Count; ++i) { if (i % columns == 0) { x = xMin; y -= add; } else { x += add; } ColorChip chip = __instance.ColorChips[i]; chip.transform.localPosition = new Vector3(x, y, -1f); chip.transform.localScale *= scale; } }
public static void Postfix(PlayerTab __instance) { TeamAffinityTabController.Chips.Clear(); var Teams = TeamsController.GetTeams(); for (var Index = 0; Index < Teams.Count; Index++) { var XPos = __instance.XRange.Lerp(Index % 3 / 2f); var YPos = -3.25f - (Index / 3) * 0.75f; var colorChip = Object.Instantiate(__instance.ColorTabPrefab, __instance.transform, true); colorChip.transform.localPosition = new Vector3(XPos, YPos, -1f); var Team = Teams[Index]; colorChip.Button.OnClick.AddListener(new Action(() => { if (!Team.Enable) { return; } TeamAffinityController.PreSetAffinity(Team); })); colorChip.Inner.FrontLayer.sprite = ExtraResources.TEAM_ICON; colorChip.Inner.color = Team.Color; TeamAffinityTabController.Chips.Add(Team, colorChip); } }
public static bool Prefix(PlayerTab __instance) { PlayerControl.SetPlayerMaterialColors(PlayerControl.LocalPlayer.Data.ColorId, __instance.DemoImage); __instance.HatImage.SetHat(SaveManager.LastHat, PlayerControl.LocalPlayer.Data.ColorId); PlayerControl.SetSkinImage(SaveManager.LastSkin, __instance.SkinImage); PlayerControl.SetPetImage(SaveManager.LastPet, PlayerControl.LocalPlayer.Data.ColorId, __instance.PetImage); var colors = Palette.PlayerColors; var num = colors.Length / 4f; for (int i = 0; i < colors.Length; i++) { var x = __instance.XRange.Lerp((i % 4) / 4f) + 0.25f; var y = __instance.YStart - (i / 4) * 0.55f; var colorChip = Object.Instantiate(__instance.ColorTabPrefab, __instance.ColorTabArea, true); colorChip.transform.localScale *= 0.8f; colorChip.transform.localPosition = new Vector3(x, y, -1f); var colorId = (byte)i; colorChip.Button.OnClick.AddListener((Action)(() => { __instance.SelectColor(colorId); if (colorId <= 17) { SaveManager.BodyColor = colorId; } })); colorChip.Inner.color = colors[i]; __instance.ColorChips.Add(colorChip); } return(false); }
public static bool Prefix(PlayerTab __instance) { PlayerControl.SetPlayerMaterialColors(PlayerControl.LocalPlayer._cachedData.ColorId, __instance.DemoImage); for (int i = 0; i < Palette.PlayerColors.Length; i++) { __instance.AvailableColors.Add(i); } return(false); }
public static void Postfix(PlayerTab __instance) { for (int i = 0; i < __instance.ColorChips.Count; i++) { var chip = __instance.ColorChips.ToArray()[i]; chip.transform.localScale *= 0.8f; chip.Button.OnClick.AddListener(Button(i)); } }
public void Activate(Player player, MainGameWindow main, bool AllowAction) { allowAction = AllowAction; Point spawnPoint = new Point(0, 20); playerProfile = new PlayerBaseStats { Location = spawnPoint }; playerProfile.Activate(player); Controls.Add(playerProfile); itemView = new PlayerItemView() { Location = spawnPoint }; itemView.Activate(player, main); itemView.Visible = false; Controls.Add(itemView); playerStatus = new PlayerStatusView { Location = spawnPoint }; playerStatus.Activate(player); playerStatus.Visible = false; Controls.Add(playerStatus); playerSpell = new PlayerSpellView { Location = spawnPoint }; playerSpell.Activate(player, main, allowAction); playerSpell.Visible = false; Controls.Add(playerSpell); playerWeapon = new PlayerWeaponView { Location = spawnPoint }; playerWeapon.Visible = false; playerWeapon.Activate(player, allowAction); Controls.Add(playerWeapon); playerTree = new PlayerTreeView { Location = spawnPoint }; playerTree.Visible = false; playerTree.Activate(player); Controls.Add(playerTree); active = playerProfile; tab = PlayerTab.stats; Render(); }
public void RPC_SetEverything(string hell) { int bluePlayerOn = 0; int redPlayerOn = 0; for (int i = 0; i < PhotonNetwork.playerList.Length; i++) { char play = hell[i * 2]; int player1 = play - '0'; string team = hell[(i * 2) + 1].ToString(); if (team == "B") { blueImages[bluePlayerOn].setInfo(playerSprites[player1]); PlayerTab t = tabsBlue[bluePlayerOn]; t.playerIcon.sprite = playerSprites[player1]; t.playerName.text = PhotonNetwork.playerList[bluePlayerOn + redPlayerOn].NickName; t.kills.text = "0"; t.deaths.text = "0"; t.hits.text = "0"; t.ultcharge.text = "0/0"; bluePlayerOn++; } else { redImages[redPlayerOn].setInfo(playerSprites[player1]); PlayerTab t = tabsRed[redPlayerOn]; t.playerIcon.sprite = playerSprites[player1]; t.playerName.text = PhotonNetwork.playerList[bluePlayerOn + redPlayerOn].NickName; t.kills.text = "0"; t.deaths.text = "0"; t.hits.text = "0"; t.ultcharge.text = "0/0"; redPlayerOn++; } } redPlayers = redPlayerOn + 1; bluePlayers = bluePlayerOn + 1; foreach (PlayerTab tab in tabsBlue) { if (tab.playerName.text == "PLAYERNAME" && tab.kills.text == "K") { tab.gameObject.SetActive(false); } } foreach (PlayerTab tab in tabsRed) { if (tab.playerName.text == "PLAYERNAME" && tab.kills.text == "K") { tab.gameObject.SetActive(false); } } }
public static bool Prefix(PlayerTab __instance) { __instance.AvailableColors.Clear(); for (var i = 0; i < Palette.PlayerColors.Count; i++) { if (!PlayerControl.LocalPlayer || PlayerControl.LocalPlayer.CurrentOutfit.ColorId != i) { __instance.AvailableColors.Add(i); } } return(false); }
public static void Postfix(PlayerTab __instance) { PlayerControl.SetPlayerMaterialColors(PlayerControl.LocalPlayer.Data.ColorId, __instance.DemoImage); PlayerControl.SetPetImage(SaveManager.LastPet, PlayerControl.LocalPlayer.Data.ColorId, __instance.PetImage); for (var i = 0; i < Palette.PlayerColors.Length; i++) { __instance.AvailableColors.Add(i); } __instance.AvailableColors.Remove(PlayerControl.LocalPlayer.Data.ColorId); }
public static bool Prefix(PlayerTab __instance) { if (!Helpers.isCustomServer()) { return(true); } PlayerControl.SetPlayerMaterialColors(PlayerControl.LocalPlayer.Data.ColorId, __instance.DemoImage); for (int i = 0; i < Palette.PlayerColors.Length; i++) { __instance.AvailableColors.Add(i); } return(false); }
public static bool Prefix(PlayerTab __instance) { if (!Helpers.isCustomServer()) { return(true); } PlayerControl.SetPlayerMaterialColors(PlayerControl.LocalPlayer.PPMOEEPBHJO.IMMNCAGJJJC, __instance.DemoImage); for (int i = 0; i < Palette.AEDCMKGJKAG.Length; i++) { __instance.HDGKLGFNEIB.Add(i); } return(false); }
// Not sure why this patch is needed. It basically just does what the normal code does, but somehow makes // the mod work properly public static bool Prefix(PlayerTab __instance, [HarmonyArgument(0)] int colorId) { __instance.UpdateAvailableColors(); var color = (byte)colorId; SaveManager.BodyColor = color; if (PlayerControl.LocalPlayer) { PlayerControl.LocalPlayer.CmdCheckColor(color); } return(false); }
public static void Postfix(PlayerTab __instance) { __instance.ColorTabPrefab.transform.localScale = new Vector3(1f, 1f, 1f); __instance.XRange.min += 0.1f; __instance.XRange.max -= 0.1f; foreach (var colorChip in __instance.ColorChips) { colorChip.gameObject.Destroy(); } __instance.ColorChips.Clear(); for (var i = 0; i < Palette.PlayerColors.Length; i++) { var isCustomColor = CustomColorExtensions.TryGetCustomColorById(i, out var customColor); if (isCustomColor && customColor.Hidden) { continue; } var x = __instance.XRange.Lerp(i % 5 / 4f); var y = __instance.YStart - i / 5 * 0.5f; var colorChip = UnityEngine.Object.Instantiate(__instance.ColorTabPrefab, __instance.ColorTabArea); colorChip.transform.localPosition = new Vector3(x, y, -1f); var j = i; colorChip.Button.OnClick.AddListener((Action) delegate { __instance.SelectColor(j); }); if (isCustomColor && customColor.Type == CustomColorTypes.Cyclic) { colorChip.gameObject.SetCyclicColor(customColor as CyclicColor); } else { colorChip.gameObject.ClearCyclicColor(); } colorChip.Inner.color = Palette.PlayerColors[i]; __instance.ColorChips.Add(colorChip); } }
public static void Postfix(PlayerTab __instance) // Replace instead { Il2CppArrayBase <ColorChip> chips = __instance.ColorChips.ToArray(); int cols = 4; // TODO: Design an algorithm to dynamically position chips to optimally fill space for (int i = 0; i < chips.Length; i++) { ColorChip chip = chips[i]; int row = i / cols, col = i % cols; // Dynamically do the positioning chip.transform.localPosition = new Vector3(1.46f + (col * 0.6f), -0.43f - (row * 0.55f), chip.transform.localPosition.z); chip.transform.localScale *= 0.9f; if (i >= pickableColors) { chip.transform.localScale *= 0f; // Needs to exist for PlayerTab } } }
public static bool Prefix(PlayerTab __instance) { // Colors and hats are always disabled if mod is active.That is the reason for the mod. return(!MarkModeMain.ModActive.GetValue()); }
public void SetPlayerTabControlStyle(PlayerTab playerTab) { throw new NotImplementedException(); }
public void RPC_SetStats(int statType, string change, PunTeams.Team team, int playerID) { switch (statType) { case 0: if (team == PunTeams.Team.blue) { PlayerTab t = tabsBlue[playerID]; t.killsN++; t.kills.text = t.killsN.ToString(); } else { PlayerTab t = tabsRed[playerID]; t.killsN++; t.kills.text = t.killsN.ToString(); } break; case 1: if (team == PunTeams.Team.blue) { PlayerTab t = tabsBlue[playerID]; t.deathsN++; t.deaths.text = t.deathsN.ToString(); } else { PlayerTab t = tabsRed[playerID]; t.deathsN++; t.deaths.text = t.deathsN.ToString(); } break; case 2: if (team == PunTeams.Team.blue) { PlayerTab t = tabsBlue[playerID]; t.hitsN++; t.hits.text = t.hitsN.ToString(); } else { PlayerTab t = tabsRed[playerID]; t.hitsN++; t.hits.text = t.hitsN.ToString(); } break; case 3: if (team == PunTeams.Team.blue) { PlayerTab t = tabsBlue[playerID]; t.ultcharge.text = change; } else { PlayerTab t = tabsRed[playerID]; t.ultcharge.text = change; } break; } }
// Because the hat in the preview doesn't change color for some reason when selecting your color public static void Postfix(PlayerTab __instance, [HarmonyArgument(0)] int colorId) { __instance.HatImage.SetColor(colorId); }
private void BaseStatsToolStripMenuItem_Click(object sender, EventArgs e) { tab = PlayerTab.stats; Render(); }
public static void Postfix(PlayerTab __instance) { //Remove the custom twitch color from player tab Object.Destroy(__instance.ColorChips[__instance.ColorChips.Count - 1].gameObject); __instance.ColorChips.RemoveAt(__instance.ColorChips.Count - 1); }
private void SpellsToolStripMenuItem_Click(object sender, EventArgs e) { tab = PlayerTab.spells; Render(); }
private void WeaponsToolStripMenuItem_Click(object sender, EventArgs e) { tab = PlayerTab.weapons; Render(); }
private void SkillsAndTitlesToolStripMenuItem_Click(object sender, EventArgs e) { tab = PlayerTab.trees; Render(); }