KongMD-Steam / QuestionableEthicsEnhanced

The source code of the Questionable Ethics Enhanced mod for RimWorld.
MIT License
12 stars 7 forks source link

Event/Computer-Generated Genome Sequences Break "Start Growing" menu in Clone Vat #50

Closed DJSwamp closed 5 years ago

DJSwamp commented 5 years ago

Describe the bug If for whatever reason you happen upon a Genome Sequence Template from an event, spawned in, or acquired anyway that isn't from using a sequencer yourself, a blank template is generated. This item's presence generally causes a few buggy behaviours. For one: As mentioned in the title, the Start Growing menu becomes broken, specifically, clicking it causes nothing to happen, as opposed to being either given a list of available genomes, or informed you have none available. Secondly: When the item is carried in an inventory, and that inventory is viewed via the Gear tab, scrolling through the inventory available doesn't work, and instead will zoom in and out as if it wasn't open. I don't really understand how this occurs, I can understand how a blank sequence may bug the vat, but this seems to be a very random bug.

Expected behavior When clicking on the "Start Growing" button of a Clone Vat, a menu of available genome sequences on the map should be presented, otherwise a message detailing how to attain one is given. To Reproduce Steps to reproduce the behavior:

  1. (Most quickly) On an active map, activate Development Mode.
  2. Open the Debug Action Menu.
  3. Select 'Make Colony (full)' under Autotests (this will generate stacks of blank genome sequences, though this bug was first encountered with a single sequence)
  4. Construct a Clone Vat
  5. Click on 'Start Growing'. No menu will appear. This will also create a log in Development Mode, which I've added to the additional context.
  6. Destroying all the blanks on the map will restore functionality to the menu.

For the zooming bug:

  1. Get a template into a pawn's inventory, either through creating a caravan or a mod that allows picking up to inventory.
  2. Select aforementioned pawn on a map (not world map), and open the gear tab.
  3. Should there be enough items in the inventory to allow for a scroll bar, scrolling with the mouse wheel will not work, and instead zoom in and out.

Screenshots I feel screenshots of things NOT happening wouldn't be particularly useful.

Additional context I am running a small suite of mods, ~40 which I'll share if necessary,, though I tested the genome sequence bug with just QEE active, as I was trying to isolate and fix the bug itself (I originally thought it was a mod conflict) and couldn't find any information here, while the blank sat menacingly in my stockpile (it was the first time I had built a Clone Vat). In game I also acquired my blank sequence from a modded event (Real Ruins specifically), though I've since acquired a second through a quest reward.

For the zooming issue, should I have made a separate bug report for that? I don't really have anything to go on there, unfortunately, and literally just noticed it, which prompted me to make a report for the original bug.

Sorry if this is a long report for a relatively minor issue, I just wanted to be as thorough and helpful as I could be, and know absolutely nothing about coding to be of use in thoughts in that regard. Thanks for helping sustain a cool and fun mod.

The aforementioned log, apologies if this isn't meant to go here, I've had this account for literally minutes, and have never filed an issue or bug before.

System.NullReferenceException: Object reference not set to an instance of an object at QEthics.Building_PawnVatGrower.b__35_0 () <0x003d8> at Verse.Command_Action.ProcessInput (UnityEngine.Event) <0x00038> at Verse.GizmoGridDrawer.DrawGizmoGrid (System.Collections.Generic.IEnumerable1<Verse.Gizmo>,single,Verse.Gizmo&) <0x00c75> at (wrapper dynamic-method) RimWorld.InspectGizmoGrid.DrawInspectGizmoGridFor_Patch0 (System.Collections.Generic.IEnumerable1,Verse.Gizmo&) <0x007aa>

Verse.Log:Error(String, Boolean) Verse.Log:ErrorOnce(String, Int32, Boolean) RimWorld.InspectGizmoGrid:DrawInspectGizmoGridFor_Patch0(IEnumerable`1, Gizmo&) RimWorld.MainTabWindow_Inspect:DrawInspectGizmos() RimWorld.InspectPaneUtility:ExtraOnGUI(IInspectPane) RimWorld.MainTabWindow_Inspect:ExtraOnGUI() Verse.WindowStack:WindowStackOnGUI() RimWorld.UIRoot_Play:UIRootOnGUI() Verse.Root:OnGUI()

KongMD-Steam commented 5 years ago

Thank you for the detailed bug report! I'll be looking at fixing this bug for the next release.

KongMD-Steam commented 5 years ago

The 'Start Growing' gizmo issue is now fixed! I couldn't reproduce the zooming issue with the genome template using QEE with Pick Up and Haul. The list scrolled fine for me. If you can reproduce it reliably, please open a new issue and I'll take a second look.