diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-12-02 18:49:49 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-12-02 18:49:49 -0500 |
commit | 5cc5f089b9645a60385ff293b5a7202f260bfc0f (patch) | |
tree | 68f8bee734d164277f711b8ac54bd1064c0757d6 /src/SMAPI.Mods.ConsoleCommands | |
parent | e0b72374cd14298aacc6f71dc391fdc9814be37c (diff) | |
parent | dc4f89acb6cd8f838934b60e8f5645c6145706f8 (diff) | |
download | SMAPI-5cc5f089b9645a60385ff293b5a7202f260bfc0f.tar.gz SMAPI-5cc5f089b9645a60385ff293b5a7202f260bfc0f.tar.bz2 SMAPI-5cc5f089b9645a60385ff293b5a7202f260bfc0f.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.Mods.ConsoleCommands')
-rw-r--r-- | src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/AddCommand.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/AddCommand.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/AddCommand.cs index 81167747..14a519fb 100644 --- a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/AddCommand.cs +++ b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/AddCommand.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using StardewModdingAPI.Mods.ConsoleCommands.Framework.ItemData; using StardewValley; @@ -49,10 +49,14 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player return; } - // apply count & quality + // apply count match.Item.Stack = count; + + // apply quality if (match.Item is Object obj) obj.quality = quality; + else if (match.Item is Tool tool) + tool.UpgradeLevel = quality; // add to inventory Game1.player.addItemByMenuIfNecessary(match.Item); |