get patcher names automatically if needed
This commit is contained in:
parent
0ed46c0910
commit
7914734375
|
@ -29,13 +29,6 @@ namespace StardewModdingAPI.Mods.ErrorHandler.Patches
|
|||
private static IReflectionHelper Reflection;
|
||||
|
||||
|
||||
/*********
|
||||
** Accessors
|
||||
*********/
|
||||
/// <inheritdoc />
|
||||
public string Name => nameof(DialogueErrorPatch);
|
||||
|
||||
|
||||
/*********
|
||||
** Public methods
|
||||
*********/
|
||||
|
|
|
@ -23,13 +23,6 @@ namespace StardewModdingAPI.Mods.ErrorHandler.Patches
|
|||
private static IMonitor MonitorForGame;
|
||||
|
||||
|
||||
/*********
|
||||
** Accessors
|
||||
*********/
|
||||
/// <inheritdoc />
|
||||
public string Name => nameof(EventPatches);
|
||||
|
||||
|
||||
/*********
|
||||
** Public methods
|
||||
*********/
|
||||
|
|
|
@ -24,13 +24,6 @@ namespace StardewModdingAPI.Mods.ErrorHandler.Patches
|
|||
private static IMonitor MonitorForGame;
|
||||
|
||||
|
||||
/*********
|
||||
** Accessors
|
||||
*********/
|
||||
/// <inheritdoc />
|
||||
public string Name => nameof(GameLocationPatches);
|
||||
|
||||
|
||||
/*********
|
||||
** Public methods
|
||||
*********/
|
||||
|
|
|
@ -31,13 +31,6 @@ namespace StardewModdingAPI.Mods.ErrorHandler.Patches
|
|||
private static Action OnContentRemoved;
|
||||
|
||||
|
||||
/*********
|
||||
** Accessors
|
||||
*********/
|
||||
/// <inheritdoc />
|
||||
public string Name => nameof(LoadErrorPatch);
|
||||
|
||||
|
||||
/*********
|
||||
** Public methods
|
||||
*********/
|
||||
|
|
|
@ -20,13 +20,6 @@ namespace StardewModdingAPI.Mods.ErrorHandler.Patches
|
|||
[SuppressMessage("ReSharper", "IdentifierTypo", Justification = "Argument names are defined by Harmony and methods are named for clarity.")]
|
||||
internal class ObjectErrorPatch : IHarmonyPatch
|
||||
{
|
||||
/*********
|
||||
** Accessors
|
||||
*********/
|
||||
/// <inheritdoc />
|
||||
public string Name => nameof(ObjectErrorPatch);
|
||||
|
||||
|
||||
/*********
|
||||
** Public methods
|
||||
*********/
|
||||
|
|
|
@ -26,13 +26,6 @@ namespace StardewModdingAPI.Mods.ErrorHandler.Patches
|
|||
private static IMonitor MonitorForGame;
|
||||
|
||||
|
||||
/*********
|
||||
** Accessors
|
||||
*********/
|
||||
/// <inheritdoc />
|
||||
public string Name => nameof(ScheduleErrorPatch);
|
||||
|
||||
|
||||
/*********
|
||||
** Public methods
|
||||
*********/
|
||||
|
|
|
@ -16,13 +16,6 @@ namespace StardewModdingAPI.Mods.ErrorHandler.Patches
|
|||
[SuppressMessage("ReSharper", "IdentifierTypo", Justification = "Argument names are defined by Harmony and methods are named for clarity.")]
|
||||
internal class SpriteBatchValidationPatches : IHarmonyPatch
|
||||
{
|
||||
/*********
|
||||
** Accessors
|
||||
*********/
|
||||
/// <inheritdoc />
|
||||
public string Name => nameof(SpriteBatchValidationPatches);
|
||||
|
||||
|
||||
/*********
|
||||
** Public methods
|
||||
*********/
|
||||
|
|
|
@ -18,13 +18,6 @@ namespace StardewModdingAPI.Mods.ErrorHandler.Patches
|
|||
[SuppressMessage("ReSharper", "IdentifierTypo", Justification = "Argument names are defined by Harmony and methods are named for clarity.")]
|
||||
internal class UtilityErrorPatches : IHarmonyPatch
|
||||
{
|
||||
/*********
|
||||
** Accessors
|
||||
*********/
|
||||
/// <inheritdoc />
|
||||
public string Name => nameof(UtilityErrorPatches);
|
||||
|
||||
|
||||
/*********
|
||||
** Public methods
|
||||
*********/
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace StardewModdingAPI.Framework.Patching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.Monitor.Log($"Couldn't apply runtime patch '{patch.Name}' to the game. Some SMAPI features may not work correctly. See log file for details.", LogLevel.Error);
|
||||
this.Monitor.Log($"Couldn't apply runtime patch '{patch.GetType().Name}' to the game. Some SMAPI features may not work correctly. See log file for details.", LogLevel.Error);
|
||||
this.Monitor.Log(ex.GetLogSummary(), LogLevel.Trace);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,9 +9,9 @@ namespace StardewModdingAPI.Framework.Patching
|
|||
/// <summary>A Harmony patch to apply.</summary>
|
||||
internal interface IHarmonyPatch
|
||||
{
|
||||
/// <summary>A unique name for this patch.</summary>
|
||||
string Name { get; }
|
||||
|
||||
/*********
|
||||
** Methods
|
||||
*********/
|
||||
/// <summary>Apply the Harmony patch.</summary>
|
||||
/// <param name="harmony">The Harmony instance.</param>
|
||||
#if HARMONY_2
|
||||
|
|
|
@ -33,13 +33,6 @@ namespace StardewModdingAPI.Patches
|
|||
private static bool IsInLoadForNewGame;
|
||||
|
||||
|
||||
/*********
|
||||
** Accessors
|
||||
*********/
|
||||
/// <inheritdoc />
|
||||
public string Name => nameof(LoadContextPatch);
|
||||
|
||||
|
||||
/*********
|
||||
** Public methods
|
||||
*********/
|
||||
|
|
Loading…
Reference in New Issue