File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 127127 <Compile Include =" Source\Harmony_Patches\Harmony_OptionListingUtility.cs" />
128128 <Compile Include =" Source\Harmony_Patches\Harmony_OverlayDrawer.cs" />
129129 <Compile Include =" Source\Harmony_Patches\Harmony_OverlayDrawHandler.cs" />
130+ <Compile Include =" Source\Harmony_Patches\Harmony_PlanDesignation_DesignationDraw.cs" />
130131 <Compile Include =" Source\Harmony_Patches\Harmony_RoofGrid.cs" />
131132 <Compile Include =" Source\Harmony_Patches\Harmony_ScreenshotModeHandler.cs" />
132133 <Compile Include =" Source\Harmony_Patches\Harmony_Targeter.cs" />
Original file line number Diff line number Diff line change 1+ using System ;
2+ using HarmonyLib ;
3+ using Verse ;
4+
5+ namespace ProgressRenderer
6+ {
7+ [ HarmonyPatch ( "PlanDesignation" , nameof ( Designation . DesignationDraw ) ) ]
8+ public static class Harmony_PlanDesignation_DesignationDraw
9+ {
10+ public static bool Prefix ( Designation __instance )
11+ {
12+ try
13+ {
14+ if ( __instance . def == null ) return true ;
15+
16+ var target = __instance . target ;
17+
18+ Map map = target . HasThing ? target . Thing . MapHeld : Find . CurrentMap ;
19+
20+ var renderManager = map ? . GetComponent < MapComponent_RenderManager > ( ) ;
21+
22+ if ( renderManager ? . Rendering == false )
23+ return true ;
24+
25+ return PrModSettings . RenderDesignations ;
26+ }
27+ catch ( Exception ex )
28+ {
29+ // 1.6 UPDATE: Enhanced error reporting
30+ Log . Error ( $ "[ProgressRenderer] DesignationDraw patch error in 1.6: { ex } \n { ex . StackTrace } ") ;
31+ return true ;
32+ }
33+ }
34+ }
35+ }
You can’t perform that action at this time.
0 commit comments