(code bounty) refactors all uses of Crossed() and Uncrossed() into signals sent to loc, tracked by connect_loc (#58340)

Co-authored-by: Jared-Fogle <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
This commit is contained in:
Kylerace
2021-05-07 03:54:03 -07:00
committed by GitHub
co-authored by Jared-Fogle Emmett Gaines
parent 3cabee50b6
commit 08df8798ce
104 changed files with 702 additions and 358 deletions
@@ -125,6 +125,13 @@
/obj/effect/particle_effect/smoke/bad
lifetime = 8
/obj/effect/particle_effect/smoke/bad/Initialize()
. = ..()
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = .proc/on_entered,
)
AddElement(/datum/element/connect_loc, src, loc_connections)
/obj/effect/particle_effect/smoke/bad/smoke_mob(mob/living/carbon/M)
. = ..()
if(.)
@@ -133,8 +140,8 @@
M.emote("cough")
return TRUE
/obj/effect/particle_effect/smoke/bad/Crossed(atom/movable/AM, oldloc)
. = ..()
/obj/effect/particle_effect/smoke/bad/proc/on_entered(datum/source, atom/movable/AM, oldloc)
SIGNAL_HANDLER
if(istype(AM, /obj/projectile/beam))
var/obj/projectile/beam/B = AM
B.damage = (B.damage/2)
@@ -265,7 +272,7 @@
chemholder = new /obj()
var/datum/reagents/R = new (500, REAGENT_HOLDER_INSTANT_REACT) //This is a safety for now to prevent smoke generating more smoke as the smoke reagents react in the smoke. This is prevented naturally from happening even if this is off, but I want to be sure that any edge cases are prevented before I get a chance to rework smoke reactions (specifically adding water or reacting away stabilizing agent in the middle of it).
chemholder.reagents = R
R.my_atom = chemholder
/datum/effect_system/smoke_spread/chem/Destroy()