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

Drones may not notice a change to forbidden #600

Closed
Vectorial1024 opened this issue Jul 9, 2022 · 6 comments · Fixed by #766
Closed

Drones may not notice a change to forbidden #600

Vectorial1024 opened this issue Jul 9, 2022 · 6 comments · Fixed by #766
Labels
bug Something isn't working Low Priority should be done, but is not critical by any means

Comments

@Vectorial1024
Copy link

Describe the bug

As title. Drones are interacting with forbidden items/buildings, such as picking up from them/using them.

To Reproduce
There are a few cases:

First case: picking up forbidden items

  1. Construct a smart hopper, and let it be: preferred priority, stores steel
  2. Set up a storage zone within range of smart hopper and let it be: critical priority, stores steel
  3. Set up a caretaker drone station and give it some drones
  4. Drones now pick up steel from hopper and places it back to the storage zone, which immediately sends the steel baack to the hopper
  • Expected behavior: dont pick up from the smart hopper
  • Actual behavior: picks up from smart hopper

Second case: using forbidden buildings

  1. Let a pawn scan an underground deposit
  2. Build a deep drill at the deposit, set up power, etc; let the pawns mine them out
  3. "Resource exhausted; deep drill is now set to forbidden"
  4. Drones decide to continue using the deep drill and begins drilling up many stone chunks
  • Expected behavior: dont use the deep drill (if forbidden)
  • Actual behavior: uses the deep drill regardless if is forbidden

Rimworld (please complete the following information):

  • RimWorld Version: 1.3.3389
  • PRF Version: ??? (Steam latest as of writing)
  • Link to gist bug report: /
  • Type: ?
  • Severity: Moderate

Modlist (please complete the following information):

  • Does this problem exist if only prf is installed: (/)
  • Your modlist (if needed): (/)
  • Do you know what mod conflicts?: seems no conflict?

Additional context
/

@Sn1p3rr3c0n
Copy link
Collaborator

I am unable to reproduce your report regarding case 1.
Please attach a HugsLib Log.

for Case 2 it appears that dorone fail to notice the switch to forbidden

@Vectorial1024
Copy link
Author

Hmmm, maybe I looked wrongly, but I feel like I saw constructions drones pulling items from the smart hoppers to build stuff etc. I can't reproduce case 1 too.

@Sn1p3rr3c0n Sn1p3rr3c0n added bug Something isn't working Low Priority should be done, but is not critical by any means labels Jul 11, 2022
@Sn1p3rr3c0n
Copy link
Collaborator

Set it to Low Priority as this only occurs in one specific instance and could be fixed by a quick lockdown & re-activation.

This issue appears to occur as Drones are don't interrupt their current job.

@Sn1p3rr3c0n Sn1p3rr3c0n changed the title Drones are interacting with forbidden items/buildings (Bug report) Drones may not notice a change to forbidden Jul 28, 2022
@Sn1p3rr3c0n
Copy link
Collaborator

Comparing the job between a Drone and a Pawn in the Savefile shows that
<expiryInterval>1500</expiryInterval> is not set for the drone This Flag will interrupt the job every 1500 ticks, allowing the pawn to notice the change to forbidden.

There are two additional Flags set for the drone that I'm atm not sure why they are there and what effects they entail:
<playerForced>True</playerForced>
<ignoreDesignations>True</ignoreDesignations>

@Sn1p3rr3c0n
Copy link
Collaborator

Sn1p3rr3c0n commented Feb 23, 2024

So in https://github.com/zymex22/Project-RimFactory-Revived/blob/master/Source/ProjectRimFactory/Drones/Building_DroneStation.cs#L506-L507
We set playerForced and remove the expiryInterval.

This code exists since the very beginning. I wonder why it is there. Need to do some tests here
ignoreDesignations is set as a direct result of playerForced

@Sn1p3rr3c0n
Copy link
Collaborator

So far I only noticed the expiryInterval on the Mine Job set at 20000
Deep drilling would be on 1500

my concern with removing the removal of expiryInterval would be the performance impact of the additional job searches.
So far it seems that there are no crazy low values in use for that, so it should not be an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Low Priority should be done, but is not critical by any means
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants