From 3fa9c8ebaa7a2be0c9014ecd6f1ba12f19402e60 Mon Sep 17 00:00:00 2001 From: Lucy Date: Thu, 19 Mar 2026 11:06:57 -0400 Subject: [PATCH] Adds screentips for scanning raptors (#95421) ## About The Pull Request This adds screentips for scanning raptors - both with the PDA RaptorDex app, and the standalone handheld version. Also fixed a bug where the "scanned" balloon alert didn't properly appear for the, bc it'd try to display the balloon alert to the raptor... 2026-03-15 (1773602977) 2026-03-15 (1773603014) ## Why It's Good For The Game I initially didn't realize that you had to _right click_ to scan raptors with the PDA app, so like, I decided to add screentips to make that clearer. also bugfix good. ## Changelog :cl: qol: Added screentips for scanning raptors with the RaptorDex PDA app and standalone handheld RaptorDex. fix: Fixed the handheld RaptorDex not showing the "scanned" balloon alert when scanning a raptor. /:cl: --- .../basic/lavaland/raptor/raptor_dex.dm | 12 +++++++++++- .../file_system/programs/raptordex.dm | 19 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/basic/lavaland/raptor/raptor_dex.dm b/code/modules/mob/living/basic/lavaland/raptor/raptor_dex.dm index 93191bd7838..60a3d83141b 100644 --- a/code/modules/mob/living/basic/lavaland/raptor/raptor_dex.dm +++ b/code/modules/mob/living/basic/lavaland/raptor/raptor_dex.dm @@ -7,6 +7,10 @@ /// Raptor scan data we have stored var/list/scan_data = list("raptor_scan" = FALSE) +/obj/item/raptor_dex/Initialize(mapload) + . = ..() + register_item_context() + /obj/item/raptor_dex/ui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) if(!ui) @@ -61,6 +65,12 @@ scan_data["inherited_traits"] += GLOB.raptor_inherit_traits[index] playsound(src, 'sound/mobs/non-humanoids/orbie/orbie_send_out.ogg', 20) - balloon_alert(my_raptor, "scanned") + my_raptor.balloon_alert(user, "scanned") ui_interact(user) return ITEM_INTERACT_SUCCESS + +/obj/item/raptor_dex/add_item_context(obj/item/source, list/context, atom/target, mob/living/user) + if(!istype(target, /mob/living/basic/raptor)) + return NONE + context[SCREENTIP_CONTEXT_LMB] = "Scan Raptor" + return CONTEXTUAL_SCREENTIP_SET diff --git a/code/modules/modular_computers/file_system/programs/raptordex.dm b/code/modules/modular_computers/file_system/programs/raptordex.dm index 36c5d722a59..e040d037398 100644 --- a/code/modules/modular_computers/file_system/programs/raptordex.dm +++ b/code/modules/modular_computers/file_system/programs/raptordex.dm @@ -61,3 +61,22 @@ /datum/computer_file/program/raptordex/ui_data(mob/user) return scan_data + +/datum/computer_file/program/raptordex/on_made_active_program(mob/user) + RegisterSignal(computer, COMSIG_ITEM_REQUESTING_CONTEXT_FOR_TARGET, PROC_REF(add_item_context)) + computer.item_flags |= ITEM_HAS_CONTEXTUAL_SCREENTIPS + +/datum/computer_file/program/raptordex/background_program(mob/user) + . = ..() + UnregisterSignal(computer, COMSIG_ITEM_REQUESTING_CONTEXT_FOR_TARGET) + +/datum/computer_file/program/raptordex/kill_program(mob/user) + . = ..() + UnregisterSignal(computer, COMSIG_ITEM_REQUESTING_CONTEXT_FOR_TARGET) + +/datum/computer_file/program/raptordex/proc/add_item_context(obj/item/source, list/context, atom/target, mob/living/user) + SIGNAL_HANDLER + if(!istype(target, /mob/living/basic/raptor)) + return NONE + context[SCREENTIP_CONTEXT_RMB] = "Scan Raptor" + return CONTEXTUAL_SCREENTIP_SET