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

fix: handle skinning batch jobs correctly #4269

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

ekaratzas
Copy link
Contributor

Purpose of change

This PR fixes the inability to batch skin or field dress multiple corpses at once. The relevant code that would check if the corpses have skin/organs only worked if a specific corpse index had been selected, i.e. if the corpse index was something other than -1.
This fixes the issue for both organs and skin as the checks are clustered together.

Fixes #4094

Describe the solution

Fix simply checks if any of the corpses have skin/organs in order to trigger the appropriate submenu selections in the butcher menu. The behavior remains effectively the same if the player is targeting a specific corpse, it only changes behavior for batch butchering.

Describe alternatives you've considered

Not fixing this in hopes of more players turning vegan.

Testing

Tested following scenarios:

  • multiple corpses with skin on same tile - player can batch butcher all of them with fix
  • multiple corpses, some with skin, some without on tile - batch butchering works as expected and only those with skin are butchered
  • field dressing batch job with human/chicken corpses on same tile - human corpses were butchered, chickens were ignored
  • butchering single corpse in a tile
  • butchering single corpse out of a pile of corpses in a pile

Additional context

Butchering is messy business

screenshot_butchering_bn

Checklist

@github-actions github-actions bot added the src changes related to source code. label Feb 29, 2024
@scarf005 scarf005 changed the title fix: handle skinning batch jobs correctly #4094 fix: handle skinning batch jobs correctly Feb 29, 2024
Copy link
Member

@scarf005 scarf005 left a comment

Choose a reason for hiding this comment

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

image

was able to skin multiple corpses.

@scarf005 scarf005 merged commit 4a5e315 into cataclysmbnteam:main Feb 29, 2024
13 checks passed
@ekaratzas ekaratzas deleted the fix-skin-batch-job-4094 branch March 10, 2024 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
src changes related to source code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't skin multiple human corpses
2 participants