From 8b9ecf10e5de5edf84e1c49699530567b9d94934 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Fri, 30 Jul 2021 00:43:47 +0200 Subject: [PATCH] [MIRROR] Give ghosts the ability to examine BCIs (#7233) * Give ghosts the ability to examine BCIs (#60500) Examining a mob with a BCI inside them will now give you the ability to look at it. Helpful for admins, but also keeps in line with every other circuit shell. * Give ghosts the ability to examine BCIs Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> --- .../wiremod/shell/brain_computer_interface.dm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/code/modules/wiremod/shell/brain_computer_interface.dm b/code/modules/wiremod/shell/brain_computer_interface.dm index 1afe5abe1f3..ece60342f90 100644 --- a/code/modules/wiremod/shell/brain_computer_interface.dm +++ b/code/modules/wiremod/shell/brain_computer_interface.dm @@ -224,6 +224,7 @@ user_port.set_output(owner) user = WEAKREF(owner) + RegisterSignal(owner, COMSIG_PARENT_EXAMINE, .proc/on_examine) RegisterSignal(owner, COMSIG_PROCESS_BORGCHARGER_OCCUPANT, .proc/on_borg_charge) RegisterSignal(owner, COMSIG_LIVING_ELECTROCUTE_ACT, .proc/on_electrocute) @@ -234,6 +235,7 @@ user = null UnregisterSignal(owner, list( + COMSIG_PARENT_EXAMINE, COMSIG_PROCESS_BORGCHARGER_OCCUPANT, COMSIG_LIVING_ELECTROCUTE_ACT, )) @@ -258,6 +260,21 @@ parent.cell.give(shock_damage * 2) to_chat(source, span_notice("You absorb some of the shock into your [parent.name]!")) +/obj/item/circuit_component/bci_core/proc/on_examine(datum/source, mob/mob, list/examine_text) + SIGNAL_HANDLER + + if (isobserver(mob)) + examine_text += span_notice("[source.p_they(capitalized = TRUE)] [source.p_have()] \a [parent] implanted in [source.p_them()].") + +/obj/item/circuit_component/bci_core/Topic(href, list/href_list) + ..() + + if (!isobserver(usr)) + return + + if (href_list["open_bci"]) + parent.attack_ghost(usr) + /datum/action/innate/bci_charge_action name = "Check BCI Charge" check_flags = NONE