mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 13:38:41 +01:00
Refactors reagent exposure code (#51396)
* Refactors reagent exposure code Removes istype clutter. Renames a few procs * == TRUE Adjusts COMPONENT_NO_EXPOSE_REAGENTS bitflag offset. TODO: Remove comment Co-authored-by: Rohesie <rohesie@gmail.com> * == TRUE Adjusts COMONENT_NO_EXPOSE REAGENTS bitflag offset. Removes comment Co-authored-by: Rohesie <rohesie@gmail.com>
This commit is contained in:
co-authored by
Rohesie
parent
356e369109
commit
e78d82592f
@@ -142,7 +142,7 @@
|
||||
if(O.type == src.type)
|
||||
continue
|
||||
if(lifetime % reagent_divisor)
|
||||
reagents.reaction(O, VAPOR, fraction)
|
||||
reagents.expose(O, VAPOR, fraction)
|
||||
var/hit = 0
|
||||
for(var/mob/living/L in range(0,src))
|
||||
hit += foam_mob(L)
|
||||
@@ -150,7 +150,7 @@
|
||||
lifetime++ //this is so the decrease from mobs hit and the natural decrease don't cumulate.
|
||||
var/T = get_turf(src)
|
||||
if(lifetime % reagent_divisor)
|
||||
reagents.reaction(T, VAPOR, fraction)
|
||||
reagents.expose(T, VAPOR, fraction)
|
||||
|
||||
if(--amount < 0)
|
||||
return
|
||||
@@ -163,7 +163,7 @@
|
||||
return 0
|
||||
var/fraction = 1/initial(reagent_divisor)
|
||||
if(lifetime % reagent_divisor)
|
||||
reagents.reaction(L, VAPOR, fraction)
|
||||
reagents.expose(L, VAPOR, fraction)
|
||||
lifetime--
|
||||
return 1
|
||||
|
||||
|
||||
@@ -232,9 +232,9 @@
|
||||
for(var/atom/movable/AM in T)
|
||||
if(AM.type == src.type)
|
||||
continue
|
||||
reagents.reaction(AM, TOUCH, fraction)
|
||||
reagents.expose(AM, TOUCH, fraction)
|
||||
|
||||
reagents.reaction(T, TOUCH, fraction)
|
||||
reagents.expose(T, TOUCH, fraction)
|
||||
return 1
|
||||
|
||||
/obj/effect/particle_effect/smoke/chem/smoke_mob(mob/living/carbon/M)
|
||||
@@ -247,7 +247,7 @@
|
||||
return 0
|
||||
var/fraction = 1/initial(lifetime)
|
||||
reagents.copy_to(C, fraction*reagents.total_volume)
|
||||
reagents.reaction(M, INGEST, fraction)
|
||||
reagents.expose(M, INGEST, fraction)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
/obj/effect/particle_effect/water/Bump(atom/A)
|
||||
if(reagents)
|
||||
reagents.reaction(A)
|
||||
reagents.expose(A)
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user