RimWorld

RimWorld

Mixed Stone Blocks
GinKao Dec 16, 2022 @ 2:27am
Auto Doors Bug
When I try to build mixed block auto door it allows me to place and build it, but the tooltip doesn't show anything its blank.

When I go back to the architect menu, the autodoor menu completely bugs out.
Icon disappears and i can't even click to build any autodoor.
< >
Showing 1-4 of 4 comments
BigCat Jun 14, 2023 @ 11:58pm 
Good to know I am not the only this happens to
extace_ Jul 18, 2023 @ 7:32am 
Same issue here. It removes the option for all autodoors on my save. There's no way for me to select autodoors in the menu (it is empty now).
Prometheus Jul 21, 2023 @ 5:48pm 
can confirm here is the error that appears:

Root level exception in OnGUI(): System.NullReferenceException: Object reference not set to an instance of an object at MixedStoneBlocks.WidgetsPatch+ThingIconPatch.Prefix (UnityEngine.Rect rect, Verse.ThingDef thingDef, Verse.ThingDef stuffDef, Verse.ThingStyleDef thingStyleDef, System.Single scale, System.Nullable`1[T] color, System.Nullable`1[T] graphicIndexOverride) [0x0003a] in <6cec620fab484b088047d8d6eec540db>:0 at (wrapper dynamic-method) Verse.Widgets.Verse.Widgets.ThingIcon_Patch1(UnityEngine.Rect,Verse.ThingDef,Verse.ThingDef,Verse.ThingStyleDef,single,System.Nullable`1<UnityEngine.Color>,System.Nullable`1<int>) at Verse.Widgets.DefIcon (UnityEngine.Rect rect, Verse.Def def, Verse.ThingDef stuffDef, System.Single scale, Verse.ThingStyleDef thingStyleDef, System.Boolean drawPlaceholder, System.Nullable`1[T] color, UnityEngine.Material material, System.Nullable`1[T] graphicIndexOverride) [0x0007d] in <95de19971c5d40878d8742747904cdcd>:0 at RimWorld.Designator_Build.DrawIcon (UnityEngine.Rect rect, UnityEngine.Material buttonMat, Verse.GizmoRenderParms parms) [0x00063] in <95de19971c5d40878d8742747904cdcd>:0 at Verse.Command.GizmoOnGUIInt (UnityEngine.Rect butRect, Verse.GizmoRenderParms parms) [0x000ae] in <95de19971c5d40878d8742747904cdcd>:0 at Verse.Command.GizmoOnGUI (UnityEngine.Vector2 topLeft, System.Single maxWidth, Verse.GizmoRenderParms parms) [0x0001e] in <95de19971c5d40878d8742747904cdcd>:0 at Verse.Designator.GizmoOnGUI (UnityEngine.Vector2 topLeft, System.Single maxWidth, Verse.GizmoRenderParms parms) [0x00000] in <95de19971c5d40878d8742747904cdcd>:0 at RimWorld.Designator_Build.GizmoOnGUI (UnityEngine.Vector2 topLeft, System.Single maxWidth, Verse.GizmoRenderParms parms) [0x00000] in <95de19971c5d40878d8742747904cdcd>:0 at Verse.GizmoGridDrawer.DrawGizmoGrid (System.Collections.Generic.IEnumerable`1[T] gizmos, System.Single startX, Verse.Gizmo& mouseoverGizmo, System.Func`2[T,TResult] customActivatorFunc, System.Func`2[T,TResult] highlightFunc, System.Func`2[T,TResult] lowlightFunc) [0x004bc] in <95de19971c5d40878d8742747904cdcd>:0 at RimWorld.ArchitectCategoryTab.DesignationTabOnGUI (Verse.Designator forceActivatedCommand) [0x0007a] in <95de19971c5d40878d8742747904cdcd>:0 at RimWorld.MainTabWindow_Architect.ExtraOnGUI () [0x00010] in <95de19971c5d40878d8742747904cdcd>:0 at Verse.WindowStack.WindowStackOnGUI () [0x00038] in <95de19971c5d40878d8742747904cdcd>:0 at RimWorld.UIRoot_Play.UIRootOnGUI () [0x00079] in <95de19971c5d40878d8742747904cdcd>:0 at (wrapper dynamic-method) Verse.Root.Verse.Root.OnGUI_Patch1(Verse.Root) UnityEngine.StackTraceUtility:ExtractStackTrace () Verse.Log:Error (string) (wrapper dynamic-method) Verse.Root:Verse.Root.OnGUI_Patch1 (Verse.Root)
Prometheus Jul 21, 2023 @ 8:58pm 
I suspect that it has to do with this code here:

if (doorInstance?.def == ThingDefOf.Autodoor) if (__instance.StyleDef?.Graphic == null) { LoadMixedStoneDoorGraphics(__instance.DefaultGraphic); __result = _mixedAutodoorGraphic; } else { Color color, colorTwo; var instanceGraphic = __instance.StyleDef.Graphic; if (building?.PaintColorDef != null) { color = colorTwo = __instance.DrawColor; } else { StoneDefs.GetColors(__instance.thingIDNumber, out color, out colorTwo); } __result = GraphicDatabase.Get<Graphic_Single>( instanceGraphic.path, instanceGraphic.Shader, instanceGraphic.drawSize, color, colorTwo, instanceGraphic.data); } return false; }

Because of the __instance.StyleDef?.Graphic == null.

If you have anything other than the techist style (or no style) it will break since no other style has it's own autodoors. I managed to get it working using the dev tools to modify my pawn's ideology to use the techist style and it worked as expected.

Sadly I don't have Visual Studio installed so compiling the code and building a workable fix would take a lot of effort. As a workaround though, you can use the debug/dev tools in the game to modify your ideology by opening your ideology with the dev tools open and clicking "DEV: Edit mode". You can then either replace your style or just add the techist style in addition to whatever styles you have and autodoor should work again (though they will be techist autodoors).
< >
Showing 1-4 of 4 comments
Per page: 1530 50