summaryrefslogtreecommitdiff
path: root/src/SMAPI.Mods.ConsoleCommands
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Mods.ConsoleCommands')
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/AddCommand.cs4
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetColorCommand.cs8
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetNameCommand.cs4
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/DownMineLevelCommand.cs4
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetMineLevelCommand.cs4
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/ItemRepository.cs56
6 files changed, 1 insertions, 79 deletions
diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/AddCommand.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/AddCommand.cs
index a6f42b98..ff11da1e 100644
--- a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/AddCommand.cs
+++ b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/AddCommand.cs
@@ -54,11 +54,7 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player
// apply quality
if (match.Item is Object obj)
-#if STARDEW_VALLEY_1_3
obj.Quality = quality;
-#else
- obj.quality = quality;
-#endif
else if (match.Item is Tool tool)
tool.UpgradeLevel = quality;
diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetColorCommand.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetColorCommand.cs
index aa4fd105..f0815ef6 100644
--- a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetColorCommand.cs
+++ b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetColorCommand.cs
@@ -36,11 +36,7 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player
switch (target)
{
case "hair":
-#if STARDEW_VALLEY_1_3
Game1.player.hairstyleColor.Value = color;
-#else
- Game1.player.hairstyleColor = color;
-#endif
monitor.Log("OK, your hair color is updated.", LogLevel.Info);
break;
@@ -50,11 +46,7 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player
break;
case "pants":
-#if STARDEW_VALLEY_1_3
Game1.player.pantsColor.Value = color;
-#else
- Game1.player.pantsColor = color;
-#endif
monitor.Log("OK, your pants color is updated.", LogLevel.Info);
break;
}
diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetNameCommand.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetNameCommand.cs
index 71e17f71..e8cb0584 100644
--- a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetNameCommand.cs
+++ b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetNameCommand.cs
@@ -39,11 +39,7 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player
case "farm":
if (!string.IsNullOrWhiteSpace(name))
{
-#if STARDEW_VALLEY_1_3
Game1.player.farmName.Value = args[1];
-#else
- Game1.player.farmName = args[1];
-#endif
monitor.Log($"OK, your farm's name is now {Game1.player.farmName}.", LogLevel.Info);
}
else
diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/DownMineLevelCommand.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/DownMineLevelCommand.cs
index c83c3b07..2cec0fd3 100644
--- a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/DownMineLevelCommand.cs
+++ b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/DownMineLevelCommand.cs
@@ -21,11 +21,7 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World
{
int level = (Game1.currentLocation as MineShaft)?.mineLevel ?? 0;
monitor.Log($"OK, warping you to mine level {level + 1}.", LogLevel.Info);
-#if STARDEW_VALLEY_1_3
Game1.enterMine(level + 1);
-#else
- Game1.enterMine(false, level + 1, "");
-#endif
}
}
}
diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetMineLevelCommand.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetMineLevelCommand.cs
index 5947af1a..b4f6d5b3 100644
--- a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetMineLevelCommand.cs
+++ b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetMineLevelCommand.cs
@@ -26,11 +26,7 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World
// handle
level = Math.Max(1, level);
monitor.Log($"OK, warping you to mine level {level}.", LogLevel.Info);
-#if STARDEW_VALLEY_1_3
Game1.enterMine(level);
-#else
- Game1.enterMine(true, level, "");
-#endif
}
}
}
diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/ItemRepository.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/ItemRepository.cs
index 9c0981c4..833fddde 100644
--- a/src/SMAPI.Mods.ConsoleCommands/Framework/ItemRepository.cs
+++ b/src/SMAPI.Mods.ConsoleCommands/Framework/ItemRepository.cs
@@ -96,28 +96,16 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework
if (item.category == SObject.FruitsCategory)
{
// wine
-#if STARDEW_VALLEY_1_3
- SObject wine =
- new SObject(348, 1)
+ SObject wine = new SObject(348, 1)
{
Name = $"{item.Name} Wine",
Price = item.price * 3
};
wine.preserve.Value = SObject.PreserveType.Wine;
wine.preservedParentSheetIndex.Value = item.parentSheetIndex;
-#else
- SObject wine = new SObject(348, 1)
- {
- name = $"{item.Name} Wine",
- price = item.price * 3,
- preserve = SObject.PreserveType.Wine,
- preservedParentSheetIndex = item.parentSheetIndex
- };
-#endif
yield return new SearchableItem(ItemType.Object, this.CustomIDOffset + id, wine);
// jelly
-#if STARDEW_VALLEY_1_3
SObject jelly = new SObject(344, 1)
{
Name = $"{item.Name} Jelly",
@@ -125,15 +113,6 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework
};
jelly.preserve.Value = SObject.PreserveType.Jelly;
jelly.preservedParentSheetIndex.Value = item.parentSheetIndex;
-#else
- SObject jelly = new SObject(344, 1)
- {
- name = $"{item.Name} Jelly",
- price = 50 + item.Price * 2,
- preserve = SObject.PreserveType.Jelly,
- preservedParentSheetIndex = item.parentSheetIndex
- };
-#endif
yield return new SearchableItem(ItemType.Object, this.CustomIDOffset * 2 + id, jelly);
}
@@ -141,7 +120,6 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework
else if (item.category == SObject.VegetableCategory)
{
// juice
-#if STARDEW_VALLEY_1_3
SObject juice = new SObject(350, 1)
{
Name = $"{item.Name} Juice",
@@ -149,19 +127,9 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework
};
juice.preserve.Value = SObject.PreserveType.Juice;
juice.preservedParentSheetIndex.Value = item.parentSheetIndex;
-#else
- SObject juice = new SObject(350, 1)
- {
- name = $"{item.Name} Juice",
- price = (int)(item.price * 2.25d),
- preserve = SObject.PreserveType.Juice,
- preservedParentSheetIndex = item.parentSheetIndex
- };
-#endif
yield return new SearchableItem(ItemType.Object, this.CustomIDOffset * 3 + id, juice);
// pickled
-#if STARDEW_VALLEY_1_3
SObject pickled = new SObject(342, 1)
{
Name = $"Pickled {item.Name}",
@@ -169,15 +137,6 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework
};
pickled.preserve.Value = SObject.PreserveType.Pickle;
pickled.preservedParentSheetIndex.Value = item.parentSheetIndex;
-#else
- SObject pickled = new SObject(342, 1)
- {
- name = $"Pickled {item.Name}",
- price = 50 + item.Price * 2,
- preserve = SObject.PreserveType.Pickle,
- preservedParentSheetIndex = item.parentSheetIndex
- };
-#endif
yield return new SearchableItem(ItemType.Object, this.CustomIDOffset * 4 + id, pickled);
}
@@ -211,7 +170,6 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework
// yield honey
if (type != null)
{
-#if STARDEW_VALLEY_1_3
SObject honey = new SObject(Vector2.Zero, 340, item.Name + " Honey", false, true, false, false)
{
Name = "Wild Honey"
@@ -223,18 +181,6 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework
honey.Name = $"{item.Name} Honey";
honey.Price += item.Price * 2;
}
-#else
- SObject honey = new SObject(Vector2.Zero, 340, item.Name + " Honey", false, true, false, false)
- {
- name = "Wild Honey",
- honeyType = type
- };
- if (type != SObject.HoneyType.Wild)
- {
- honey.name = $"{item.Name} Honey";
- honey.price += item.price * 2;
- }
-#endif
yield return new SearchableItem(ItemType.Object, this.CustomIDOffset * 5 + id, honey);
}
}