CleverRaven / CleverRaven/Cataclysm-DDA

Crafting things with components taking more than 1000L destroy the items

Open
#36,968 0 comments 1 reaction 0 assignees View on GitHub
<Bug> Crafting / Construction / Recipes Items / Item Actions / Item Qualities
Dominant language
C++
Stars
13.1k
Forks
4.6k
Avg merge
2d 1h
Merged PRs (30d)
200

Description

# Describe the bug

Trying to craft items (or batches) with overly large components (probably above what can fit into the destination tile) don't work, destroying the components and giving nothing in return.

Discovered this when tried to craft a 20x batch of methanol from planks of wood (taking 240 planks, thus being over 1000L that can fit on the workbench tile)

# Steps To Reproduce

1. Pick a recipe taking enough ingredients.
2. Choose to make a batch.
3. Watch the error message.

# Expected behavior

It either working and pre-reducing the volume, or the game warning the player that the batch size in question is impossible.

# Versions and configuration

- OS: Windows
- OS Version: 10.0 1903
- Game Version: 0.D-11235-g00699b2 [64-bit]
- Graphics Version: Tiles
- Mods loaded: [
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food],
Aftershock [aftershock],
C.R.I.T Expansion Mod [crt_expansion],
Bens GF recipes [Tolerate_This],
Craftable Gun Pack [craftgp],
Garden Pots [growable-pots],
Gun Cotton [guncotton],
Makeshift Items Mod [makeshift],
Medieval and Historic Classes and Shields [Medieval_Stuff],
More Survival Tools [More_Survival_Tools],
DinoMod [DinoMod],
Hydroponics [hydroponics],
Mutant NPCs [mutant_npcs],
Folding Parts pack [deoxymod],
Vehicle Additions Pack [blazemod],
Roadheader and other mining vehicles [Heavy miners],
Tanks and Other Vehicles [Tanks],
No Explosive Zombies [No_Explosive_Zombies],
Manual Bionic Installation [manualbionicinstall],
Safe Autodoc [safeautodoc],
Stats Through Kills [stats_through_kills],
Stats Through Skills [StatsThroughSkills]
]

# Additional context

`11:48:10.763 ERROR : src/crafting.cpp:638 [item_location set_item_map(const tripoint&, item&)] Could not place in progress methanol (20) (0%) on map near (70, 64, 0)`

Contributor guide

Open the contributing guide

Research direction

Start in src/crafting.cpp around line 638, where set_item_map reports that the in-progress batch cannot be placed on the map. Reproduce a batch whose components exceed the destination tile capacity, such as the 20x methanol example using 240 planks. Done means the game either adjusts the batch volume before crafting or warns the player and preserves the components.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.