Farmhouse_Basement_Revised/ScienceHouse.cs
/// <summary>
/// Custom code to determine if an upgrade is needed.
/// </summary>
Custom code to determine if an upgrade is needed.
Custom code to determine if an upgrade is needed .
private void houseUpgradeAccept()
        {
            switch ((int)Game1.player.houseUpgradeLevel) {
                case 0:
                    if (Game1.player.Money >= 10000 && Game1.player.hasItemInInventory(388, 450, 0)) {
                        Game1.player.daysUntilHouseUpgrade = 3;
                        Game1.player.Money -= 10000;
                        Game1.player.removeItemsFromInventory(388, 450);
                        Game1.getCharacterFromName("Robin", false).setNewDialogue(Game1.content.LoadString("Data\\ExtraDialogue:Robin_HouseUpgrade_Accepted"), false, false);
                        Game1.drawDialogue(Game1.getCharacterFromName("Robin", false));
                    } else if (Game1.player.Money < 10000) {
                        Game1.drawObjectDialogue(Game1.content.LoadString("Strings\\UI:NotEnoughMoney3"));
                    } else {
                        Game1.drawObjectDialogue(Game1.content.LoadString("Strings\\Locations:ScienceHouse_Carpenter_NotEnoughWood1"));
                    }
                    break;
                case 1:
                    if (Game1.player.Money >= 50000 && Game1.player.hasItemInInventory(709, 150, 0)) {
                        Game1.player.daysUntilHouseUpgrade = 3;
                        Game1.player.Money -= 50000;
                        Game1.player.removeItemsFromInventory(709, 150);
                        Game1.getCharacterFromName("Robin", false).setNewDialogue(Game1.content.LoadString("Data\\ExtraDialogue:Robin_HouseUpgrade_Accepted"), false, false);
                        Game1.drawDialogue(Game1.getCharacterFromName("Robin", false));
                    } else if (Game1.player.Money < 50000) {
                        Game1.drawObjectDialogue(Game1.content.LoadString("Strings\\UI:NotEnoughMoney3"));
                    } else {
                        Game1.drawObjectDialogue(Game1.content.LoadString("Strings\\Locations:ScienceHouse_Carpenter_NotEnoughWood2"));
                    }
                    break;
                case 2:
                    if (Game1.player.Money >= 75000 && Game1.player.hasItemInInventory(390, 300, 0)) {
                        Game1.player.daysUntilHouseUpgrade = 3;
                        Game1.player.Money -= 75000;
                        Game1.player.removeItemsFromInventory(390, 300);
                        Game1.getCharacterFromName("Robin", false).setNewDialogue(Game1.content.LoadString("Data\\ExtraDialogue:Robin_HouseUpgrade_Accepted"), false, false);
                        Game1.drawDialogue(Game1.getCharacterFromName("Robin", false));
                    } else if (Game1.player.Money < 75000) {
                        Game1.drawObjectDialogue(Game1.content.LoadString("Strings\\UI:NotEnoughMoney3"));
                    } else {
                        Game1.drawObjectDialogue(Game1.content.LoadString("Strings\\Locations:ScienceHouse_Carpenter_NotEnoughStone4"));
                    }
                    break;
                case 3:
                    if (Game1.player.Money >= 100000) {
                        Game1.player.daysUntilHouseUpgrade = 3;
                        Game1.player.Money -= 100000;
                        Game1.getCharacterFromName("Robin", false).setNewDialogue(Game1.content.LoadString("Data\\ExtraDialogue:Robin_HouseUpgrade_Accepted"), false, false);
                        Game1.drawDialogue(Game1.getCharacterFromName("Robin", false));
                    } else if (Game1.player.Money < 100000) {
                        Game1.drawObjectDialogue(Game1.content.LoadString("Strings\\UI:NotEnoughMoney3"));
                    }
                    break;
            }
        }
private void houseUpgradeAccept ( ) { switch ( ( int ) Game1 . player . houseUpgradeLevel ) { case 0 : if ( Game1 . player . Money >= 10000 && Game1 . player . hasItemInInventory ( 388 , 450 , 0 ) ) { Game1 . player . daysUntilHouseUpgrade = 3 ; Game1 . player . Money -= 10000 ; Game1 . player . removeItemsFromInventory ( 388 , 450 ) ; Game1 . getCharacterFromName ( " " , false ) . setNewDialogue ( Game1 . content . LoadString ( " \\ " ) , false , false ) ; Game1 . drawDialogue ( Game1 . getCharacterFromName ( " " , false ) ) ; } else if ( Game1 . player . Money < 10000 ) { Game1 . drawObjectDialogue ( Game1 . content . LoadString ( " \\ " ) ) ; } else { Game1 . drawObjectDialogue ( Game1 . content . LoadString ( " \\ " ) ) ; } break ; case 1 : if ( Game1 . player . Money >= 50000 && Game1 . player . hasItemInInventory ( 709 , 150 , 0 ) ) { Game1 . player . daysUntilHouseUpgrade = 3 ; Game1 . player . Money -= 50000 ; Game1 . player . removeItemsFromInventory ( 709 , 150 ) ; Game1 . getCharacterFromName ( " " , false ) . setNewDialogue ( Game1 . content . LoadString ( " \\ " ) , false , false ) ; Game1 . drawDialogue ( Game1 . getCharacterFromName ( " " , false ) ) ; } else if ( Game1 . player . Money < 50000 ) { Game1 . drawObjectDialogue ( Game1 . content . LoadString ( " \\ " ) ) ; } else { Game1 . drawObjectDialogue ( Game1 . content . LoadString ( " \\ " ) ) ; } break ; case 2 : if ( Game1 . player . Money >= 75000 && Game1 . player . hasItemInInventory ( 390 , 300 , 0 ) ) { Game1 . player . daysUntilHouseUpgrade = 3 ; Game1 . player . Money -= 75000 ; Game1 . player . removeItemsFromInventory ( 390 , 300 ) ; Game1 . getCharacterFromName ( " " , false ) . setNewDialogue ( Game1 . content . LoadString ( " \\ " ) , false , false ) ; Game1 . drawDialogue ( Game1 . getCharacterFromName ( " " , false ) ) ; } else if ( Game1 . player . Money < 75000 ) { Game1 . drawObjectDialogue ( Game1 . content . LoadString ( " \\ " ) ) ; } else { Game1 . drawObjectDialogue ( Game1 . content . LoadString ( " \\ " ) ) ; } break ; case 3 : if ( Game1 . player . Money >= 100000 ) { Game1 . player . daysUntilHouseUpgrade = 3 ; Game1 . player . Money -= 100000 ; Game1 . getCharacterFromName ( " " , false ) . setNewDialogue ( Game1 . content . LoadString ( " \\ " ) , false , false ) ; Game1 . drawDialogue ( Game1 . getCharacterFromName ( " " , false ) ) ; } else if ( Game1 . player . Money < 100000 ) { Game1 . drawObjectDialogue ( Game1 . content . LoadString ( " \\ " ) ) ; } break ; } }
Custom code to determine if an upgrade is needed.
Custom code to determine if an upgrade is needed .