cataclysmbnteam / Cataclysm-BN

Cataclysm: Bright Nights, A fork/variant of Cataclysm:DDA by CleverRaven.
https://docs.cataclysmbn.org
Other
688 stars 271 forks source link

Butchery yield needs to be capped #4523

Closed RoyalFox2140 closed 1 month ago

RoyalFox2140 commented 6 months ago

Describe the bug

Butchery yields is based on butchering quality which is good, but it has no cap to yield. With high enough quality you can gain more products than the creature weighs.

Steps To Reproduce

  1. Use a test item with a ridiculous butchering quality
  2. Find something to butcher
  3. Do it.

Screenshots

image image image

Versions and configuration

Additional context

No response

VissValdyr commented 6 months ago

Butcher quality is only affecting negative numbers. Butcher quality only affects speed. @Coolthulhu said so years ago. So this is a curious thing indeed.

VissValdyr commented 6 months ago

But maybe for the low values we thing are adequate (till 50), so breaking it for the sake of breaking it... Not sure if it should be considered to be a bug then

RoyalFox2140 commented 6 months ago

A cap is essentially required because any bionics like the surgical scalpels, or any fictitious new item or furniture we add to increase butchery speed via high butchering quality is going to cause issues with preservation of mass, we could never add an Auto-Butcher furniture that gives 100% yield and in half the time of a human because there is no cap at 100%. (That is ignoring other limitations with power tools not using charges when used as a tool.)

A cap should also be one of the easiest changes to make so futureproofing the code here is worthwhile. We can't reasonably expect to always use 50 butchering quality for the remainder of the project.