From dd1df5eaafdd55f128c55f726aa38d0def24efa2 Mon Sep 17 00:00:00 2001 From: SatinIsle <98125273+SatinIsle@users.noreply.github.com> Date: Fri, 11 Apr 2025 23:15:09 +0100 Subject: [PATCH] Makes IDs trash eater-able (#17516) Added IDs to the list of edible trash eater items. Just like PDA's they require the owner to be watching when they're eaten. Fixed PDA eating warning messages not being visible. --- code/_helpers/global_lists_vr.dm | 3 ++- code/game/objects/trash_eating.dm | 27 +++++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/code/_helpers/global_lists_vr.dm b/code/_helpers/global_lists_vr.dm index 9ef6919479..31117e0f9b 100644 --- a/code/_helpers/global_lists_vr.dm +++ b/code/_helpers/global_lists_vr.dm @@ -244,7 +244,8 @@ var/global/list/edible_trash = list(/obj/item/broken_device, /obj/item/entrepreneur, /obj/item/capture_crystal, /obj/item/roulette_ball, - /obj/item/pizzabox + /obj/item/pizzabox, + /obj/item/card/id ) var/global/list/contamination_flavors = list( diff --git a/code/game/objects/trash_eating.dm b/code/game/objects/trash_eating.dm index 5836407857..8d087064a0 100644 --- a/code/game/objects/trash_eating.dm +++ b/code/game/objects/trash_eating.dm @@ -57,19 +57,42 @@ if(!watching) return FALSE else - visible_message(span_warning("[user] is threatening to make [src] disappear!")) + user.visible_message(span_warning("[user] is threatening to make [src] disappear!")) if(id) var/confirm = tgui_alert(user, "The PDA you're holding contains a vulnerable ID card. Will you risk it?", "Confirmation", list("Definitely", "Cancel")) if(confirm != "Definitely") return FALSE if(!do_after(user, 100, src)) return FALSE - visible_message(span_warning("[user] successfully makes [src] disappear!")) + user.visible_message(span_warning("[user] successfully makes [src] disappear!")) return TRUE /obj/item/pda/after_trash_eaten(var/mob/living/user) to_chat(user, span_notice("You can taste the sweet flavor of delicious technology.")) +// ID + +/obj/item/card/id/on_trash_eaten(var/mob/living/user) + if(!..()) + return FALSE + if(registered_name) + var/watching = FALSE + for(var/mob/living/carbon/human/H in view(user)) + if(H.real_name == registered_name && H.client) + watching = TRUE + break + if(!watching) + return FALSE + else + user.visible_message(span_warning("[user] is threatening to make [src] disappear!")) + if(!do_after(user, 100, src)) + return FALSE + user.visible_message(span_warning("[user] successfully makes [src] disappear!")) + return TRUE + +/obj/item/card/id/after_trash_eaten(var/mob/living/user) + to_chat(user, span_notice("You can taste the delicious flavour of a person's whole identity.")) + // Shoes /obj/item/clothing/shoes/on_trash_eaten(var/mob/living/user) if(!..())