Skip to content

Commit

Permalink
[MIRROR] Makes lizard wine (and some other crafting menu drink recipe…
Browse files Browse the repository at this point in the history
… drinks) produce their intended reagents (#431)

* Makes lizard wine (and some other crafting menu drink recipe drinks) produce their intended reagents (#80874)

## About The Pull Request

Crafting recipes now have an arg that decides if crafting results will
retain their starting reagents, or have ingredient reagents transferred
into them.

So, previously, crafting a specialty drink (lizard wine, candycorn
liquor) from the crafting menu would immediately empty the new bottle's
reagents and replace it with the ethanol used in the recipe.

Now, recipes can be prevented from modifying their result's reagents by
setting unique_reagents to TRUE (False by default. I don't know what
recipes really use this functionality but I wanted to preserve it for
everything but the drink recipes it interferes with.)

Bonus: This changelog entry I found from 3 years ago, apparently fixing
this same issue.

![image](https://github.com/tgstation/tgstation/assets/28870487/55d8f9d7-e3d7-41db-ace3-78156ffa3778)
## Why It's Good For The Game

Closes #80870.

Makes some more reagents accessible again.
## Changelog
:cl: Rhials
fix: Specialty drinks crafted in the crafting menu will now create the
intended reagents, instead of containing the reagents used to craft it.
/:cl:

* Makes lizard wine (and some other crafting menu drink recipe drinks) produce their intended reagents

---------

Co-authored-by: Rhials <[email protected]>
Co-authored-by: NovaBot <[email protected]>
  • Loading branch information
3 people authored and FFMirrorBot committed Jan 12, 2024
1 parent a860ef5 commit 1521d67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/datums/components/crafting/crafting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,10 @@
if(result.atom_storage && recipe.delete_contents)
for(var/obj/item/thing in result)
qdel(thing)
result.reagents?.clear_reagents()
var/datum/reagents/holder = locate() in parts
if(holder) //transfer reagents from ingredients to result
if(result.reagents)
if(!ispath(recipe.result, /obj/item/reagent_containers) && result.reagents)
result.reagents.clear_reagents()
holder.trans_to(result.reagents, holder.total_volume, no_react = TRUE)
parts -= holder
qdel(holder)
Expand Down

0 comments on commit 1521d67

Please sign in to comment.