From c531acb6599b4e115e8b6f6d12e9194b3f83ff9d Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 29 Sep 2018 18:30:14 -0400 Subject: fix command errors logged as SMAPI instead of the affected mod --- src/SMAPI/Framework/Command.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/SMAPI/Framework/Command.cs') diff --git a/src/SMAPI/Framework/Command.cs b/src/SMAPI/Framework/Command.cs index 943e018d..8c9df47d 100644 --- a/src/SMAPI/Framework/Command.cs +++ b/src/SMAPI/Framework/Command.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace StardewModdingAPI.Framework { @@ -8,8 +8,8 @@ namespace StardewModdingAPI.Framework /********* ** Accessor *********/ - /// The friendly name for the mod that registered the command. - public string ModName { get; } + /// The mod that registered the command (or null if registered by SMAPI). + public IModMetadata Mod { get; } /// The command name, which the user must type to trigger it. public string Name { get; } @@ -25,13 +25,13 @@ namespace StardewModdingAPI.Framework ** Public methods *********/ /// Construct an instance. - /// The friendly name for the mod that registered the command. + /// The mod that registered the command (or null if registered by SMAPI). /// The command name, which the user must type to trigger it. /// The human-readable documentation shown when the player runs the built-in 'help' command. /// The method to invoke when the command is triggered. This method is passed the command name and arguments submitted by the user. - public Command(string modName, string name, string documentation, Action callback) + public Command(IModMetadata mod, string name, string documentation, Action callback) { - this.ModName = modName; + this.Mod = mod; this.Name = name; this.Documentation = documentation; this.Callback = callback; -- cgit