mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-02-08 23:39:32 +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>
91 lines
4.1 KiB
Plaintext
91 lines
4.1 KiB
Plaintext
/**
|
|
* Kneecapping element replaces the item's secondary attack with an aimed attack at the kneecaps under certain circumstances.
|
|
*
|
|
* Element is incompatible with non-items. Requires the parent item to have a force equal to or greater than WOUND_MINIMUM_DAMAGE.
|
|
* Also requires that the parent can actually get past pre_secondary_attack without the attack chain cancelling.
|
|
*
|
|
* Kneecapping attacks have a wounding bonus between severe and critical+10 wound thresholds. Without some serious wound protecting
|
|
* armour this all but guarantees a wound of some sort. The attack is directed specifically at a limb and the limb takes the damage.
|
|
*
|
|
* Requires the attacker to be aiming for either leg zone, which will be targetted specifically. They will than have a 3-second long
|
|
* do_after before executing the attack.
|
|
*
|
|
* Kneecapping requires the target to either be on the floor, immobilised or buckled to something. And also to have an appropriate leg.
|
|
*
|
|
* Passing all the checks will cancel the entire attack chain.
|
|
*/
|
|
/datum/element/kneecapping
|
|
|
|
/datum/element/kneecapping/Attach(datum/target)
|
|
if(!isitem(target))
|
|
stack_trace("Kneecapping element added to non-item object: \[[target]\]")
|
|
return ELEMENT_INCOMPATIBLE
|
|
|
|
var/obj/item/target_item = target
|
|
|
|
if(target_item.force < WOUND_MINIMUM_DAMAGE)
|
|
stack_trace("Kneecapping element added to item with too little force to wound: \[[target]\]")
|
|
return ELEMENT_INCOMPATIBLE
|
|
|
|
. = ..()
|
|
|
|
if(. == ELEMENT_INCOMPATIBLE)
|
|
return
|
|
|
|
RegisterSignal(target, COMSIG_ITEM_ATTACK_SECONDARY , PROC_REF(try_kneecap_target))
|
|
|
|
/datum/element/kneecapping/Detach(datum/target)
|
|
UnregisterSignal(target, COMSIG_ITEM_ATTACK_SECONDARY)
|
|
|
|
return ..()
|
|
|
|
/**
|
|
* Signal handler for COMSIG_ITEM_ATTACK_SECONDARY. Does checks for pacifism, zones and target state before either returning nothing
|
|
* if the special attack could not be attempted, performing the ordinary attack procs instead - Or cancelling the attack chain if
|
|
* the attack can be started.
|
|
*/
|
|
/datum/element/kneecapping/proc/try_kneecap_target(obj/item/source, mob/living/carbon/target, mob/attacker, params)
|
|
SIGNAL_HANDLER
|
|
|
|
if((attacker.zone_selected != BODY_ZONE_L_LEG) && (attacker.zone_selected != BODY_ZONE_R_LEG))
|
|
return
|
|
|
|
if(HAS_TRAIT(attacker, TRAIT_PACIFISM))
|
|
return
|
|
|
|
if(!iscarbon(target))
|
|
return
|
|
|
|
if(!target.buckled && !HAS_TRAIT(target, TRAIT_FLOORED) && !HAS_TRAIT(target, TRAIT_IMMOBILIZED))
|
|
return
|
|
|
|
var/obj/item/bodypart/leg = target.get_bodypart(attacker.zone_selected)
|
|
|
|
if(!leg)
|
|
return
|
|
|
|
. = COMPONENT_SECONDARY_CANCEL_ATTACK_CHAIN
|
|
|
|
INVOKE_ASYNC(src, PROC_REF(do_kneecap_target), source, leg, target, attacker)
|
|
|
|
/**
|
|
* After a short do_after, attacker applies damage to the given leg with a significant wounding bonus, applying the weapon's force as damage.
|
|
*/
|
|
/datum/element/kneecapping/proc/do_kneecap_target(obj/item/weapon, obj/item/bodypart/leg, mob/living/carbon/target, mob/attacker)
|
|
if(LAZYACCESS(attacker.do_afters, weapon))
|
|
return
|
|
|
|
attacker.visible_message(span_warning("[attacker] carefully aims [attacker.p_their()] [weapon] for a swing at [target]'s kneecaps!"), span_danger("You carefully aim \the [weapon] for a swing at [target]'s kneecaps!"))
|
|
log_combat(attacker, target, "started aiming a swing to break the kneecaps of", weapon)
|
|
|
|
if(do_after(attacker, 3 SECONDS, target, interaction_key = weapon))
|
|
attacker.visible_message(span_warning("[attacker] swings [attacker.p_their()] [weapon] at [target]'s kneecaps!"), span_danger("You swing \the [weapon] at [target]'s kneecaps!"))
|
|
var/datum/wound/blunt/severe/severe_wound_type = /datum/wound/blunt/severe
|
|
var/datum/wound/blunt/critical/critical_wound_type = /datum/wound/blunt/critical
|
|
leg.receive_damage(brute = weapon.force, wound_bonus = rand(initial(severe_wound_type.threshold_minimum), initial(critical_wound_type.threshold_minimum) + 10), damage_source = "kneecapping")
|
|
target.emote("scream")
|
|
log_combat(attacker, target, "broke the kneecaps of", weapon)
|
|
target.update_damage_overlays()
|
|
attacker.do_attack_animation(target, used_item = weapon)
|
|
playsound(source = get_turf(weapon), soundin = weapon.hitsound, vol = weapon.get_clamped_volume(), vary = TRUE)
|