mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-20 05:55:11 +00:00
* Fix runtime with CANT_WOUND weapons that use pellet_cloud (#53001) In /datum/component/pellet_cloud/proc/pellet_hit if the projectile's wound_bonus is CANT_WOUND, then wound_info_by_part[hit_part] never gets a value set. This causes an issue in /datum/component/pellet_cloud/proc/finalize() where it assumes that wound_info_by_part[hit_part] has always been set to a list(x,y,z). I added a quick if check to skip this where there's no wound info for a part. Weapon this behaviour manifested on: DRAGnet on net mode. Due to the runtime, I didn't notice it dealing any stamina damage. This should fix that scenario as well as any other CANT_WOUND projectiles and prevent them from runtiming early. * Fix runtime with CANT_WOUND weapons that use pellet_cloud Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
Datum Component System (DCS)
Concept
Loosely adapted from /vg/. This is an entity component system for adding behaviours to datums when inheritance doesn't quite cut it. By using signals and events instead of direct inheritance, you can inject behaviours without hacky overloads. It requires a different method of thinking, but is not hard to use correctly. If a behaviour can have application across more than one thing. Make it generic, make it a component. Atom/mob/obj event? Give it a signal, and forward it's arguments with a SendSignal() call. Now every component that want's to can also know about this happening.
See this thread for an introduction to the system as a whole.