mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 23:58:07 +01:00
## 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>
128 lines
4.7 KiB
Plaintext
128 lines
4.7 KiB
Plaintext
/**********************Kheiral Cuffs**********************/
|
|
/// Acts as a GPS beacon & connects to station crew monitors from lavaland
|
|
/obj/item/clothing/accessory/kheiral_cuffs
|
|
name = "\improper Kheiral cuffs"
|
|
desc = "A prototype wrist communicator powered by Kheiral Matter. When both ends are clamped to one wrist, acts as a signal range booster for your suit sensors.\n\
|
|
A small engraving on the inside reads, \"NOT HANDCUFFS\"."
|
|
icon = 'icons/obj/mining.dmi'
|
|
icon_state = "strand"
|
|
worn_icon = 'icons/mob/clothing/hands.dmi'
|
|
worn_icon_state = "strandcuff"
|
|
slot_flags = ITEM_SLOT_GLOVES
|
|
throwforce = 0
|
|
w_class = WEIGHT_CLASS_SMALL
|
|
gender = PLURAL
|
|
throw_speed = 3
|
|
throw_range = 5
|
|
attack_verb_continuous = list("connects")
|
|
attack_verb_simple = list("connect")
|
|
resistance_flags = FIRE_PROOF
|
|
attachment_slot = NONE // fits as accessory as long as there's an undersuit
|
|
icon_state_is_worn = FALSE
|
|
/// If we're in the glove slot
|
|
var/on_wrist = FALSE
|
|
/// If the GPS is already on
|
|
var/gps_enabled = FALSE
|
|
/// If we're off the station's Z-level
|
|
var/far_from_home = FALSE
|
|
|
|
/obj/item/clothing/accessory/kheiral_cuffs/Initialize(mapload)
|
|
. = ..()
|
|
update_icon(UPDATE_OVERLAYS)
|
|
RegisterSignal(src, COMSIG_MOVABLE_Z_CHANGED, PROC_REF(check_z))
|
|
|
|
check_z(new_turf = loc)
|
|
|
|
/obj/item/clothing/accessory/kheiral_cuffs/examine(mob/user)
|
|
. = ..()
|
|
if(gps_enabled)
|
|
. += span_notice("The cuff's GPS signal is on.")
|
|
|
|
/obj/item/clothing/accessory/kheiral_cuffs/equipped(mob/user, slot, initial)
|
|
. = ..()
|
|
if(!(slot & ITEM_SLOT_GLOVES) && !(slot & ITEM_SLOT_ICLOTHING))
|
|
return
|
|
on_wrist = TRUE
|
|
playsound(loc, 'sound/items/weapons/handcuffs.ogg', 30, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
|
|
connect_kheiral_network(user)
|
|
|
|
/obj/item/clothing/accessory/kheiral_cuffs/dropped(mob/user, silent)
|
|
. = ..()
|
|
if(on_wrist)
|
|
playsound(loc, 'sound/items/weapons/handcuffs.ogg', 30, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
|
|
on_wrist = FALSE
|
|
remove_kheiral_network(user)
|
|
|
|
/// Enables the GPS and adds the multiz trait
|
|
/obj/item/clothing/accessory/kheiral_cuffs/proc/connect_kheiral_network(mob/living/user)
|
|
if(gps_enabled)
|
|
return
|
|
if(!on_wrist || !far_from_home)
|
|
return
|
|
var/gps_name = "Unknown"
|
|
var/obj/item/card/id/id_card = user.get_idcard(hand_first = FALSE)
|
|
if(id_card)
|
|
gps_name = id_card.registered_name
|
|
AddComponent(/datum/component/gps/kheiral_cuffs, "*[gps_name]'s Kheiral Link")
|
|
balloon_alert(user, "gps activated")
|
|
ADD_TRAIT(user, TRAIT_MULTIZ_SUIT_SENSORS, REF(src))
|
|
gps_enabled = TRUE
|
|
|
|
/// Disables the GPS and removes the multiz trait
|
|
/obj/item/clothing/accessory/kheiral_cuffs/proc/remove_kheiral_network(mob/user)
|
|
if(!gps_enabled)
|
|
return
|
|
if(on_wrist && far_from_home)
|
|
return
|
|
balloon_alert(user, "gps de-activated") // GPS component deletes itself when we get on-Z
|
|
REMOVE_TRAIT(user, TRAIT_MULTIZ_SUIT_SENSORS, REF(src))
|
|
gps_enabled = FALSE
|
|
|
|
/// If we're off the Z-level, set far_from_home = TRUE. If being worn, trigger kheiral_network proc
|
|
/obj/item/clothing/accessory/kheiral_cuffs/proc/check_z(datum/source, turf/old_turf, turf/new_turf)
|
|
SIGNAL_HANDLER
|
|
|
|
if(!isturf(new_turf))
|
|
return
|
|
|
|
if(is_station_level(new_turf.z))
|
|
far_from_home = FALSE
|
|
// for the "worn on glove slot" case
|
|
if(isliving(loc))
|
|
remove_kheiral_network(loc)
|
|
else if(isliving(loc.loc)) // for the "worn as accessory" case
|
|
remove_kheiral_network(loc.loc)
|
|
else
|
|
far_from_home = TRUE
|
|
// for the "worn on glove slot" case
|
|
if(isliving(loc))
|
|
connect_kheiral_network(loc)
|
|
else if(isliving(loc.loc)) // for the "worn as accessory" case
|
|
connect_kheiral_network(loc.loc)
|
|
|
|
/obj/item/clothing/accessory/kheiral_cuffs/worn_overlays(mutable_appearance/standing, isinhands, icon_file)
|
|
. = ..()
|
|
if(!isinhands)
|
|
. += emissive_appearance(icon_file, "strandcuff_emissive", src, alpha = src.alpha)
|
|
|
|
/obj/item/clothing/accessory/kheiral_cuffs/update_overlays()
|
|
. = ..()
|
|
. += emissive_appearance(icon, "strand_light", src, alpha = src.alpha)
|
|
|
|
/obj/item/clothing/accessory/kheiral_cuffs/suicide_act(mob/living/carbon/user)
|
|
if(!ishuman(user))
|
|
return
|
|
|
|
var/mob/living/carbon/human/victim = user
|
|
victim.visible_message(span_suicide("[user] locks [src] around their neck, wrinkles forming across their face. It looks like [user.p_theyre()] trying to commit suicide!"))
|
|
for(var/mult in 1 to 5) // Rapidly age
|
|
if(!do_after(victim, 0.5 SECONDS)) // just to space out the aging, either way you still dust.
|
|
break
|
|
var/before_age = victim.age
|
|
victim.age = round((victim.age * 1.5),1)
|
|
to_chat(victim, span_danger("You age [(victim.age - before_age)] years!"))
|
|
|
|
to_chat(victim, span_danger("At the ripe age of [victim.age], your cells fail their cycle of mitosis, allowing the sands of time to wash over you."))
|
|
victim.dust(TRUE, TRUE, TRUE)
|
|
return MANUAL_SUICIDE
|