AUTOMATIC1111 / Rimlaser

A mod for Rimworld game
MIT License
7 stars 4 forks source link

Minigun frequently ends combat in a state that menus cannot draw #15

Open HG-Dev opened 4 years ago

HG-Dev commented 4 years ago

Hello, AUTOMATIC. Ever since I got ahold of a laser minigun, I've been getting headaches whenever messing with caravans where a colonist has a laser minigun equipped. It seems that at the conclusion of combat, it tends to stop in a wound-up state that menus cannot draw. This causes caravan pawn lists to end abruptly. I'll have more information later as I investigate.

Exception filling window for RimWorld.Planet.Dialog_SplitCaravan: System.NullReferenceException: Object reference not set to an instance of an object
  at Rimlaser.SpinningLaserGun.UpdateState () [0x0001a] in <40b2c5ecdefc48738be56e45987b623b>:0 
  at Rimlaser.SpinningLaserGunBase.get_Graphic () [0x00021] in <40b2c5ecdefc48738be56e45987b623b>:0 
  at Verse.Widgets.ThingIcon (UnityEngine.Rect rect, Verse.Thing thing, System.Single alpha) [0x00182] in <d72310b4d8f64d25aee502792b58549f>:0 
  at RimWorld.TransferableOneWayWidget.DrawEquippedWeapon (UnityEngine.Rect rect, UnityEngine.Rect iconRect, RimWorld.TransferableOneWay trad) [0x00040] in <d72310b4d8f64d25aee502792b58549f>:0 
  at RimWorld.TransferableOneWayWidget.DoRow (UnityEngine.Rect rect, RimWorld.TransferableOneWay trad, System.Int32 index, System.Single availableMass) [0x00362] in <d72310b4d8f64d25aee502792b58549f>:0 
  at RimWorld.TransferableOneWayWidget.FillMainRect (UnityEngine.Rect mainRect, System.Boolean& anythingChanged) [0x0018d] in <d72310b4d8f64d25aee502792b58549f>:0 
  at RimWorld.TransferableOneWayWidget.OnGUI (UnityEngine.Rect inRect, System.Boolean& anythingChanged) [0x0016b] in <d72310b4d8f64d25aee502792b58549f>:0 
  at RimWorld.Planet.Dialog_SplitCaravan.DoWindowContents (UnityEngine.Rect inRect) [0x00262] in <d72310b4d8f64d25aee502792b58549f>:0 
  at Verse.Window.InnerWindowOnGUI (System.Int32 x) [0x00165] in <d72310b4d8f64d25aee502792b58549f>:0 
Verse.Log:Error(String, Boolean)
Verse.Window:InnerWindowOnGUI(Int32)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle)
HG-Dev commented 4 years ago

It works in the initial caravan regroup, but not splitting. image image

HG-Dev commented 4 years ago

In other news, I found an ancient wielding a laser turret barrel. image