mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 06:00:16 +01:00
Accidental Consumption post-food refactor cleanup (#55152)
Renames a bunch of vars to be more descriptive
Removes old references to snacks
Updates some code slightly
This commit is contained in:
@@ -77,12 +77,9 @@
|
||||
/*
|
||||
* On accidental consumption, consume the pill
|
||||
*/
|
||||
/obj/item/reagent_containers/pill/on_accidental_consumption(mob/living/carbon/M, mob/living/carbon/user, obj/item/source_item, discover_after = FALSE)
|
||||
to_chat(M, "<span class='warning'>You swallow something small. Was that in \the [source_item]?</span>")
|
||||
if(reagents?.total_volume)
|
||||
reagents.trans_to(M, reagents.total_volume, transfered_by = user, methods = INGEST)
|
||||
|
||||
source_item?.contents -= src
|
||||
/obj/item/reagent_containers/pill/on_accidental_consumption(mob/living/carbon/victim, mob/living/carbon/user, obj/item/source_item, discover_after = FALSE)
|
||||
to_chat(victim, "<span class='warning'>You swallow something small. [source_item ? "Was that in [source_item]?" : ""]</span>")
|
||||
reagents?.trans_to(victim, reagents.total_volume, transfered_by = user, methods = INGEST)
|
||||
qdel(src)
|
||||
return discover_after
|
||||
|
||||
|
||||
@@ -160,11 +160,14 @@
|
||||
/*
|
||||
* On accidental consumption, inject the eater with 2/3rd of the syringe and reveal it
|
||||
*/
|
||||
/obj/item/reagent_containers/syringe/on_accidental_consumption(mob/living/carbon/M, mob/living/carbon/user, obj/item/source_item, discover_after = TRUE)
|
||||
to_chat(M, "<span class='boldwarning'>There's a syringe in \the [source_item]!!</span>")
|
||||
M.apply_damage(5, BRUTE, BODY_ZONE_HEAD)
|
||||
if(reagents?.total_volume)
|
||||
reagents.trans_to(M, round(reagents.total_volume*(2/3)), transfered_by = user, methods = INJECT)
|
||||
/obj/item/reagent_containers/syringe/on_accidental_consumption(mob/living/carbon/victim, mob/living/carbon/user, obj/item/source_item, discover_after = TRUE)
|
||||
if(source_item)
|
||||
to_chat(victim, "<span class='boldwarning'>There's a [src] in [source_item]!!</span>")
|
||||
else
|
||||
to_chat(victim, "<span class='boldwarning'>[src] injects you!</span>")
|
||||
|
||||
victim.apply_damage(5, BRUTE, BODY_ZONE_HEAD)
|
||||
reagents?.trans_to(victim, round(reagents.total_volume*(2/3)), transfered_by = user, methods = INJECT)
|
||||
|
||||
return discover_after
|
||||
|
||||
|
||||
Reference in New Issue
Block a user