Skip to content

Commit

Permalink
Use the proper config for house upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
Smoked-Fish committed Jun 11, 2024
1 parent 5969ba2 commit 9e9a8cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Framework/Helpers/UpgradeHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ private static void OfferCabinUpgrade(string cabin)
{
case 0:
msg = Game1.content.LoadString("Strings\\Locations:ScienceHouse_Carpenter_UpgradeHouse1");
msg = ModEntry.Config.EnableFreeBuild ? msg.Replace("10,000", "0").Replace("10.000", "0").Replace("10 000", "0").Replace("450", "0") : msg;
msg = ModEntry.Config.EnableFreeHouseUpgrade ? msg.Replace("10,000", "0").Replace("10.000", "0").Replace("10 000", "0").Replace("450", "0") : msg;
Game1.currentLocation.createQuestionDialogue(Game1.parseText(msg), Game1.currentLocation.createYesNoResponses(), (_, answer) =>
{
if (answer == "Yes")
Expand All @@ -32,7 +32,7 @@ private static void OfferCabinUpgrade(string cabin)
);
break;
case 1:
msg = Game1.content.LoadString("Strings\\Locations:ScienceHouse_Carpenter_UpgradeHouse2", ModEntry.Config.EnableFreeBuild ? "0" : "65,000", ModEntry.Config.EnableFreeBuild ? "0" : "100");
msg = Game1.content.LoadString("Strings\\Locations:ScienceHouse_Carpenter_UpgradeHouse2", ModEntry.Config.EnableFreeHouseUpgrade ? "0" : "65,000", ModEntry.Config.EnableFreeHouseUpgrade ? "0" : "100");
Game1.currentLocation.createQuestionDialogue(Game1.parseText(msg), Game1.currentLocation.createYesNoResponses(), (_, answer) =>
{
if (answer == "Yes")
Expand All @@ -42,7 +42,7 @@ private static void OfferCabinUpgrade(string cabin)
break;
case 2:
msg = Game1.content.LoadString("Strings\\Locations:ScienceHouse_Carpenter_UpgradeHouse3");
msg = ModEntry.Config.EnableFreeBuild ? msg.Replace("10,000", "0").Replace("10.000", "0").Replace("100,000", "0").Replace("100.000", "0").Replace("100 000", "0") : msg;
msg = ModEntry.Config.EnableFreeHouseUpgrade ? msg.Replace("10,000", "0").Replace("10.000", "0").Replace("100,000", "0").Replace("100.000", "0").Replace("100 000", "0") : msg;
Game1.currentLocation.createQuestionDialogue(Game1.parseText(msg), Game1.currentLocation.createYesNoResponses(), (_, answer) =>
{
if (answer == "Yes")
Expand All @@ -64,7 +64,7 @@ private static void AcceptCabinUpgrade(string cabin)
return;
}

if (ModEntry.Config.EnableFreeBuild)
if (ModEntry.Config.EnableFreeHouseUpgrade)
{
cabinInstance.owner.daysUntilHouseUpgrade.Value = ModEntry.Config.EnableInstantBuild ? 0 : 3;
Game1.RequireCharacter("Robin").setNewDialogue("Data\\ExtraDialogue:Robin_HouseUpgrade_Accepted");
Expand Down

0 comments on commit 9e9a8cc

Please sign in to comment.