Reagent reaction_mob/turf tweaks

- Adds an if() check to reaction_mob for catching a very rare runtime related to mobs inhaling smoke reagents from just deleted smoke.
- Carbons reaction_turf proc now modifies a single dirt overlay layer, instead of just adding more decal objects to the turf.
- Added some checks to the radium and uranium reaction_turf proc so it doesn't stack multiple greenglow decals.
- Performed colon removal surgery on thermites reaction_turf proc, also tweaked it's overlay operation to correctly overlay a chemical puddle effect, instead of a melted wall effect.
- Removed space_cleaners overlays.Cut() code, since it was removing decals from turfs.
This commit is contained in:
Loganbacca
2014-02-22 00:56:12 +13:00
parent 864e097e91
commit f593232aa5
+36 -26
View File
@@ -35,31 +35,32 @@ datum
var/datum/reagent/self = src
src = null //of the reagent to the mob on TOUCHING it.
if(!istype(self.holder.my_atom, /obj/effect/effect/smoke/chem))
// If the chemicals are in a smoke cloud, do not try to let the chemicals "penetrate" into the mob's system (balance station 13) -- Doohl
if(self.holder) //for catching rare runtimes
if(!istype(self.holder.my_atom, /obj/effect/effect/smoke/chem))
// If the chemicals are in a smoke cloud, do not try to let the chemicals "penetrate" into the mob's system (balance station 13) -- Doohl
if(method == TOUCH)
if(method == TOUCH)
var/chance = 1
var/block = 0
var/chance = 1
var/block = 0
for(var/obj/item/clothing/C in M.get_equipped_items())
if(C.permeability_coefficient < chance) chance = C.permeability_coefficient
if(istype(C, /obj/item/clothing/suit/bio_suit))
// bio suits are just about completely fool-proof - Doohl
// kind of a hacky way of making bio suits more resistant to chemicals but w/e
if(prob(75))
block = 1
for(var/obj/item/clothing/C in M.get_equipped_items())
if(C.permeability_coefficient < chance) chance = C.permeability_coefficient
if(istype(C, /obj/item/clothing/suit/bio_suit))
// bio suits are just about completely fool-proof - Doohl
// kind of a hacky way of making bio suits more resistant to chemicals but w/e
if(prob(75))
block = 1
if(istype(C, /obj/item/clothing/head/bio_hood))
if(prob(75))
block = 1
if(istype(C, /obj/item/clothing/head/bio_hood))
if(prob(75))
block = 1
chance = chance * 100
chance = chance * 100
if(prob(chance) && !block)
if(M.reagents)
M.reagents.add_reagent(self.id,self.volume/2)
if(prob(chance) && !block)
if(M.reagents)
M.reagents.add_reagent(self.id,self.volume/2)
return 1
reaction_obj(var/obj/O, var/volume) //By default we transfer a small part of the reagent to the object
@@ -582,7 +583,12 @@ datum
reaction_turf(var/turf/T, var/volume)
src = null
if(!istype(T, /turf/space))
new /obj/effect/decal/cleanable/dirt(T)
var/obj/effect/decal/cleanable/dirt/dirtoverlay = locate(/obj/effect/decal/cleanable/dirt, T)
if (!dirtoverlay)
dirtoverlay = new/obj/effect/decal/cleanable/dirt(T)
dirtoverlay.alpha = volume*30
else
dirtoverlay.alpha = min(dirtoverlay.alpha+volume*30, 255)
chlorine
name = "Chlorine"
@@ -708,7 +714,9 @@ datum
src = null
if(volume >= 3)
if(!istype(T, /turf/space))
new /obj/effect/decal/cleanable/greenglow(T)
var/obj/effect/decal/cleanable/greenglow/glow = locate(/obj/effect/decal/cleanable/greenglow, T)
if(!glow)
new /obj/effect/decal/cleanable/greenglow(T)
return
@@ -748,9 +756,9 @@ datum
src = null
if(volume >= 5)
if(istype(T, /turf/simulated/wall))
T:thermite = 1
T.overlays.Cut()
T.overlays = image('icons/effects/effects.dmi',icon_state = "thermite")
var/turf/simulated/wall/W = T
W.thermite = 1
W.overlays += image('icons/effects/effects.dmi',icon_state = "#673910")
return
on_mob_life(var/mob/living/M as mob)
@@ -872,7 +880,10 @@ datum
src = null
if(volume >= 3)
if(!istype(T, /turf/space))
new /obj/effect/decal/cleanable/greenglow(T)
var/obj/effect/decal/cleanable/greenglow/glow = locate(/obj/effect/decal/cleanable/greenglow, T)
if(!glow)
new /obj/effect/decal/cleanable/greenglow(T)
return
aluminum
name = "Aluminum"
@@ -931,7 +942,6 @@ datum
if(istype(T, /turf/simulated))
var/turf/simulated/S = T
S.dirt = 0
T.overlays.Cut()
T.clean_blood()
for(var/obj/effect/decal/cleanable/C in T.contents)
src.reaction_obj(C, volume)