cataclysmbnteam / Cataclysm-BN

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

Auto-fuel-fire doesn't understand items too big to fit in container #542

Open Coolthulhu opened 3 years ago

Coolthulhu commented 3 years ago

Now that logs are bigger, they no longer fit in ovens. Similar thing could probably have happened earlier with zombie corpses used as fuel. The action that moves fuel from firewood spot to oven doesn't "get" it, so the fuel will land adjacent to the tile instead.

scarf005 commented 2 years ago

still happens of now.

scarf005 commented 1 month ago

to future contributor whom may be interested: in the code section of auto fuel fire, following fixes should be applied:

  1. store the target container (e.g oven)'s volume in a variable
  2. when iterating thru possible fuel item, filter items that has bigger size than container
  3. for stack based items, need to be calculated per portion to prevent 1000 stacks of 0.1L flint counting as single 100L item

also need to check whether there's already an existing PR that fixed it, last confirmation date is bit stale