mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-26 00:51:23 +00:00
About The Pull Request
This PR adds medical wounds, new forms of injuries that people can suffer that cause debilitation and complications, and often require more than what can be found in a medkit to treat. But let's be honest, big complicated walls of text about medical changes make people's eyes glaze over easily- so I created a handy infograph to explain the basics!
Also there's a full guide here!
dreamseeker_2020-04-18_20-42-19.png
The infograph may not be fully up to date with the specifics of the PR's status, but it'll be updated along with major changes so people have something to use as a crash course for familiarizing themselves with how wounds function. I also have another infograph with all 9 of the possible initial wounds coming, and will be up soon. You can also find the longform design doc here with more info on the broad details, including descriptions of treatments: hackmd whee
What this does
There's a lot to cover, but here's the bullet points of the main features and changes:
Getting lots of damage on a limb can result in wounds, with more damage causing worse wounds. These can range from dislocated joints and minor cuts to compound fractures and fourth degree burns, and can affect you in different ways depending on what bodypart they're applied to (namely with broken bones).
You can damage individual bodyparts on clothing (only jumpsuits for now) through the use of lasers and sharp weapons. Bodyparts that reach max damage are considered "shredded" and will not apply any protection for that zone until it is repaired with cloth. If all zones are disabled, the entire piece of clothing is shredded and unwearable until repaired with 3 cloth. Jumpsuits give a small amount of wound protection, and since sharp weapons and lasers generally get extra wound bonuses against bare flesh, even a plain jumpsuit provides decent protection from a few laser shots or scalpel stabs.
Lasers gain a powerful niche versus unarmored/lightly armored carbons! As noted above, lasers can shred clothing and burn away zones of jumpsuits in 2 shots each, after which the target's bare flesh is exposed (barring other clothing), and lasers excel at dealing burn wounds against uncovered skin. Think big, nasty charring!
Bleeding is now totally limb based, and gauze is as well. Bleeding is also 95% cut wound based, meaning sharp weapons make you bleed rather than just having 40+ brute on a limb.
The more wounds and damage you get on a bodypart, the easier it'll be to gain more severe wounds. Wounds are arranged from Moderate, to Severe, to Critical in increasing severity, and you'll generally have to suffer the lesser ones before getting the worse ones.
dreamseeker_2020-05-15_03-15-59.png
Above: Someone having an incredibly bad day from bloodloss
dreamseeker_2020-05-04_22-29-29.png
Above: Scars from healed wounds
ShareX_2020-05-15_06-55-20.png
Above: Actual combat involving someone's head getting cracked
Here's a quick, if non-exhaustive, list of things I have left to do before I consider it feature complete
Finish adding treatments for each wound type/severity (mostly surgeries/triage for critical wounds)
Add second winds for bad injuries to give the victim a chance to get away
Flesh out severe & critical injuries in general
Find sprites for the bonesetter, bone gel, and anything else that might be needed
Add the medical items for treating the less severe wounds to the station
Polish code and remove any redundancies I left behind
Quick balance pass to make sure nothing is horribly abuseable
Why It's Good For The Game
Adds a flexible new system for representing damage on carbons with injuries that can be treated in different ways. Moderate wounds from getting toolboxed or sliced with a scalpel can usually be treated by a buddy or even by yourself with the right tools, but getting flayed with a fireaxe or a laser gun emptied into your bare skin may require extra attention or even surgery in bad cases! Also makes laser guns cooler and more like 40k lasguns that can flash fry people (cool!)
This should also make spessmen more resilient and harder to kill outright, while still adding consequences and complications to getting hurt. Wounds aren't immediately fatal, but they can do things like slow down interactions, deal damage over time through infections, and generally make you more fragile until fixed. They can also give you a "second wind" on being applied that gives you a small adrenaline boost (or whatever) to help disengage and escape immediate danger.
Changelog
🆑 Ryll/Shaps
add: Introduces medical wounds, new injuries that can happen to fleshy carbons when they sustain lots of damage on a bodypart. There's quite a lot of change here, but you can read the guide at: https://tgstation13.org/wiki/Guide_to_wounds and an extended changelog is available here: https://hackmd.io/l_FI9b3tSqa_woDadewJXA
add: Introduces scars and temporal scarring! Healing a wound leaves a scar behind that can be seen by examining someone twice rapidly, and if Temporal Scarring is enabled in character prefs, surviving a round with scars will save them to be granted at roundstart another round! Let your body tell stories!
tweak: Bleeding is now fully bodypart-focused, and 95% of bleeding comes from cut wounds from sharp weapons. Gauze is applied on a limb-by-limb basis, and helps staunch bloodflow rather than totally stop it. Notably, you no longer bleed just from having 40+ brute damage on a limb.
del: Organic bodyparts are no longer disabled at maximum damage, but are easier to cause wounds to
add: O2 medkits in emergency lockers have been replaced with new emergency medkits with basic tools for diagnosing and treating wounds and basic damage
tweak: Herapin now rapidly increases bleeding on all open cuts, rather than causing bleeding by itself. The more cuts on the target, the more it will affect them.
tweak: Neckgrab table slams now hit the targeted limb rather than just the head, with a large chance to dislocate or break a bone
tweak: Sharp weapons and burning weapons can now shred zones on jumpsuits, disabling protection on that limb. Damaged clothes can be repaired with cloth.
tweak: Slaughter demons now deal less raw damage, but gain the ability to cause cut wounds, which becomes more powerful with each attack on a humanoid but resets when bloodcrawling.
/🆑
278 lines
9.0 KiB
Plaintext
278 lines
9.0 KiB
Plaintext
#define GUILLOTINE_BLADE_MAX_SHARP 10 // This is maxiumum sharpness and will decapitate without failure
|
|
#define GUILLOTINE_DECAP_MIN_SHARP 7 // Minimum amount of sharpness for decapitation. Any less and it will just do severe brute damage
|
|
#define GUILLOTINE_ANIMATION_LENGTH 9 // How many deciseconds the animation is
|
|
#define GUILLOTINE_BLADE_RAISED 1
|
|
#define GUILLOTINE_BLADE_MOVING 2
|
|
#define GUILLOTINE_BLADE_DROPPED 3
|
|
#define GUILLOTINE_BLADE_SHARPENING 4
|
|
#define GUILLOTINE_HEAD_OFFSET 16 // How much we need to move the player to center their head
|
|
#define GUILLOTINE_LAYER_DIFF 1.2 // How much to increase/decrease a head when it's buckled/unbuckled
|
|
#define GUILLOTINE_ACTIVATE_DELAY 30 // Delay for executing someone
|
|
#define GUILLOTINE_WRENCH_DELAY 10
|
|
#define GUILLOTINE_ACTION_INUSE 5
|
|
#define GUILLOTINE_ACTION_WRENCH 6
|
|
|
|
/obj/structure/guillotine
|
|
name = "guillotine"
|
|
desc = "A large structure used to remove the heads of traitors and treasonists."
|
|
icon = 'icons/obj/guillotine.dmi'
|
|
icon_state = "guillotine_raised"
|
|
can_buckle = TRUE
|
|
anchored = TRUE
|
|
density = TRUE
|
|
max_buckled_mobs = 1
|
|
buckle_lying = FALSE
|
|
buckle_prevents_pull = TRUE
|
|
layer = ABOVE_MOB_LAYER
|
|
var/blade_status = GUILLOTINE_BLADE_RAISED
|
|
var/blade_sharpness = GUILLOTINE_BLADE_MAX_SHARP // How sharp the blade is
|
|
var/kill_count = 0
|
|
var/current_action = 0 // What's currently happening to the guillotine
|
|
|
|
/obj/structure/guillotine/Initialize()
|
|
LAZYINITLIST(buckled_mobs)
|
|
. = ..()
|
|
|
|
/obj/structure/guillotine/attackby(obj/item/I, mob/user)
|
|
if(istype(I, /obj/item/stack/sheet/plasteel))
|
|
to_chat(user, "<span class='notice'>You start repairing the guillotine with the plasteel...</span>")
|
|
if(blade_sharpness<10)
|
|
if(do_after(user,100,target=user))
|
|
blade_sharpness = min(10,blade_sharpness+3)
|
|
I.use(1)
|
|
to_chat(user, "<span class='notice'>You repair the guillotine with the plasteel.</span>")
|
|
else
|
|
to_chat(user, "<span class='notice'>You stop repairing the guillotine with the plasteel.</span>")
|
|
else
|
|
to_chat(user, "<span class='warning'>The guillotine is already fully repaired!</span>")
|
|
|
|
/obj/structure/guillotine/examine(mob/user)
|
|
. = ..()
|
|
|
|
var/msg = "It is [anchored ? "wrenched to the floor." : "unsecured. A wrench should fix that."]<br/>"
|
|
|
|
if (blade_status == GUILLOTINE_BLADE_RAISED)
|
|
msg += "The blade is raised, ready to fall, and"
|
|
|
|
if (blade_sharpness >= GUILLOTINE_DECAP_MIN_SHARP)
|
|
msg += " looks sharp enough to decapitate without any resistance."
|
|
else
|
|
msg += " doesn't look particularly sharp. Perhaps a whetstone can be used to sharpen it."
|
|
else
|
|
msg += "The blade is hidden inside the stocks."
|
|
|
|
. += msg
|
|
|
|
if (LAZYLEN(buckled_mobs))
|
|
. += "Someone appears to be strapped in. You can help them out, or you can harm them by activating the guillotine."
|
|
|
|
/obj/structure/guillotine/attack_hand(mob/user)
|
|
add_fingerprint(user)
|
|
|
|
// Currently being used by something
|
|
if (current_action)
|
|
return
|
|
|
|
switch (blade_status)
|
|
if (GUILLOTINE_BLADE_MOVING)
|
|
return
|
|
if (GUILLOTINE_BLADE_DROPPED)
|
|
blade_status = GUILLOTINE_BLADE_MOVING
|
|
icon_state = "guillotine_raise"
|
|
addtimer(CALLBACK(src, .proc/raise_blade), GUILLOTINE_ANIMATION_LENGTH)
|
|
return
|
|
if (GUILLOTINE_BLADE_RAISED)
|
|
if (LAZYLEN(buckled_mobs))
|
|
if (user.a_intent == INTENT_HARM)
|
|
user.visible_message("<span class='warning'>[user] begins to pull the lever!</span>",
|
|
"<span class='warning'>You begin to the pull the lever.</span>")
|
|
current_action = GUILLOTINE_ACTION_INUSE
|
|
|
|
if (do_after(user, GUILLOTINE_ACTIVATE_DELAY, target = src) && blade_status == GUILLOTINE_BLADE_RAISED)
|
|
current_action = 0
|
|
blade_status = GUILLOTINE_BLADE_MOVING
|
|
icon_state = "guillotine_drop"
|
|
addtimer(CALLBACK(src, .proc/drop_blade, user), GUILLOTINE_ANIMATION_LENGTH - 2) // Minus two so we play the sound and decap faster
|
|
else
|
|
current_action = 0
|
|
else
|
|
var/mob/living/carbon/human/H = buckled_mobs[1]
|
|
|
|
if (H)
|
|
H.regenerate_icons()
|
|
|
|
unbuckle_all_mobs()
|
|
else
|
|
blade_status = GUILLOTINE_BLADE_MOVING
|
|
icon_state = "guillotine_drop"
|
|
addtimer(CALLBACK(src, .proc/drop_blade), GUILLOTINE_ANIMATION_LENGTH)
|
|
|
|
/obj/structure/guillotine/proc/raise_blade()
|
|
blade_status = GUILLOTINE_BLADE_RAISED
|
|
icon_state = "guillotine_raised"
|
|
|
|
/obj/structure/guillotine/proc/drop_blade(mob/user)
|
|
if (has_buckled_mobs() && blade_sharpness)
|
|
var/mob/living/carbon/human/H = buckled_mobs[1]
|
|
|
|
if (!H)
|
|
return
|
|
|
|
var/obj/item/bodypart/head/head = H.get_bodypart("head")
|
|
|
|
if (QDELETED(head))
|
|
return
|
|
|
|
playsound(src, 'sound/weapons/guillotine.ogg', 100, TRUE)
|
|
if (blade_sharpness >= GUILLOTINE_DECAP_MIN_SHARP || head.brute_dam >= 100)
|
|
head.dismember()
|
|
log_combat(user, H, "beheaded", src)
|
|
H.regenerate_icons()
|
|
unbuckle_all_mobs()
|
|
kill_count += 1
|
|
|
|
var/blood_overlay = "bloody"
|
|
|
|
if (kill_count == 2)
|
|
blood_overlay = "bloodier"
|
|
else if (kill_count > 2)
|
|
blood_overlay = "bloodiest"
|
|
|
|
blood_overlay = "guillotine_" + blood_overlay + "_overlay"
|
|
cut_overlays()
|
|
add_overlay(mutable_appearance(icon, blood_overlay))
|
|
|
|
// The crowd is pleased
|
|
// The delay is to making large crowds have a longer laster applause
|
|
var/delay_offset = 0
|
|
for(var/mob/M in viewers(src, 7))
|
|
var/mob/living/carbon/human/C = M
|
|
if (ishuman(M))
|
|
addtimer(CALLBACK(C, /mob/.proc/emote, "clap"), delay_offset * 0.3)
|
|
delay_offset++
|
|
else
|
|
H.apply_damage(15 * blade_sharpness, BRUTE, head)
|
|
log_combat(user, H, "dropped the blade on", src, " non-fatally")
|
|
H.emote("scream")
|
|
|
|
if (blade_sharpness > 1)
|
|
blade_sharpness -= 1
|
|
|
|
blade_status = GUILLOTINE_BLADE_DROPPED
|
|
icon_state = "guillotine"
|
|
|
|
/obj/structure/guillotine/attackby(obj/item/W, mob/user, params)
|
|
if (istype(W, /obj/item/sharpener))
|
|
add_fingerprint(user)
|
|
if (blade_status == GUILLOTINE_BLADE_SHARPENING)
|
|
return
|
|
|
|
if (blade_status == GUILLOTINE_BLADE_RAISED)
|
|
if (blade_sharpness < GUILLOTINE_BLADE_MAX_SHARP)
|
|
blade_status = GUILLOTINE_BLADE_SHARPENING
|
|
if(do_after(user, 7, target = src))
|
|
blade_status = GUILLOTINE_BLADE_RAISED
|
|
user.visible_message("<span class='notice'>[user] sharpens the large blade of the guillotine.</span>",
|
|
"<span class='notice'>You sharpen the large blade of the guillotine.</span>")
|
|
blade_sharpness += 1
|
|
playsound(src, 'sound/items/unsheath.ogg', 100, TRUE)
|
|
return
|
|
else
|
|
blade_status = GUILLOTINE_BLADE_RAISED
|
|
return
|
|
else
|
|
to_chat(user, "<span class='warning'>The blade is sharp enough!</span>")
|
|
return
|
|
else
|
|
to_chat(user, "<span class='warning'>You need to raise the blade in order to sharpen it!</span>")
|
|
return
|
|
else
|
|
return ..()
|
|
|
|
/obj/structure/guillotine/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
|
|
if (!anchored)
|
|
to_chat(usr, "<span class='warning'>The [src] needs to be wrenched to the floor!</span>")
|
|
return FALSE
|
|
|
|
if (!istype(M, /mob/living/carbon/human))
|
|
to_chat(usr, "<span class='warning'>It doesn't look like [M.p_they()] can fit into this properly!</span>")
|
|
return FALSE // Can't decapitate non-humans
|
|
|
|
if (blade_status != GUILLOTINE_BLADE_RAISED)
|
|
to_chat(usr, "<span class='warning'>You need to raise the blade before buckling someone in!</span>")
|
|
return FALSE
|
|
|
|
return ..(M, force, FALSE)
|
|
|
|
/obj/structure/guillotine/post_buckle_mob(mob/living/M)
|
|
if (!istype(M, /mob/living/carbon/human))
|
|
return
|
|
|
|
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "dying", /datum/mood_event/deaths_door)
|
|
var/mob/living/carbon/human/H = M
|
|
|
|
if (H.dna)
|
|
if (H.dna.species)
|
|
var/datum/species/S = H.dna.species
|
|
|
|
if (istype(S))
|
|
H.cut_overlays()
|
|
H.update_body_parts_head_only()
|
|
H.pixel_y += -GUILLOTINE_HEAD_OFFSET // Offset their body so it looks like they're in the guillotine
|
|
H.layer += GUILLOTINE_LAYER_DIFF
|
|
else
|
|
unbuckle_all_mobs()
|
|
else
|
|
unbuckle_all_mobs()
|
|
else
|
|
unbuckle_all_mobs()
|
|
|
|
..()
|
|
|
|
/obj/structure/guillotine/post_unbuckle_mob(mob/living/M)
|
|
M.regenerate_icons()
|
|
M.pixel_y -= -GUILLOTINE_HEAD_OFFSET // Move their body back
|
|
M.layer -= GUILLOTINE_LAYER_DIFF
|
|
SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "dying")
|
|
..()
|
|
|
|
/obj/structure/guillotine/can_be_unfasten_wrench(mob/user, silent)
|
|
if (LAZYLEN(buckled_mobs))
|
|
if (!silent)
|
|
to_chat(user, "<span class='warning'>Can't unfasten, someone's strapped in!</span>")
|
|
return FAILED_UNFASTEN
|
|
|
|
if (current_action)
|
|
return FAILED_UNFASTEN
|
|
|
|
return ..()
|
|
|
|
/obj/structure/guillotine/wrench_act(mob/living/user, obj/item/I)
|
|
. = ..()
|
|
if (current_action)
|
|
return
|
|
|
|
current_action = GUILLOTINE_ACTION_WRENCH
|
|
|
|
if (do_after(user, GUILLOTINE_WRENCH_DELAY, target = src))
|
|
current_action = 0
|
|
default_unfasten_wrench(user, I, 0)
|
|
setDir(SOUTH)
|
|
return TRUE
|
|
else
|
|
current_action = 0
|
|
|
|
#undef GUILLOTINE_BLADE_MAX_SHARP
|
|
#undef GUILLOTINE_DECAP_MIN_SHARP
|
|
#undef GUILLOTINE_ANIMATION_LENGTH
|
|
#undef GUILLOTINE_BLADE_RAISED
|
|
#undef GUILLOTINE_BLADE_MOVING
|
|
#undef GUILLOTINE_BLADE_DROPPED
|
|
#undef GUILLOTINE_BLADE_SHARPENING
|
|
#undef GUILLOTINE_HEAD_OFFSET
|
|
#undef GUILLOTINE_LAYER_DIFF
|
|
#undef GUILLOTINE_ACTIVATE_DELAY
|
|
#undef GUILLOTINE_WRENCH_DELAY
|
|
#undef GUILLOTINE_ACTION_INUSE
|
|
#undef GUILLOTINE_ACTION_WRENCH
|