Files
Bubberstation/code/game/objects/items/implants/security/implant_noteleport.dm
T
John WillardandGitHub fa9a2a701a Implant pad TGUI (#80978)
## About The Pull Request

I was messing a little bit with TGUI stuff and ended up turning the
implant pad TGUI, so why not.
On top of the new UI, I replaced the messages to chat with nice and
consistent balloon alerts which will hopefully make it not seem like an
ancient piece of shit.

Video demonstration


https://github.com/tgstation/tgstation/assets/53777086/a1ebe0d4-005b-4e29-a623-2c1b352cd017

I also removed ``INTERACT_MACHINE_SET_MACHINE`` from the prisoner
console, because it was accidentally left in when the console was moved
to TGUI

## Why It's Good For The Game

I'm still going down the list of things that need to be TGUI, and I
ended up doing this cause I just felt like it while messing with some
other stuff.
Rest of the list is visible here:
https://hackmd.io/@sClqlHM0T4yZfn-qa5KnAg/S152Tl2hh

## Changelog

🆑
refactor: Implant pads now use TGUI
/🆑
2024-01-17 04:37:03 -05:00

45 lines
2.0 KiB
Plaintext

///Blocks the implantee from being teleported
/obj/item/implant/teleport_blocker
name = "bluespace grounding implant"
desc = "Grounds your bluespace signature in baseline reality, whatever the hell that means."
actions_types = null
implant_flags = IMPLANT_TYPE_SECURITY
hud_icon_state = "hud_imp_noteleport"
/obj/item/implant/teleport_blocker/get_data()
return "<b>Implant Specifications:</b><BR> \
<b>Name:</b> Robust Corp EXP-001 'Bluespace Grounder'<BR> \
<b>Implant Details:</b> Upon implantation, grounds the user's bluespace signature to their currently occupied plane of existence. \
Most, if not all forms of teleportation on the implantee will be rendered ineffective. Useful for keeping especially slippery prisoners in place.<BR>"
/obj/item/implant/teleport_blocker/implant(mob/living/target, mob/user, silent = FALSE, force = FALSE)
. = ..()
if(!. || !isliving(target))
return FALSE
RegisterSignal(target, COMSIG_MOVABLE_TELEPORTING, PROC_REF(on_teleport))
return TRUE
/obj/item/implant/teleport_blocker/removed(mob/target, silent = FALSE, special = FALSE)
. = ..()
if(!. || !isliving(target))
return FALSE
UnregisterSignal(target, COMSIG_MOVABLE_TELEPORTING)
return TRUE
/// Signal for COMSIG_MOVABLE_TELEPORTED that blocks teleports and stuns the would-be-teleportee.
/obj/item/implant/teleport_blocker/proc/on_teleport(mob/living/teleportee, atom/destination, channel)
SIGNAL_HANDLER
to_chat(teleportee, span_holoparasite("You feel yourself teleporting, but are suddenly flung back to where you just were!"))
teleportee.apply_status_effect(/datum/status_effect/incapacitating/paralyzed, 5 SECONDS)
var/datum/effect_system/spark_spread/quantum/spark_system = new()
spark_system.set_up(5, TRUE, teleportee)
spark_system.start()
return COMPONENT_BLOCK_TELEPORT
/obj/item/implantcase/teleport_blocker
name = "implant case - 'Bluespace Grounding'"
desc = "A glass case containing a bluespace grounding implant."
imp_type = /obj/item/implant/teleport_blocker