-
Notifications
You must be signed in to change notification settings - Fork 222
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
Damage handlers. #3418
Damage handlers. #3418
Conversation
8ace93d
to
9474a6b
Compare
So, I got a few thoughts after reading the code, and from what I think you're trying to do. Mainly, I feel like the damage handlers being stateless decl that handle damage via many highly specialized procs is maybe not the best way to go about things? A few problems come to mind:
I feel like, damage handling could be a lot less complicated by just using inheritance and sensibly dividing damage handling into inherited procs, and some damage type definition /decl? Also, another thing is how to deal deal with self/internal-damage, and raw damage with this setup? Since those should probably not involve armor checks, physical wounds creation, and like flavor text/sounds/visual effects, but generally still go through the same procs for validation and etc. I might have misinterpreted what you want to do with this, but I feel like maybe this could be interesting stuff to keep in mind either way. |
8226f19
to
d6ec370
Compare
26df13a
to
71c9b15
Compare
Initial coarse conversion of damage types to decls. Removing adjust/set/get loss procs. Coarse take_damage/apply_damage/etc proc unification. Converting older apply_damage() code to new damage handlers. Replacing species mod getters with damage modifier list/getter. Disambiguating various damage procs. Blob damage now uses a shared take_damage() proc on /atom. Structures now use shared take_damage() proc. Walls now use shared take_damage proc. Shields now use shared take_damage proc. Organs now use shared damage procs. Mech components now use shared damage proc. Items and machines use shared damage proc. Post-rebase compile updates. Replacing decl paths for damage handlers with old single-word defines.
71c9b15
to
014f831
Compare
Splitting prep work from this PR out into #4064. |
Abandoning this for now, can revisit down the track when stuff is more unified. |
To clarify, you told me you wanted me to wait on this before working on my damage stuff. So, what's the plan? Should, I just go ahead with unifying damage stuff to /obj and possibly /atom level, or should I put mine off indefinitely? |
Another fey mood like the config system. Opening so I don't forget about it.
Description of changes
take_damage()
andheal_damage()
which in turn hook into the decl damage handler system.Why and what will this PR improve
Cleaner code, better modpack support for new damage types.
TODO
robo_repair
andoverride_droplimb
passing./obj/effect
subtypes with bespoke health handling.Authorship
Myself.
Changelog
🆑
tweak: The way damage is handled has been drastically rewritten across the board. Please report any bugs.
/:cl: