From 78c6282b5f17a52e35d34a4280fbb1ef1873c9c9 Mon Sep 17 00:00:00 2001 From: Zetrith Date: Sun, 11 Jul 2021 15:43:42 +0200 Subject: [PATCH] Fix exceptions when generating a new world --- Source/DynamicDrawPatches.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/DynamicDrawPatches.cs b/Source/DynamicDrawPatches.cs index c04f00f..25789ea 100644 --- a/Source/DynamicDrawPatches.cs +++ b/Source/DynamicDrawPatches.cs @@ -121,7 +121,7 @@ static class OverlayDrawerPatch static IEnumerable TargetMethods() { foreach (var m in AccessTools.GetDeclaredMethods(typeof(OverlayDrawer))) - if (m.GetParameters().Length > 0 && m.GetParameters()[0].ParameterType == typeof(Thing)) + if (m.Name.StartsWith("Render") && m.GetParameters().Length > 0 && m.GetParameters()[0].ParameterType == typeof(Thing)) yield return m; }