mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-31 20:11:56 +00:00
## About The Pull Request HackMD: https://hackmd.io/RE9uRwSYSjCch17-OQ4pjQ?view Feedback link: https://tgstation13.org/phpBB/viewtopic.php?f=10&t=33972 Adds a Coroner job to the game, they work in the Medical department and have their office in the Morgue. I was inspired to make this after I had played my first round on Paradise and messed around in there. The analyzer is copied from there (https://github.com/ParadiseSS13/Paradise/pull/20957), and their jumpsuit is also mostly stolen from it (i just copied the color scheme onto our own suits). Coroners can perform autopsies on people to see their stats, like this  They have access to Medbay, and on lowpop will get Pharmacy (to make their own formaldehyde). They also have their own Secure Morgue access for their office (doubles as a surgery room because they are edgelords or whatever) and the secure morgue trays. Secure Morgue trays spawn with their beepers off and is only accessible by them, the CMO, and HoS. It's used to morgue Antagonists. Security's own morgue trays have been removed. The job in action https://cdn.discordapp.com/attachments/950489581151735849/1102297675669442570/2023-04-30_14-16-06.mp4 ### Surgery changes Autopsies are a Surgery, and I tried to intertwine this with the Dissection surgery. Dissections and Autopsies both require the Autopsy scanner to perform them, however you can only perform one on any given body. Dissections are for experiments, Autopsies is for the paper of information. Dissected bodies now also give a ~20% surgery speed boost, this was added at the request of Fikou as a way to encourage Doctors to let the Coroner do their job before reviving a body. I also remember the Medical skill, which allowed Doctors to do surgery faster on people, and I hope that this can do something like that WITHOUT adding the potential for exploiting, which led to the skill's downfall. ### Morgue Improvements Morgue trays are no longer named with pens, they instead will steal the name of the last bodybag to be put in them. Morgue trays are also removed from Brig Medical areas and Robotics, now they have to bring their corpses to the Morgue where the Coroner can keep track and ensure records are properly updated. ### Sprite credits I can't fit it all in the Changelog, so this is who made what McRamon - Autopsy scanner Tattax - Table clock sprites and in-hands CoiledLamb - Coroner jumpsuits & labcoats (inhand, on sprite, and their respective alternatives) - Coroner gloves - CoronerDrobe (the vending machine) ## Why It's Good For The Game This is mostly explained in the hackmd, but the goal of this is: 1. Increase the use of the Medical Records console. 2. Add a new and interesting way for Detectives to uncover mysteries. 3. Add a more RP-flavored role in Medical that still has mechanics tied behind it. ## Changelog 🆑 JohnFulpWillard, sprites by McRamon, tattax, and Lamb add: The Coroner, a new Medical role revolving around dead corpses and autopsies. add: The Coroner's Autopsy Scanner, used for discovering the cause for someone's death, listing their wounds, the causes of them, their reagents, and diseases (including stealth ones!) qol: Morgue Trays are now named after the bodybags inside of them. balance: The morgue now has 'Secure' morgue trays which by default don't beep. balance: Security Medical area and Robotics no longer have their own morgue trays. balance: Dissected bodies now have faster surgery speed. Autopsies also count as dissections, however they're mutually exclusive. /🆑 --------- Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
127 lines
3.7 KiB
Plaintext
127 lines
3.7 KiB
Plaintext
/**
|
|
* Caltrop element; for hurting people when they walk over this.
|
|
*
|
|
* Used for broken glass, cactuses and four sided dice.
|
|
*/
|
|
/datum/component/caltrop
|
|
///Minimum damage done when crossed
|
|
var/min_damage
|
|
|
|
///Maximum damage done when crossed
|
|
var/max_damage
|
|
|
|
///Probability of actually "firing", stunning and doing damage
|
|
var/probability
|
|
|
|
///Amount of time the spike will paralyze
|
|
var/paralyze_duration
|
|
|
|
///Miscelanous caltrop flags; shoe bypassing, walking interaction, silence
|
|
var/flags
|
|
|
|
///The sound that plays when a caltrop is triggered.
|
|
var/soundfile
|
|
|
|
///given to connect_loc to listen for something moving over target
|
|
var/static/list/crossed_connections = list(
|
|
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
|
|
)
|
|
|
|
///So we can update ant damage
|
|
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
|
|
|
|
/datum/component/caltrop/Initialize(min_damage = 0, max_damage = 0, probability = 100, paralyze_duration = 6 SECONDS, flags = NONE, soundfile = null)
|
|
. = ..()
|
|
if(!isatom(parent))
|
|
return COMPONENT_INCOMPATIBLE
|
|
|
|
src.min_damage = min_damage
|
|
src.max_damage = max(min_damage, max_damage)
|
|
src.probability = probability
|
|
src.paralyze_duration = paralyze_duration
|
|
src.flags = flags
|
|
src.soundfile = soundfile
|
|
|
|
if(ismovable(parent))
|
|
AddComponent(/datum/component/connect_loc_behalf, parent, crossed_connections)
|
|
else
|
|
RegisterSignal(get_turf(parent), COMSIG_ATOM_ENTERED, PROC_REF(on_entered))
|
|
|
|
// Inherit the new values passed to the component
|
|
/datum/component/caltrop/InheritComponent(datum/component/caltrop/new_comp, original, min_damage, max_damage, probability, flags, soundfile)
|
|
if(!original)
|
|
return
|
|
if(min_damage)
|
|
src.min_damage = min_damage
|
|
if(max_damage)
|
|
src.max_damage = max_damage
|
|
if(probability)
|
|
src.probability = probability
|
|
if(flags)
|
|
src.flags = flags
|
|
if(soundfile)
|
|
src.soundfile = soundfile
|
|
|
|
/datum/component/caltrop/proc/on_entered(datum/source, atom/movable/arrived, atom/old_loc, list/atom/old_locs)
|
|
SIGNAL_HANDLER
|
|
|
|
if(!prob(probability))
|
|
return
|
|
|
|
if(!ishuman(arrived))
|
|
return
|
|
|
|
var/mob/living/carbon/human/H = arrived
|
|
if(HAS_TRAIT(H, TRAIT_PIERCEIMMUNE))
|
|
return
|
|
|
|
if((flags & CALTROP_IGNORE_WALKERS) && H.m_intent == MOVE_INTENT_WALK)
|
|
return
|
|
|
|
if(H.movement_type & (FLOATING|FLYING)) //check if they are able to pass over us
|
|
//gravity checking only our parent would prevent us from triggering they're using magboots / other gravity assisting items that would cause them to still touch us.
|
|
return
|
|
|
|
if(H.buckled) //if they're buckled to something, that something should be checked instead.
|
|
return
|
|
|
|
if(H.body_position == LYING_DOWN && !(flags & CALTROP_NOCRAWL)) //if we're not standing we cant step on the caltrop
|
|
return
|
|
|
|
var/picked_def_zone = pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
|
|
var/obj/item/bodypart/O = H.get_bodypart(picked_def_zone)
|
|
if(!istype(O))
|
|
return
|
|
|
|
if(!IS_ORGANIC_LIMB(O))
|
|
return
|
|
|
|
if (!(flags & CALTROP_BYPASS_SHOES))
|
|
if ((H.wear_suit?.body_parts_covered | H.w_uniform?.body_parts_covered | H.shoes?.body_parts_covered) & FEET)
|
|
return
|
|
|
|
var/damage = rand(min_damage, max_damage)
|
|
if(HAS_TRAIT(H, TRAIT_LIGHT_STEP))
|
|
damage *= 0.75
|
|
|
|
|
|
if(!(flags & CALTROP_SILENT) && !H.has_status_effect(/datum/status_effect/caltropped))
|
|
H.apply_status_effect(/datum/status_effect/caltropped)
|
|
H.visible_message(
|
|
span_danger("[H] steps on [parent]."),
|
|
span_userdanger("You step on [parent]!")
|
|
)
|
|
|
|
H.apply_damage(damage, BRUTE, picked_def_zone, wound_bonus = CANT_WOUND, attacking_item = parent)
|
|
|
|
if(!(flags & CALTROP_NOSTUN)) // Won't set off the paralysis.
|
|
H.Paralyze(paralyze_duration)
|
|
|
|
if(!soundfile)
|
|
return
|
|
playsound(H, soundfile, 15, TRUE, -3)
|
|
|
|
/datum/component/caltrop/UnregisterFromParent()
|
|
if(ismovable(parent))
|
|
qdel(GetComponent(/datum/component/connect_loc_behalf))
|