Skip to content

Commit

Permalink
[MIRROR] Fix holodeck items from being juiced or grinded with a bioge…
Browse files Browse the repository at this point in the history
…nerator or pestle and mortar [MDB IGNORE] (#24872)

* Fix holodeck items from being juiced or grinded with a biogenerator or pestle and mortar (#79397)

Hologram food from the holodeck could still be processed into reagents
via these methods. This has now been fixed.

* Fix holodeck items from being juiced or grinded with a biogenerator or pestle and mortar

---------

Co-authored-by: Tim <[email protected]>
  • Loading branch information
2 people authored and FFMirrorBot committed Nov 9, 2023
1 parent 34bf214 commit 34a0b51
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions code/modules/hydroponics/biogenerator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,11 @@
if(!food_to_convert)
break

if(food_to_convert.flags_1 & HOLOGRAM_1)
qdel(food_to_convert)
current_item_count = max(current_item_count - 1, 0)
continue

convert_to_biomass(food_to_convert)

use_power(active_power_usage * seconds_per_tick)
Expand Down
10 changes: 10 additions & 0 deletions code/modules/reagents/reagent_containers/cups/_cup.dm
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,11 @@
to_chat(user, span_warning("You can't grind this!"))

/obj/item/reagent_containers/cup/mortar/proc/grind_item(obj/item/item, mob/living/carbon/human/user)
if(item.flags_1 & HOLOGRAM_1)
to_chat(user, span_notice("You try to grind [item], but it fades away!"))
qdel(item)
return

if(!item.grind(reagents, user))
if(isstack(item))
to_chat(usr, span_notice("[src] attempts to grind as many pieces of [item] as possible."))
Expand All @@ -547,6 +552,11 @@
QDEL_NULL(item)

/obj/item/reagent_containers/cup/mortar/proc/juice_item(obj/item/item, mob/living/carbon/human/user)
if(item.flags_1 & HOLOGRAM_1)
to_chat(user, span_notice("You try to juice [item], but it fades away!"))
qdel(item)
return

if(!item.juice(reagents, user))
to_chat(user, span_notice("You fail to juice [item]."))
return
Expand Down

0 comments on commit 34a0b51

Please sign in to comment.