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;
|
private static IReflectionHelper Reflection;
|
||||||
|
|
||||||
|
|
||||||
/*********
|
|
||||||
** Accessors
|
|
||||||
*********/
|
|
||||||
/// <inheritdoc />
|
|
||||||
public string Name => nameof(DialogueErrorPatch);
|
|
||||||
|
|
||||||
|
|
||||||
/*********
|
/*********
|
||||||
** Public methods
|
** Public methods
|
||||||
*********/
|
*********/
|
||||||
|
|
|
@ -23,13 +23,6 @@ namespace StardewModdingAPI.Mods.ErrorHandler.Patches
|
||||||
private static IMonitor MonitorForGame;
|
private static IMonitor MonitorForGame;
|
||||||
|
|
||||||
|
|
||||||
/*********
|
|
||||||
** Accessors
|
|
||||||
*********/
|
|
||||||
/// <inheritdoc />
|
|
||||||
public string Name => nameof(EventPatches);
|
|
||||||
|
|
||||||
|
|
||||||
/*********
|
/*********
|
||||||
** Public methods
|
** Public methods
|
||||||
*********/
|
*********/
|
||||||
|
|
|
@ -24,13 +24,6 @@ namespace StardewModdingAPI.Mods.ErrorHandler.Patches
|
||||||
private static IMonitor MonitorForGame;
|
private static IMonitor MonitorForGame;
|
||||||
|
|
||||||
|
|
||||||
/*********
|
|
||||||
** Accessors
|
|
||||||
*********/
|
|
||||||
/// <inheritdoc />
|
|
||||||
public string Name => nameof(GameLocationPatches);
|
|
||||||
|
|
||||||
|
|
||||||
/*********
|
/*********
|
||||||
** Public methods
|
** Public methods
|
||||||
*********/
|
*********/
|
||||||
|
|
|
@ -31,13 +31,6 @@ namespace StardewModdingAPI.Mods.ErrorHandler.Patches
|
||||||
private static Action OnContentRemoved;
|
private static Action OnContentRemoved;
|
||||||
|
|
||||||
|
|
||||||
/*********
|
|
||||||
** Accessors
|
|
||||||
*********/
|
|
||||||
/// <inheritdoc />
|
|
||||||
public string Name => nameof(LoadErrorPatch);
|
|
||||||
|
|
||||||
|
|
||||||
/*********
|
/*********
|
||||||
** Public methods
|
** 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.")]
|
[SuppressMessage("ReSharper", "IdentifierTypo", Justification = "Argument names are defined by Harmony and methods are named for clarity.")]
|
||||||
internal class ObjectErrorPatch : IHarmonyPatch
|
internal class ObjectErrorPatch : IHarmonyPatch
|
||||||
{
|
{
|
||||||
/*********
|
|
||||||
** Accessors
|
|
||||||
*********/
|
|
||||||
/// <inheritdoc />
|
|
||||||
public string Name => nameof(ObjectErrorPatch);
|
|
||||||
|
|
||||||
|
|
||||||
/*********
|
/*********
|
||||||
** Public methods
|
** Public methods
|
||||||
*********/
|
*********/
|
||||||
|
|
|
@ -26,13 +26,6 @@ namespace StardewModdingAPI.Mods.ErrorHandler.Patches
|
||||||
private static IMonitor MonitorForGame;
|
private static IMonitor MonitorForGame;
|
||||||
|
|
||||||
|
|
||||||
/*********
|
|
||||||
** Accessors
|
|
||||||
*********/
|
|
||||||
/// <inheritdoc />
|
|
||||||
public string Name => nameof(ScheduleErrorPatch);
|
|
||||||
|
|
||||||
|
|
||||||
/*********
|
/*********
|
||||||
** Public methods
|
** 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.")]
|
[SuppressMessage("ReSharper", "IdentifierTypo", Justification = "Argument names are defined by Harmony and methods are named for clarity.")]
|
||||||
internal class SpriteBatchValidationPatches : IHarmonyPatch
|
internal class SpriteBatchValidationPatches : IHarmonyPatch
|
||||||
{
|
{
|
||||||
/*********
|
|
||||||
** Accessors
|
|
||||||
*********/
|
|
||||||
/// <inheritdoc />
|
|
||||||
public string Name => nameof(SpriteBatchValidationPatches);
|
|
||||||
|
|
||||||
|
|
||||||
/*********
|
/*********
|
||||||
** Public methods
|
** 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.")]
|
[SuppressMessage("ReSharper", "IdentifierTypo", Justification = "Argument names are defined by Harmony and methods are named for clarity.")]
|
||||||
internal class UtilityErrorPatches : IHarmonyPatch
|
internal class UtilityErrorPatches : IHarmonyPatch
|
||||||
{
|
{
|
||||||
/*********
|
|
||||||
** Accessors
|
|
||||||
*********/
|
|
||||||
/// <inheritdoc />
|
|
||||||
public string Name => nameof(UtilityErrorPatches);
|
|
||||||
|
|
||||||
|
|
||||||
/*********
|
/*********
|
||||||
** Public methods
|
** Public methods
|
||||||
*********/
|
*********/
|
||||||
|
|
|
@ -44,7 +44,7 @@ namespace StardewModdingAPI.Framework.Patching
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
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);
|
this.Monitor.Log(ex.GetLogSummary(), LogLevel.Trace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,9 +9,9 @@ namespace StardewModdingAPI.Framework.Patching
|
||||||
/// <summary>A Harmony patch to apply.</summary>
|
/// <summary>A Harmony patch to apply.</summary>
|
||||||
internal interface IHarmonyPatch
|
internal interface IHarmonyPatch
|
||||||
{
|
{
|
||||||
/// <summary>A unique name for this patch.</summary>
|
/*********
|
||||||
string Name { get; }
|
** Methods
|
||||||
|
*********/
|
||||||
/// <summary>Apply the Harmony patch.</summary>
|
/// <summary>Apply the Harmony patch.</summary>
|
||||||
/// <param name="harmony">The Harmony instance.</param>
|
/// <param name="harmony">The Harmony instance.</param>
|
||||||
#if HARMONY_2
|
#if HARMONY_2
|
||||||
|
|
|
@ -33,13 +33,6 @@ namespace StardewModdingAPI.Patches
|
||||||
private static bool IsInLoadForNewGame;
|
private static bool IsInLoadForNewGame;
|
||||||
|
|
||||||
|
|
||||||
/*********
|
|
||||||
** Accessors
|
|
||||||
*********/
|
|
||||||
/// <inheritdoc />
|
|
||||||
public string Name => nameof(LoadContextPatch);
|
|
||||||
|
|
||||||
|
|
||||||
/*********
|
/*********
|
||||||
** Public methods
|
** Public methods
|
||||||
*********/
|
*********/
|
||||||
|
|
Loading…
Reference in New Issue