From a6810de987b577bf91c448ff21884550fed0aaa8 Mon Sep 17 00:00:00 2001 From: Aylong <69762909+AyIong@users.noreply.github.com> Date: Sun, 26 Jan 2025 15:30:57 +0200 Subject: [PATCH] Fix supply pod beacon renaming (#89197) Co-authored-by: Gaxeer <44334376+Gaxeer@users.noreply.github.com> --- code/modules/cargo/supplypod_beacon.dm | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/code/modules/cargo/supplypod_beacon.dm b/code/modules/cargo/supplypod_beacon.dm index 976298bbc0b..d8b5aafdb28 100644 --- a/code/modules/cargo/supplypod_beacon.dm +++ b/code/modules/cargo/supplypod_beacon.dm @@ -104,12 +104,16 @@ unlink_console() return CLICK_ACTION_SUCCESS -/obj/item/supplypod_beacon/attackby(obj/item/W, mob/user) - if(IS_WRITING_UTENSIL(W)) //give a tag that is visible from the linked express console - return ..() +/obj/item/supplypod_beacon/item_interaction(mob/living/user, obj/item/tool, list/modifiers) + if(!IS_WRITING_UTENSIL(tool)) + return NONE + var/new_beacon_name = tgui_input_text(user, "What would you like the tag to be?", "Beacon Tag", max_length = MAX_NAME_LEN) if(isnull(new_beacon_name)) - return - if(!user.can_perform_action(src)) - return - name += " ([tag])" + return ITEM_INTERACT_BLOCKING + + if(!user.can_perform_action(src) || !user.can_write(tool)) + return ITEM_INTERACT_BLOCKING + + name = "[initial(name)] ([new_beacon_name])" + return ITEM_INTERACT_SUCCESS