mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
(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:
co-authored by
Jared-Fogle
Emmett Gaines
parent
3cabee50b6
commit
08df8798ce
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user