public override void OnChatButtonClicked(bool firstButton, ref bool shop) { Player player = Main.player[Main.myPlayer]; OrchidModPlayer modPlayer = player.GetModPlayer <OrchidModPlayer>(); if (firstButton) { if (OrchidMod.Instance.croupierUI.Visible) { OrchidMod.Instance.croupierUI.Visible = false; Main.npcShop = 0; Main.npcChatCornerItem = 0; Recipe.FindRecipes(); Main.npcChatText = Main.npc[player.talkNPC].GetChat(); } else { shop = true; } } else { if (OrchidModGamblerHelper.hasGamblerDeck(player)) { Main.npcChatText = $"Not too fond of your odds, eh? Aight, go on."; /*switch (Main.rand.Next(0, 1)) * { * case 0: * Main.npcChatText = $"Not too fond of your odds, eh? Aight, go on.\n" + * $"Calamity - best mod..."; * break; * }*/ Main.npcChatText += "\n\n\n\n\n"; Main.npcChatFocus2 = false; Main.npcChatFocus3 = false; OrchidMod.Instance.croupierUI.UpdateOnChatButtonClicked(); OrchidMod.Instance.croupierUI.Visible = true; } else { for (int i = 0; i < 50; i++) { Item item = Main.LocalPlayer.inventory[i]; if (item.type == 0) { Main.npcChatText = $"You lost it already? Here chief, take your new deck."; int gamblerDeck = ItemType <Gambler.Decks.GamblerAttack>(); player.QuickSpawnItem(gamblerDeck, 1); return; } } Main.npcChatText = $"My man, your pockets are full. You wouldn't let a brand new deck sitting on the ground, would ya?"; } } }
public override void SetChatButtons(ref string button, ref string button2) { Player player = Main.player[Main.myPlayer]; OrchidModPlayer modPlayer = player.GetModPlayer <OrchidModPlayer>(); if (!OrchidMod.Instance.croupierUI.Visible) { button = Language.GetTextValue("LegacyInterface.28"); string deckBuilding = $"[c/{Colors.AlphaDarken(new Color(255, 200, 0)).Hex3()}:Deck Building]"; button2 = OrchidModGamblerHelper.hasGamblerDeck(player) ? deckBuilding : "Get a New Deck"; } else { button = "Return"; } }