-
-
Notifications
You must be signed in to change notification settings - Fork 538
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separates bleeding from damage, gauze now STOPS bleeding rather than …
…postponing it (#3009) <!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- You can view Contributing.MD for a detailed description of the pull request process. --> ![image](https://github.com/shiptest-ss13/Shiptest/assets/24857008/d5162c66-c24c-4115-8f17-b71fe2a7c97e) ![image](https://github.com/shiptest-ss13/Shiptest/assets/24857008/0035fc3d-ae4f-4bc8-b8a2-fab9e1652365) Bleeding rate is currently the same as it used to be (0.013 bleeding per damage) but can be increased beyond a limb's maximum damage from further attacks. Bleeding from damage caps at 2 per limb so exsanguinating someone isn't as easy as dumping lead into them until their blood falls out, and is hard-capped at 30 per limb for more direct sources such as throat cutting and heparin Blunt weapons require a force of 10 or higher, and for the limb to have 25 damage to cause bleeding Sharp weapons (including projectiles) need a force of 5 or higher, and for the limb to have 10 damage to cause bleeding Heparin now causes existing bleeding to get worse, rather than magically creating internal bleeding Bleeding is addressed through gauze, tape, cauterization or chemicals, with the former three halting current bleeding while it is being treated. Better equipment (primarily real medical gauze) heals faster. Numbers are non-final and speculative ## Why It's Good For The Game Causes bleeding to actually come from somewhere and be similarly addressed directly, gauze now exists to actually stop bleeding instead of being re-applied until the brute damage is fixed ## Changelog :cl: tweak: bleeding is now stored in the limbs, functioning similarly to bone breaking. Taking damage over a certain threshold and amount (lower for sharp weapons) will cause part of it to be turned into bleeding. tweak: gauze, tape, and bleeding suppression are similarly no longer abstracted into a "bleed suppression" value rscadd: you can now cauterize bleeding with a lighter. Which is cool. rscadd: you can now also cauterize bleeding with suit storage decontamination. Which is hot. rscadd: examine and examine closely will show whether or not someone is visibly bleeding or bandaged. This means people who are both will show both. Examine closely additionally shows which limbs are currently bleeding. tweak: heparin now causes existing bleeding to worsen, instead of causing bleeding on its own tweak: you can no longer cut the throat of someone who's head has been lopped off /:cl: <!-- Both :cl:'s are required for the changelog to work! You can put your name to the right of the first :cl: if you want to overwrite your GitHub username as author ingame. --> <!-- You can use multiple of the same prefix (they're only used for the icon ingame) and delete the unneeded ones. Despite some of the tags, changelogs should generally represent how a player might be affected by the changes rather than a summary of the PR's contents. --> --------- Signed-off-by: Theos <[email protected]>
- Loading branch information
1 parent
0449e6d
commit c9bf77d
Showing
39 changed files
with
335 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#define TREATMENT_DAMAGE_MOD 2 | ||
|
||
/datum/component/bandage | ||
/// How fast do we stop bleeding? | ||
var/bleed_reduction = 0 | ||
/// How many healing ticks will this bandage apply? Reduced by incoming damage and current bleeding | ||
var/lifespan = 300 | ||
var/bandage_name = "gauze" | ||
/// The person this bandage is applied to | ||
var/mob/living/mummy | ||
|
||
/datum/component/bandage/Initialize(_bleed_reduction, _lifespan, _bandage_name) | ||
if(!istype(parent, /obj/item/bodypart)) | ||
return COMPONENT_INCOMPATIBLE | ||
var/obj/item/bodypart/BP = parent | ||
mummy = BP.owner | ||
if(!mummy) | ||
return COMPONENT_INCOMPATIBLE | ||
if(_bleed_reduction) | ||
bleed_reduction = _bleed_reduction | ||
if(_lifespan) | ||
lifespan = _lifespan | ||
if(_bandage_name) | ||
bandage_name = _bandage_name | ||
RegisterSignal(mummy, COMSIG_MOB_APPLY_DAMGE, PROC_REF(check_damage)) | ||
RegisterSignal(mummy, COMSIG_MOB_LIFE, PROC_REF(bandage_effects)) | ||
RegisterSignal(parent, COMSIG_LIVING_DROP_LIMB, PROC_REF(drop_bandage)) | ||
|
||
/// Checks if damage to the owner is applied to this limb and reduces lifespan (perforated bandages dont work as well) | ||
/datum/component/bandage/proc/check_damage(attacker, damage, damagetype = BRUTE, def_zone = null) | ||
SIGNAL_HANDLER | ||
|
||
if(parent != mummy.get_bodypart(check_zone(def_zone))) | ||
return | ||
lifespan -= damage / 100 * initial(lifespan) * TREATMENT_DAMAGE_MOD //take incoming damage as a % of durability | ||
if(lifespan <= 0) | ||
drop_bandage() | ||
|
||
/// Handles healing effects and passive lifespan usage | ||
/datum/component/bandage/proc/bandage_effects() | ||
SIGNAL_HANDLER | ||
|
||
var/obj/item/bodypart/heal_target = parent | ||
lifespan -= 1 + heal_target.bleeding // particularly nasty bleeding can burn through dressing faster | ||
heal_target.adjust_bleeding(-bleed_reduction) | ||
if(lifespan <= 0 || !heal_target.bleeding) //remove treatment once it's no longer able to treat | ||
drop_bandage(TRUE) | ||
|
||
/// Handles deleting the component when the bandage runs out of lifespan or finishes healing. Special = bandage didn't get torn off | ||
/datum/component/bandage/proc/drop_bandage(special = FALSE) | ||
SIGNAL_HANDLER | ||
|
||
var/obj/item/bodypart/BP = parent | ||
if(special) | ||
to_chat(mummy, span_notice("The [bandage_name] on your [parse_zone(BP.body_zone)] has [BP.bleeding ? "done what it can" : "stopped the bleeding"].")) | ||
else | ||
to_chat(mummy, span_warning("The [bandage_name] on your [parse_zone(BP.body_zone)] is damaged beyond use!")) | ||
qdel(src) | ||
|
||
#undef TREATMENT_DAMAGE_MOD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.