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

clay kiln and rock forge makes coal (not charcoal) disappear #68371

Closed
misterprimus opened this issue Sep 28, 2023 · 6 comments · Fixed by #72703
Closed

clay kiln and rock forge makes coal (not charcoal) disappear #68371

misterprimus opened this issue Sep 28, 2023 · 6 comments · Fixed by #72703
Labels
<Bug> This needs to be fixed [C++] Changes (can be) made in C++. Previously named `Code` Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. (S2 - Confirmed) Bug that's been confirmed to exist

Comments

@misterprimus
Copy link
Contributor

Describe the bug

I was playing a game where I happened to have come across a bunch of coal at a mine and also had charcoal available, all nearby. Reloading the Clay Kiln (constructed object) with Coal just made the coal disappear. Charcoal seems to work correctly, however.

Attach save file

Lemay - old-trimmed.tar.gz

Steps to reproduce

  1. Build a Charcoal Forge or Clay Kiln.
  2. Have Charcoal and Coal nearby.
  3. Try to reload it with the coal.
  4. Coal will disappear.

Expected behavior

Just as with Charcoal, Coal should be loaded into the forge/kiln and tracked in its inventory. It should not just disappear, unless used of course.

Screenshots

disappearingcoal

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19045.3448 (22H2)
  • Game Version: ae14681 [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Slowdown Fungal Growth [no_fungal_growth]
    ]

Additional context

I suspect this has not been caught yet because Coal is an extremely unlikely fuel to be used for these purposes given that it usually spawns in mines which are medium danger, low reward raiding targets. Furthermore, Charcoal is extremely easy to make to the point where it's often faster to just make it than to transport it back to base.

@misterprimus misterprimus added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Sep 28, 2023
@FATM0USE
Copy link

might be related to #68371 where coal was moved to its own ammo type to prevent use in cooking recipes

@RenechCDDA RenechCDDA added the Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. label Oct 4, 2023
@RenechCDDA
Copy link
Member

Okay so this bug is more complicated than that. You can load it endlessly, but it doesn't count, and can't be unloaded.

image

@RenechCDDA RenechCDDA added (S2 - Confirmed) Bug that's been confirmed to exist [C++] Changes (can be) made in C++. Previously named `Code` and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Oct 4, 2023
@RenechCDDA
Copy link
Member

RenechCDDA commented Oct 4, 2023

Yeah looks like this change is due to coal being separated out into its own ammo type in #67621, as FATM0USE was trying to say.

reload_furniture takes only a single itype for ammo, by calling furn_t::crafting_ammo_item_type. That function returns the default ammo type.

const itype *ammo = f.crafting_ammo_item_type();

The default ammo type for the charcoal forge(the base item) is charcoal, because that is the first ammo type listed

"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "charcoal": 500, "coal": 2500 } } ],

The simplest way to resolve this is probably to redefine ammo as a vector of itypes and then iterate through them, but reload_furniture will need a decent bit of work to accommodate it.

@ObsessiveArtist
Copy link

Just like to add that rock forges loaded with coal don't count as charcoal forges for the purpose of steel recipies etc when loaded with coal - I'm guessing its related to this issue. Rip easy innawoods start.

@RenechCDDA RenechCDDA moved this to Proposed Release Blockers in 0.H Release Tracker Nov 13, 2023
@BrettDong BrettDong added the <Bug> This needs to be fixed label Dec 9, 2023
@RenechCDDA RenechCDDA moved this from Proposed Release Blockers to Accepted Release Blockers in 0.H Release Tracker Dec 11, 2023
@gearhand
Copy link
Contributor

Should forge and kiln be allowed to mix charcoal and coal inside, or there must be only one type of fuel at any point in time?

@nornagon
Copy link
Contributor

oh dang @katemonster33, jinx i guess

@github-project-automation github-project-automation bot moved this from Accepted Release Blockers to Completed in 0.H Release Tracker Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed [C++] Changes (can be) made in C++. Previously named `Code` Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. (S2 - Confirmed) Bug that's been confirmed to exist
Projects
Status: Completed
7 participants