Files
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

99 lines
3.5 KiB
Plaintext

/obj/item/implant/chem
name = "chem implant"
desc = "Injects things."
icon_state = "reagents"
actions_types = null
implant_flags = IMPLANT_TYPE_SECURITY
hud_icon_state = "hud_imp_chem"
/// All possible injection sizes for the implant shown in the prisoner management console.
var/list/implant_sizes = list(1, 5, 10)
implant_info = "Requires filling via syringe while in an implant case. Automatically activates upon implantation. \
Allows for remote release of reagents directly into implantee's bloodstream."
implant_lore = "The Robust Corp MJ-420 Remote Chemical Release Implant is a remotely-controlled \
microcapsule network designed to be filled via syringe while still within an implant case. After implantation, \
the MJ-420 can be accessed via prisoner management console to release controlled amounts of reagents directly \
into the implantee's bloodstream, which is useful for controlled release of sedatives, antipsychotics, or, for \
particularly dangerous prisoners, lethal injections. Upon implantee's death, breaks down and releases all reagents \
into their bloodstream."
/obj/item/implant/chem/is_shown_on_console(obj/machinery/computer/prisoner/management/console)
return is_valid_z_level(get_turf(console), get_turf(imp_in))
/obj/item/implant/chem/get_management_console_data()
var/list/info_shown = ..()
info_shown["Volume"] = "[reagents.total_volume]u"
return info_shown
/obj/item/implant/chem/get_management_console_buttons()
var/list/buttons = ..()
for(var/i in implant_sizes)
UNTYPED_LIST_ADD(buttons, list(
"name" = "Inject [i]u",
"color" = "good",
"action_key" = "inject",
"action_params" = list("amount" = i),
))
return buttons
/obj/item/implant/chem/handle_management_console_action(mob/user, list/params, obj/machinery/computer/prisoner/management/console)
. = ..()
if(.)
return
if(params["implant_action"] == "inject")
var/amount = text2num(params["amount"])
if(!(amount in implant_sizes))
return TRUE
var/reagents_inside = reagents.get_reagent_log_string()
activate(amount)
log_combat(user, imp_in, "injected [amount] units of [reagents_inside]", src)
return TRUE
/obj/item/implant/chem/Initialize(mapload)
. = ..()
create_reagents(50, OPENCONTAINER)
/obj/item/implant/chem/implant(mob/living/target, mob/user, silent = FALSE, force = FALSE)
. = ..()
if(.)
RegisterSignal(target, COMSIG_LIVING_DEATH, PROC_REF(on_death))
/obj/item/implant/chem/removed(mob/target, silent = FALSE, special = FALSE)
. = ..()
if(.)
UnregisterSignal(target, COMSIG_LIVING_DEATH)
/obj/item/implant/chem/proc/on_death(mob/living/source)
SIGNAL_HANDLER
INVOKE_ASYNC(src, TYPE_PROC_REF(/obj/item/implant/chem, activate), reagents.total_volume)
/obj/item/implant/chem/activate(cause)
. = ..()
if(!cause || !imp_in)
return
var/mob/living/carbon/R = imp_in
var/injectamount = null
if (cause == "action_button")
injectamount = reagents.total_volume
else
injectamount = cause
reagents.trans_to(R, injectamount)
to_chat(R, span_hear("You hear a faint beep."))
if(!reagents.total_volume)
to_chat(R, span_hear("You hear a faint click from your chest."))
qdel(src)
/obj/item/implantcase/chem
name = "implant case - 'Remote Chemical'"
desc = "A glass case containing a remote chemical implant."
imp_type = /obj/item/implant/chem
/obj/item/implantcase/chem/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
if(!istype(tool, /obj/item/reagent_containers/syringe) && imp)
return NONE
return tool.interact_with_atom(imp, user, modifiers)