mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 01:34:01 +00:00
Audits a bunch of calls to receive_damage, replacing them with apply_damage (#88205)
## About The Pull Request Looks through calls to `receive_damage` and replaces them with calls to `apply_damage` `receive_damage` is a gross to use internal proc that doesn't take into account physiology (damage modifiers) or even update the mob's sprite when taking damage It should be avoided many uses - `apply_damage`, in fact, can take a bodypart as a target, and is overall a lot easier and more ergonomic to use. "So what are valid uses of it?" - Apply damage itself, and similar direct-damage procs - Ensuring you deal an exact amount of damage to a bodypart - Damaging a limb with no owner ## Changelog 🆑 Melbert refactor: A ton of things now use the more correct method of applying damage to you. Which means they will correctly factor in damage modifiers and are less likely to break your sprite. Some examples include embedded objects jostling around, chiropractice, and tackling a wall. Report any oddities, such as extreme damage or bodyparts being wrongly affected. fix: Having acid splashed on your face may now disfigure you and make you bald, as it once did three years ago. fix: Itchy heretic trauma now better checks if the bodypart is covered or not before determining if you should itch. fix: "Repair Puncture" logs no longer mistakenly report you are "Incising burned flesh" /🆑
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
playsound(organ_owner, SFX_DESECRATION, 50, vary = TRUE) //You just want to socialize
|
||||
organ_owner.visible_message(span_warning("[organ_owner] rattles loudly and flails around!!"), span_danger("Your bones hurt so much that your missing muscles spasm!!"))
|
||||
INVOKE_ASYNC(organ_owner, TYPE_PROC_REF(/atom/movable, say), "OOF!!", forced = chem.type)
|
||||
bodypart.receive_damage(brute = 200) //But I don't think we should
|
||||
organ_owner.apply_damage(200, BRUTE, bodypart)
|
||||
else
|
||||
to_chat(organ_owner, span_warning("Your missing [parse_zone(selected_part)] aches from wherever you left it."))
|
||||
INVOKE_ASYNC(organ_owner, TYPE_PROC_REF(/mob, emote), "sigh")
|
||||
|
||||
Reference in New Issue
Block a user