Files
Hatterhat 15baf7873a Offsite Deathrattle Implants and Repathed Kheiral Cuffs (#94209)
## About The Pull Request

Updates subdermal implants so that they have `implant_info` and
`implant_lore` variables instead of one unchanging `get_info()`. Also
rewrites/updates/tweaks/etc. lore for every implant that had get_info()
blocks.

Makes beacon implants (the ones you teleport onto) turn off (hide
themselves on prisoner management consoles) after ten minutes, matching
the tracking implant's functionality.

Deathrattle implants are now `allow_multiple = TRUE`, so you can have
multiple deathrattles implanted.

Reworked the implant pad's UI to have collapsible sections for implant
info, implant lore, and also have buttons for configuring deathrattle
implants.

Adds a box of expeditionary deathrattle implants to the mining vendor.
For 900 points (585 points if delivered), you receive a box containing 5
expeditionary deathrattle implants, which **ONLY ALERT TO DEATHS IN
MINING WASTELAND AREAS (e.g. not ruins, not space, not station) (this is
important)**, an implanter, and an implant pad.

The intended workflow is that you initialize one deathrattle implant,
use that network for all the other deathrattles, and implant yourself,
your mining buddies, your QM, and a paramedic, maybe. However since they
start unset you could theoretically make one really big deathrattle
network. Good luck getting people to volunteer for implanting, though,
and as above, it only really works if you die outside of the station.

Also, repaths kheiral cuffs to be accessories, so you can attach them to
uniforms. They're still functional as suit sensor extenders and GPSes
(when off-station).

<details><summary>Screenshots</summary>

<img width="469" height="91" alt="image"
src="https://github.com/user-attachments/assets/2c88b151-e5ab-415a-8c41-0f166f439315"
/><br>
<img width="300" height="350" alt="image"
src="https://github.com/user-attachments/assets/0764983a-1160-48ab-aa6a-d1aaf08a682e"
/><br>
<img width="300" height="350" alt="image"
src="https://github.com/user-attachments/assets/98e84368-300b-453a-89a4-d922c80628e8"
/>

</details>

## Why It's Good For The Game

Deathrattle implants are cool. Being able to know that your coworker
exploded, after a non-negligible amount of setup and wrangling your
fellow spaceman to let you implant them, is probably a good thing.
Introduces a cooperative avenue of "Wait, my coworker just died" instead
of "Hey, they haven't yelled something on comms, did they roll antag?
(No. They died.)"

Kheiral cuffs being uniform attachments is because having to sacrifice
glove slot for them annoyed me a lot.

## Changelog

🆑
add: Nanotrasen has begun rolling out (unconfigured) expeditionary
deathrattle implant kits for their mining teams for 900 points (585
points, if manually delivered). These only alert for deaths on raw
mining wasteland, and will not work in space, ruins, or on-station.
balance: Kheiral cuffs can now be attached to uniforms as accessories.
They retain their suit sensor extension/GPS functionality (still only
when off station Z-levels, though).
fix: Beacon implants now turn off (hide themselves on prisoner
management consoles) after ten minutes, matching the tracking implant's
functionality.
qol: Made the implant pad UI a little nicer to look at, with dropdowns
and demarcated sections.
code: Implants now have separated "immediately useful" information and
"extended lore tidbits" information as variables instead of one
unchangeable get_info() block.
/🆑

---------

Co-authored-by: Hatterhat <Hatterhat@users.noreply.github.com>
2026-01-04 16:55:09 +00:00

97 lines
3.9 KiB
Plaintext

/obj/item/implant/tracking
name = "tracking implant"
desc = "Track with this."
actions_types = null
implant_flags = IMPLANT_TYPE_SECURITY
hud_icon_state = "hud_imp_tracking"
///How long will the implant continue to function after death?
var/lifespan_postmortem = 10 MINUTES
implant_info = "Automatically activates upon implantation. Acts as a dedicated, tracking-only beacon \
and direct-to-brain prisoner messaging system. \
Deactivates ten minutes after host's death, but remains within the body."
implant_lore = "The Robust Corp EYE-5 Convict Parole Monitoring Implant is a subdermal tracking beacon \
designed for interfacing with prisoner management equipment, serving as both a beacon that can \
be tracked via locator equipment, and a provider of one-way communication from prisoner management staff \
to implanted subjects, relaying messages directly to subjects' brains. \
Automatically deactivates ten minutes after the host's death."
/obj/item/implant/tracking/is_shown_on_console(obj/machinery/computer/prisoner/management/console)
if(imp_in.stat == DEAD && imp_in.timeofdeath + lifespan_postmortem < world.time)
return FALSE
if(!is_valid_z_level(get_turf(console), get_turf(imp_in)))
return FALSE
return TRUE
/obj/item/implant/tracking/get_management_console_data()
var/list/info_shown = ..()
info_shown["Location"] = get_area_name(imp_in, format_text = TRUE) || "Unknown"
return info_shown
/obj/item/implant/tracking/get_management_console_buttons()
var/list/buttons = ..()
UNTYPED_LIST_ADD(buttons, list(
"name" = "Warn",
"color" = "average",
"tooltip" = "Sends a message directly to the target's brain.",
"action_key" = "warn",
))
return buttons
/obj/item/implant/tracking/handle_management_console_action(mob/user, list/params, obj/machinery/computer/prisoner/management/console)
. = ..()
if(.)
return
if(params["implant_action"] == "warn")
var/warning = tgui_input_text(user, "What warning do you want to send to [imp_in.name]?", "Messaging", max_length = MAX_MESSAGE_LEN)
if(!warning || QDELETED(src) || QDELETED(user) || QDELETED(console) || isnull(imp_in))
return TRUE
if(!console.is_operational || !user.can_perform_action(console, NEED_DEXTERITY|ALLOW_SILICON_REACH))
return TRUE
to_chat(imp_in, span_hear("You hear a voice in your head saying: '[warning]'"))
log_directed_talk(user, imp_in, warning, LOG_SAY, "implant message")
return TRUE
/obj/item/implant/tracking/c38
name = "TRAC implant"
desc = "A smaller tracking implant that supplies power for only a few minutes."
implant_flags = NONE
///How long before this implant self-deletes?
var/lifespan = 5 MINUTES
///The id of the timer that's qdeleting us
var/timerid
implant_info = "Automatically activates upon implantation, typically via firearm. \
Acts as a dedicated, tracking-only beacon and direct-to-brain prisoner messaging system. \
Dissolves into absorbable elements after 5 minutes."
implant_lore = "The Robust Corp EYE-5/TRAC Fugitive Monitoring Implant is a subdermal tracking beacon \
designed to be delivered via high-velocity projectile. \
Much like the original EYE-5 Convict Parole Monitoring Implant, \
interfaces with prisoner management equipment, serving as both a beacon that can \
be tracked via locator equipment, and a provider of one-way communication from prisoner management staff \
to implanted targets, relaying messages directly to targets' brains. \
Dissolves into bio-safe elements after five minutes."
/obj/item/implant/tracking/c38/implant(mob/living/target, mob/user, silent, force)
. = ..()
timerid = QDEL_IN_STOPPABLE(src, lifespan)
/obj/item/implant/tracking/c38/removed(mob/living/source, silent, special)
. = ..()
deltimer(timerid)
timerid = null
/obj/item/implant/tracking/c38/Destroy()
return ..()
/obj/item/implanter/tracking
imp_type = /obj/item/implant/tracking
/obj/item/implanter/tracking/gps
imp_type = /obj/item/gps/mining/internal