示例#1
0
        public override void SetChatButtons(ref string button, ref string button2)
        {
            button = Language.GetTextValue("LegacyInterface.28");
            Player    player    = Main.player[Main.myPlayer];
            playerMod modPlayer = player.GetModPlayer <playerMod>();

            button2 = "Collect (" + (modPlayer.recievedCafeCut || npc.homeless ? "0" : myPayout.ToString()) + " Copper)";
        }
示例#2
0
        public override void SetChatButtons(ref string button, ref string button2)
        {
            button = Language.GetTextValue("LegacyInterface.28");
            Player    player    = Main.player[Main.myPlayer];
            playerMod modPlayer = player.GetModPlayer <playerMod>();

            getPayout();
            button2 = $"Collect ({(!modPlayer.recievedCafeCut ? payoutToChat() : $"0 [i:{ItemID.CopperCoin}]")})";
        }
示例#3
0
        public override void AI()
        {
            Player    player    = Main.player[projectile.owner];
            playerMod modPlayer = player.GetModPlayer <playerMod>();

            if (player.dead)
            {
                modPlayer.dynamitePet = false;
            }
            if (modPlayer.dynamitePet)
            {
                projectile.timeLeft = 2;
            }
        }
示例#4
0
        public override void OnChatButtonClicked(bool firstButton, ref bool shop)
        {
            if (firstButton)
            {
                shop = true;
            }
            else
            {
                Main.player[Main.myPlayer].BuyItem(-10000);
                if (npc.homeless)
                {
                    Main.npcChatText = "No cafe, no money. I need a place or we'll both go broke. Stonework Rose needs to be made of High Quality woods and signature furnature.";
                    return;
                }

                if (myPayout == 0)
                {
                    Main.npcChatText = "It appears that customers are being driven away. It may be because of not enough furniture, or too much furnature.";
                    return;
                }

                Player    player    = Main.player[Main.myPlayer];
                playerMod modPlayer = player.GetModPlayer <playerMod>();
                if (modPlayer.recievedCafeCut)
                {
                    switch (Main.rand.Next(4))
                    {
                    case 0:
                        Main.npcChatText = "We have not had too many sales since last you came to me. You must be patient.";
                        break;

                    case 2:
                        Main.npcChatText = "Come back tommorow after I finished doing the maths.";
                        break;

                    case 3:
                        Main.npcChatText = "If you're pressed for money, kill a boss or something.";
                        break;

                    case 4:
                        Main.npcChatText = "There is no way I am your only source of income.";
                        break;
                    }

                    return;
                }

                switch (Main.rand.Next(4))
                {
                case 0:
                    Main.npcChatText = "I know you do amazing things with your cut of the profits!";
                    break;

                case 1:
                    Main.npcChatText = "Thanks for all the help! Here's your cut of the profits.";
                    break;

                case 2: {
                    if (NPC.FindFirstNPC(NPCID.TaxCollector) > 0)
                    {
                        Main.npcChatText = "The tax collector stashes some of the money for himself. I much prefer paying you directly.";
                    }
                    else
                    {
                        Main.npcChatText = "Our mutual benifet keeps the world turning! Your cut.";
                    }
                    break;
                }

                case 4:
                    Main.npcChatText = "Best landlord, best real estate!";
                    break;
                }
                modPlayer.recievedCafeCut = true;
            }
        }