mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
[MIRROR] Fixes silliness involving soup pots clearing ingredients list [MDB IGNORE] (#20700)
* Fixes silliness involving soup pots clearing ingredients list (#74882) ## About The Pull Request Fixes #74866 The issue is misleading, it never deleted the disk. The disk remained in the pot's contents but was no longer tracked as an ingredient, leaving it stuck Foolishly I had a case for indestructible things when soup reactions finished, where it wouldn't delete stuff like the disk. But I never removed it from the pot. I just nulled the ingredients list. Oops. So pots will drop ingredients that fail to cook into anything when the reaction finishes. --- Semi-unrelated but stuff like stoves, ovens, and chem heater should probably `allowdrop() return FALSE`. I cannot think of many (any) situations where you would want to use `drop_location` from something in an oven, stove, or heater and actually want those returned rather than their own loc. ## Why It's Good For The Game Whoops ## Changelog 🆑 Melbert fix: Ingredients which fail to react in soup reactions drop when the reaction finishes as intended /🆑 * Fixes silliness involving soup pots clearing ingredients list --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
@@ -132,11 +132,12 @@
|
||||
balloon_alert(user, "can't add that!")
|
||||
return TRUE
|
||||
|
||||
var/atom/balloon_loc = ismachinery(loc) ? loc : src
|
||||
// Ensures that faceatom works correctly, since we can can often be in another atom's loc (a stove)
|
||||
var/atom/movable/balloon_loc = ismovable(loc) ? loc : src
|
||||
balloon_loc.balloon_alert(user, "ingredient added")
|
||||
user.face_atom(balloon_loc)
|
||||
LAZYADD(added_ingredients, attacking_item)
|
||||
|
||||
LAZYADD(added_ingredients, attacking_item)
|
||||
update_appearance(UPDATE_OVERLAYS)
|
||||
return TRUE
|
||||
|
||||
@@ -147,7 +148,9 @@
|
||||
var/obj/item/removed = added_ingredients[1]
|
||||
removed.forceMove(get_turf(src))
|
||||
user.put_in_hands(removed)
|
||||
var/atom/balloon_loc = ismachinery(loc) ? loc : src
|
||||
|
||||
// Ensures that faceatom works correctly, since we can can often be in another atom's loc (a stove)
|
||||
var/atom/movable/balloon_loc = ismovable(loc) ? loc : src
|
||||
balloon_loc.balloon_alert(user, "ingredient removed")
|
||||
user.face_atom(balloon_loc)
|
||||
|
||||
|
||||
@@ -162,14 +162,14 @@
|
||||
testing("Soup reaction finished with a total react volume of [react_vol] and [length(pot.added_ingredients)] ingredients. Cleaning up.")
|
||||
|
||||
for(var/obj/item/ingredient as anything in pot.added_ingredients)
|
||||
// Let's not mess with fireproof / indestructible items.
|
||||
// It's not likely that soups use fireproof items as ingredients,
|
||||
// and chef doesn't need more ways to delete things with cooking.
|
||||
if(ingredient.resistance_flags & (FIRE_PROOF|INDESTRUCTIBLE))
|
||||
// Let's not mess with indestructible items.
|
||||
// Chef doesn't need more ways to delete things with cooking.
|
||||
if(ingredient.resistance_flags & INDESTRUCTIBLE)
|
||||
continue
|
||||
|
||||
// Things that had reagents or ingredients in the soup will get deleted
|
||||
if(!isnull(ingredient.reagents) || is_type_in_list(ingredient, required_ingredients))
|
||||
else if(!isnull(ingredient.reagents) || is_type_in_list(ingredient, required_ingredients))
|
||||
LAZYREMOVE(pot.added_ingredients, ingredient)
|
||||
// Send everything left behind
|
||||
transfer_ingredient_reagents(ingredient, holder)
|
||||
// Delete, it's done
|
||||
@@ -179,7 +179,8 @@
|
||||
else
|
||||
ingredient.AddElement(/datum/element/fried_item, 30)
|
||||
|
||||
LAZYNULL(pot.added_ingredients)
|
||||
// Anything left in the ingredient list will get dumped out
|
||||
pot.dump_ingredients(get_turf(pot))
|
||||
// Blackbox log the chemical reaction used, to account for soup reaction that don't produce typical results
|
||||
BLACKBOX_LOG_FOOD_MADE(type)
|
||||
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
QDEL_NULL(beaker)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/machinery/chem_heater/handle_atom_del(atom/A)
|
||||
. = ..()
|
||||
if(A == beaker)
|
||||
|
||||
Reference in New Issue
Block a user