[B18] Queued orders allow Pawns to ignore work priorities and work restrictions

Started by Calahan, January 20, 2018, 08:58:35 AM

Previous topic - Next topic

Calahan

1. What the circumstances were. / 2. What happened.

Under certain circumstances, queued orders will allow Pawns to ignore their set work priorities and decide to change from a higher priority job to a lower priority one. They will also proceed to change and carry out jobs they are restricted from performing (as per their work priorities). 

3. What you expected to happen.

I would expect Pawns to both obey their set work priorities and not change from a higher priority job to a lower one (unless directly commanded to by the player). And I certainly expect Pawns not to perform jobs that they are restricted from performing (regardless of when a change to their work priorities was made).

4. Steps to reproduce the bug.

1 - Order the construction of a 1x1 object (with a low work to make value) on a stone floored tile (in the save I have used an end table).
1a - Have the construction materials delivered for the object (but do not complete construction yet).
2 - Order a tile to be mined. Preferably one with a lot of HP such as Machinery or Plasteel.
3 - Order the stone tile under the 1x1 object to be smoothed.
4 - Set a Pawn's work priorities to allow Construct and Mine only ("only" so that there are no sources of interference), and have the priority for Mine set higher than for Construct. (in the save Mine is set to 3, while Construct is 4).
5 - Pause the game and order this Pawn to build the 1x1 object, and then queue an order to mine the tile in step #2.
6 - Unpause and watch as the Pawn builds the object and then proceeds to mine the tile as instructed.
7 - Continue to watch and at some point the Pawn will stop mining the tile (assuming it had a lot of HP) and change jobs to start smoothing the stone floor. Even though this smoothing job was never ordered, and even though Construct is set to a lower priority than Mine.

Additionally.
6a - While the Pawn is moving to the mining job, pause the game and disallow that Pawn from doing Construct, meaning the only job they are allowed to do is Mine.
7 - (as above, except) the Pawn will smooth the tile even though they are not allowed to perform Construction tasks (as per the change to their work restrictions in step #5a)

5. Save game

Or just load and unpause the save game which is setup (with Pawn "Masie") to reproduce the first example (and can be used for the second one as well).
http://www16.zippyshare.com/v/vXiZhwNU/file.html

malloc

I have noticed that when building any object is forced (bed, worktable, etc.), they will smooth the tile under the floor automatically as if it were forced following the object construction.  I suspect that the smoothing is being added to their queue while building the end table in your example as if you had queued it even though you did not resulting in them returning to the floor smoothing after mining the short interval that 'forced mining' does before the move on to the next item (about 12 hits in my experience).

Strangely on large objects, they only smooth the floor under the tile you right-clicked to force the build and not all tiles under the object.