Skip to content

Fix "combine" breaking dye mixes#1596

Merged
ab9rf merged 5 commits into
DFHack:masterfrom
Snowstar38:master
Jul 12, 2026
Merged

Fix "combine" breaking dye mixes#1596
ab9rf merged 5 commits into
DFHack:masterfrom
Snowstar38:master

Conversation

@Snowstar38

Copy link
Copy Markdown
Contributor

There was a bug where using combine with mixed dyes would revert the mix to one of its component parts.

Ex: You have 2 stacks of 2 Dye A, 3 stacks of 1 Dye B, and 1 stack of 3 of the mix Dye AB

Expected behavior: use combine, you end up with 1 stack of 4 Dye A, 1 stack of 3 Dye B, and 1 stack of 3 Dye AB

Actual behavior: use combine, you end up with 1 stack of 7 Dye A, 1 stack of 3 Dye B, and no Dye AB (because it combined AB with A)

There was a bug where using combine with mixed dyes would revert the mix to one of its component parts.

Ex: You have 2 stacks of 2 Dye A, 3 stacks of 1 Dye B, and 1 stack of 3 of the mix Dye AB
Expected behavior: use combine, you end up with 1 stack of 4 Dye A, 1 stack of 3 Dye B, and 1 stack of 3 Dye AB
Actual behavior: use combine, you end up with 1 stack of **7** Dye A, 1 stack of 3 Dye B, and no Dye AB (because it combined AB with A)
Turns out that dye mixing does not like there being multiple units and/or stacks in a bag and it bugs out - removing dyes altogether for now

@ab9rf ab9rf left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a stopgap measure. the issue is that we really need to check the fields added in the dye update, but combine was never updated to do this.

That said, worth doing. No behavior is better than buggy behavior.

Needs changelog, will approve once changelog is added.

@Snowstar38 Snowstar38 requested a review from ab9rf July 11, 2026 23:43
@Snowstar38

Copy link
Copy Markdown
Contributor Author

Thanks! I wasn't sure I'm talented enough to dig through fixing it to work properly with dyes, but at least this way no one will have whole stacks of dye effectively disappearing on them!

@ab9rf ab9rf merged commit 910f31f into DFHack:master Jul 12, 2026
10 checks 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.

3 participants