diff options
| author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-12-20 22:35:58 -0500 |
|---|---|---|
| committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-12-20 22:35:58 -0500 |
| commit | 77002d3e9965d9afa843a95129c6acb5d1c4a283 (patch) | |
| tree | b4f4a338945cd3f2cc5881e46fb0dd2b075a79ce /src/SMAPI/Patches | |
| parent | 1c70736c00e6e70f46f539cb26b5fd253f4eff3b (diff) | |
| parent | 5e2f6f565d6ef5330ea2e8c6a5e796f937289255 (diff) | |
| download | SMAPI-77002d3e9965d9afa843a95129c6acb5d1c4a283.tar.gz SMAPI-77002d3e9965d9afa843a95129c6acb5d1c4a283.tar.bz2 SMAPI-77002d3e9965d9afa843a95129c6acb5d1c4a283.zip | |
Merge branch 'stardew-valley-1.5' into develop
# Conflicts:
# docs/release-notes.md
Diffstat (limited to 'src/SMAPI/Patches')
| -rw-r--r-- | src/SMAPI/Patches/DialogueErrorPatch.cs | 4 | ||||
| -rw-r--r-- | src/SMAPI/Patches/ScheduleErrorPatch.cs | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/SMAPI/Patches/DialogueErrorPatch.cs b/src/SMAPI/Patches/DialogueErrorPatch.cs index 42494390..215df561 100644 --- a/src/SMAPI/Patches/DialogueErrorPatch.cs +++ b/src/SMAPI/Patches/DialogueErrorPatch.cs @@ -135,11 +135,9 @@ namespace StardewModdingAPI.Patches IReflectedMethod translateArraysOfStrings = DialogueErrorPatch.Reflection.GetMethod(typeof(Dialogue), "TranslateArraysOfStrings"); IReflectedMethod parseDialogueString = DialogueErrorPatch.Reflection.GetMethod(__instance, "parseDialogueString"); IReflectedMethod checkForSpecialDialogueAttributes = DialogueErrorPatch.Reflection.GetMethod(__instance, "checkForSpecialDialogueAttributes"); - IReflectedField<List<string>> dialogues = DialogueErrorPatch.Reflection.GetField<List<string>>(__instance, "dialogues"); // replicate base constructor - if (dialogues.GetValue() == null) - dialogues.SetValue(new List<string>()); + __instance.dialogues ??= new List<string>(); // duplicate code with try..catch try diff --git a/src/SMAPI/Patches/ScheduleErrorPatch.cs b/src/SMAPI/Patches/ScheduleErrorPatch.cs index 17db07a6..1d58a292 100644 --- a/src/SMAPI/Patches/ScheduleErrorPatch.cs +++ b/src/SMAPI/Patches/ScheduleErrorPatch.cs @@ -51,7 +51,7 @@ namespace StardewModdingAPI.Patches #endif { harmony.Patch( - original: AccessTools.Method(typeof(NPC), "parseMasterSchedule"), + original: AccessTools.Method(typeof(NPC), nameof(NPC.parseMasterSchedule)), #if HARMONY_2 finalizer: new HarmonyMethod(this.GetType(), nameof(ScheduleErrorPatch.Finalize_NPC_parseMasterSchedule)) #else |
