Rotwood-Vale / Ratwood-Keep

GNU Affero General Public License v3.0
22 stars 239 forks source link

[BUG] Item crafting consumes one more item to craft from a bundle #598

Open Koteshkin opened 1 month ago

Koteshkin commented 1 month ago

Describe the bug

If you craft something from a bundle of things that have one more item than craft requirements, you lose that additional item. (for example if you craft Twig Platform using a bundle of exactly 4 sticks, you lose all bundle instead of 3 sticks, if you craft twig floor with bundle of 3, you lose all bundle instead of just 2 sticks)

Steps to Reproduce:

  1. Get a bundle of 4 sticks
  2. Craft Twig Platform (3 sticks needed)
  3. See the bundle leaves nothing after the craft

Works the same with another item crafted from a bundle.

How it should work:

  1. Get a bundle of 4 sticks
  2. Craft Twig Platform
  3. The bundle turns into one single item left, since you only need 3 sticks

Additional context

Bug is reproduced only if you have x+1 items in a bundle. It works fine if you have more. I believe its about bundle and single item being different things by a code and the game doesnt create that one single item back, just eating the bundle whole.

Drayco84 commented 1 month ago

Ah, so the code probably isn't set to spawn the single item out of the bundle, be it sticks, cloth, or whatever.