Skip to content

fix: keep items in ListerHaulables after vanilla Cancel (#24)#25

Merged
keyz182 merged 1 commit into
mainfrom
fix/issue-24-cancel-removes-prioritize-hauling
May 20, 2026
Merged

fix: keep items in ListerHaulables after vanilla Cancel (#24)#25
keyz182 merged 1 commit into
mainfrom
fix/issue-24-cancel-removes-prioritize-hauling

Conversation

@keyz182
Copy link
Copy Markdown
Owner

@keyz182 keyz182 commented May 20, 2026

Summary

Closes #24.

Designator_HaulUrgently.DesignateThing (plus the on-screen / on-map right-click variants in Thing_Patches.HaulUrgentlyRightClick) was piggybacking DesignationDefOf.Haul onto the same Thing alongside KAU_HaulUrgentlyDesignation.

When the player clicked the vanilla Cancel gizmo on an urgently-marked item:

  1. Designator_Cancel.DesignateThing stripped every cancelable designation, including the Haul one KAU had silently added.
  2. Vanilla ListerHaulables.HaulDesignationRemoved fired and dropped the Thing from the haulables list.
  3. The vanilla "Prioritize hauling X" float-menu option, which is gated on ListerHaulables membership, no longer appeared until Haul Urgently was re-applied or a pawn finished a natural haul.

Items that are EverHaulable && !IsInValidBestStorage() are already tracked by ListerHaulables via the spawn path, so the extra vanilla designation was redundant. Removing it leaves the lister state intact across the urgent → cancel cycle.

Repro / validation

Reproduced + validated against the save file attached to issue #24 via RimMCP REPL:

step KAU urgent vanilla Haul in ListerHaulables "Prioritize hauling" float menu
baseline
after Haul Urgently (pre-fix) ✓ (KAU added)
after vanilla Cancel (pre-fix) (bug)
after Haul Urgently (post-fix)
after vanilla Cancel (post-fix)

Designator_HaulUrgently and the on-screen/on-map right-click variants
piggybacked DesignationDefOf.Haul alongside KAU_HaulUrgentlyDesignation.
Vanilla Designator_Cancel stripped both, routing through
ListerHaulables.HaulDesignationRemoved and dropping the item from the
haulables list. The vanilla "Prioritize hauling" float-menu option then
disappeared until Haul Urgently was re-applied or a pawn finished a
natural haul. Items that are EverHaulable && !IsInValidBestStorage are
already tracked by ListerHaulables via the spawn path, so the extra
vanilla designation was redundant.
@keyz182 keyz182 merged commit e647161 into main May 20, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

Bug: “Prioritize Hauling” Disappears After Cancelling “Haul Urgently”

1 participant