-
-
Notifications
You must be signed in to change notification settings - Fork 541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separates bleeding from damage, gauze now STOPS bleeding rather than postponing it #3009
Merged
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
a447b17
initial bleeding changes
SomeguyManperson 2568a57
Things what cause bleeding
SomeguyManperson b4db414
scope 1: bandages and bandage-based healing
SomeguyManperson 167ae2e
bandage component & blood stuff (again!)
SomeguyManperson d98ca60
scrapping
SomeguyManperson 67d2c3d
starting on new structure
SomeguyManperson ac7d2af
Merge branch 'master' of https://github.com/shiptest-ss13/Shiptest in…
SomeguyManperson d231504
Merge branch 'shiptest-ss13:master' into awful
SomeguyManperson fc6f180
Merge branch 'awful' of https://github.com/SomeguyManperson/Shiptest …
SomeguyManperson dd6dfd1
fix
SomeguyManperson 15fbb4b
Standardized proc start, tape handling, better examine stuff & surger…
SomeguyManperson 47f3207
Mess cleaning
SomeguyManperson 52a5c8b
cleaning
SomeguyManperson 4d4b34c
Moves all bleeding stuff to new system, general damage procs, making …
SomeguyManperson c381e89
pretend this is in the last commit
SomeguyManperson bf948a4
removes bleed_rate because it's unnecessary
SomeguyManperson 98f5ea4
Cauterization support
SomeguyManperson 3c0fc45
tweaks and fix bleeding healing for bandages
SomeguyManperson da1d645
Merge branch 'master' into awful
SomeguyManperson 2c566c7
minimums on bleed adjusts and rebrand heal_bodypart_bleeding to heal_…
SomeguyManperson c04cbd5
Suit storage cauterization (funny), numbers, removing bandage healing…
SomeguyManperson 4deb81a
waa
SomeguyManperson 70d6e0c
The last icecream sandwich is mine. Everyone else has had two and i h…
SomeguyManperson 5459c27
numbers and stuff that slipped
SomeguyManperson 542ab2a
Words
SomeguyManperson df16825
waa
SomeguyManperson cd97eea
Reduce bleeding from embeds since it stacks more now
SomeguyManperson 72eb14d
WHOOPS
SomeguyManperson 97be383
Merge branch 'awful' of https://github.com/SomeguyManperson/Shiptest …
SomeguyManperson 61a7711
Merge branch 'master' into awful
SomeguyManperson 0f42e6a
Improves bloodloss reduction from brute healing
SomeguyManperson 49c0b8f
self help displays openly bleeding limbs
SomeguyManperson 3ff3c5a
Merge branch 'awful' of https://github.com/SomeguyManperson/Shiptest …
SomeguyManperson 5feeea4
Fully healed limbs will now slowly stop bleeding if any is left
SomeguyManperson 715f3f4
Delimb support and some tuning
SomeguyManperson 707ac6a
uogh
SomeguyManperson 60b4d2b
Merge branch 'master' into awful
SomeguyManperson a32cab6
Merge branch 'awful' of https://github.com/SomeguyManperson/Shiptest …
SomeguyManperson bc8882a
Merge branch 'shiptest-ss13:master' into awful
SomeguyManperson 2dd25b3
Merge branch 'master' into awful
SomeguyManperson 2f30215
Merge branch 'master' into awful
SomeguyManperson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i looked at the attackby and it looks like you would be use this infinity to cauterize is that correct?
it also SHOULD qdel itself after it has no uses left so this shouldn't realllly matter