Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PRF Mod Conflict?: Plasma Drill Cannot Re-order Bills #104

Open
BardezAnAvatar opened this issue Mar 2, 2023 · 4 comments
Open

PRF Mod Conflict?: Plasma Drill Cannot Re-order Bills #104

BardezAnAvatar opened this issue Mar 2, 2023 · 4 comments

Comments

@BardezAnAvatar
Copy link

Describe the bug

The Plasma Drill from Project RimFactory Revived cannot re-order any of its bills when installed along side Better Workbench Management mod. When a bill is selected ON ONLY THIS STATION, it instead re-orders... colonists instead.

To Reproduce
Reproducibility: ?
Steps to reproduce the behavior:

  1. Install Better Workbench Management mod + Project RimFactory Revived
  2. Place a Plasma Drill
  3. Add several bills to the Plasma Drill
  4. Try to drag the bills to re-order
  5. Notice that colonists are moved instead. May have to drag the cursor to the bottom of the screen.
  • Note: The colonist being moved represents the index of the bill being dragged. i.e.: first bill will drag first colonist; second bill will drag second colonist; etc.

Expected behavior
Bills should be movable

Actual Behavior
Bills will not be reorderable. Instead, the bill selection appears to redirect to colonists. See screenshots that show cursor over bills, but have floating colonist pawns dragged instead.

Screenshots
screenshot10
screenshot11
screenshot9

Rimworld (please complete the following information):

  • RimWorld Version: latest (1.4)
  • PRF Version: latest
  • Improved Workbenches Version: latest
  • Link to gist bug report:
  • Type:
  • Severity:

Modlist (please complete the following information):

  • Your modlist (if needed): Better Workbench Management + Project RimFactory Revived
  • Do you know what mod conflicts?: I suspect that it is the PRF station that is at fault, but not certain what cause would drive one station to have the described behavior

Additional context
Other workbenches and machines within PRF work properly (such as assemblers); I want to say, anecdotally, that I used to see an index out of bounds of array error message when dragging bills on this station but I am not able to reproduce that error reporting behavior at this time.

Link to bug report over at PRF repo

@Sn1p3rr3c0n
Copy link

Hi Rimfactory Maintainer here
I see that you have a patch for ProjectRimFactory.SAL3.UI.ITab_SAL3Bills

_rimFactoryBillsTabType = GenTypes.GetTypeInAnyAssembly("ProjectRimFactory.SAL3.UI.ITab_SAL3Bills");

there is a additional ITab specifically for the Plasma Drill called ProjectRimFactory.AutoMachineTool.ITab_Bills2
The issue likely is that there is no patch for that one.

I think i will recheck if that additional ITab is necessary or not and update you here.

@Sn1p3rr3c0n
Copy link

I was able to remove the additional ITab in zymex22/Project-RimFactory-Revived@ccda0c5
This change did not break any of the existing compatibility, however the Plasma Drill ProjectRimFactory.AutoMachineTool.Building_Miner is still not supported by your Patch.

this might be the case as you appear to check for the Building type

_rimFactoryBuildingType = GenTypes.GetTypeInAnyAssembly(
"ProjectRimFactory.SAL3.Things.Assemblers.Building_DynamicBillGiver");

With the mentioned Change I have introduced the IBillTab Interface. maybe you can used that instead or otherwise update the patch.

@BardezAnAvatar
Copy link
Author

I have submitted a PR for this issue.

Root cause: From what I can tell, it was getting into a code path if it was a PRF building and then subsequent PRF exception cases were not being checked, causing half-functional code patches. The existing captured re-order collection was invalid and the code to look for a collection to re-order just reverts to the colonist bar?

@BardezAnAvatar
Copy link
Author

@Sn1p3rr3c0n: The patch I have looks rather lazy, checking multiple types. You mention IBillTab and that looks like it would be a better candidate once your PR is completed and the mod gets published. In the interim: is there a better base type that we could use that encompasses all PRF buildings that have bill tabs, but not any buildings lacking one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants