Nerfs gaseous decomposition (#25716)

This commit is contained in:
DGamerL
2024-06-06 22:09:55 +02:00
committed by GitHub
parent 9fd53a0449
commit f1e9114cd6
2 changed files with 22 additions and 1 deletions
@@ -125,3 +125,24 @@
var/mob/living/carbon/C = A
if(C.can_breathe_gas())
chemholder.reagents.copy_to(C, chemholder.reagents.total_volume)
/datum/effect_system/smoke_spread/chem/plant
/datum/effect_system/smoke_spread/chem/plant/SmokeEm(effect_range)
var/list/mobs_to_smoke = list()
for(var/atom/A in view(effect_range, get_turf(location)))
if(istype(A, /obj/effect/particle_effect)) // Don't impact particle effects, as there can be hundreds of them in a small area. Also, we don't want smoke particles adding themselves to this list. Major performance issue.
continue
if(A in smoked_atoms)
continue
smoked_atoms += A
chemholder.reagents.reaction(A)
SEND_SIGNAL(A, COMSIG_ATOM_EXPOSE_REAGENTS, chemholder.reagents, chemholder, chemholder.reagents.total_volume)
if(iscarbon(A))
mobs_to_smoke += A
var/percentage_to_add = chemholder.reagents.total_volume / length(mobs_to_smoke)
for(var/mob/living/carbon/smoker as anything in mobs_to_smoke)
if(smoker.can_breathe_gas())
chemholder.reagents.copy_to(smoker, percentage_to_add)