Smoke rework caused endless loops, reverted.

This commit is contained in:
alex-gh
2014-04-08 01:47:56 +02:00
parent 521ad31671
commit cfbfa0e993
38 changed files with 517 additions and 446 deletions
+28 -43
View File
@@ -39,32 +39,31 @@ datum
var/datum/reagent/self = src
src = null //of the reagent to the mob on TOUCHING it.
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(!istype(self.holder.my_atom, /obj/effect/effect/chem_smoke))
// 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
@@ -791,12 +790,7 @@ datum
reaction_turf(var/turf/T, var/volume)
src = null
if(!istype(T, /turf/space))
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)
new /obj/effect/decal/cleanable/dirt(T)
chlorine
name = "Chlorine"
@@ -1091,9 +1085,7 @@ datum
src = null
if(volume >= 3)
if(!istype(T, /turf/space))
var/obj/effect/decal/cleanable/greenglow/glow = locate(/obj/effect/decal/cleanable/greenglow, T)
if(!glow)
new /obj/effect/decal/cleanable/greenglow(T)
new /obj/effect/decal/cleanable/greenglow(T)
return
@@ -1132,9 +1124,9 @@ datum
src = null
if(volume >= 5)
if(istype(T, /turf/simulated/wall))
var/turf/simulated/wall/W = T
W.thermite = 1
W.overlays += image('icons/effects/effects.dmi',icon_state = "#673910")
T:thermite = 1
T.overlays.Cut()
T.overlays = image('icons/effects/effects.dmi',icon_state = "thermite")
return
on_mob_life(var/mob/living/M as mob)
@@ -1289,10 +1281,7 @@ datum
src = null
if(volume >= 3)
if(!istype(T, /turf/space))
var/obj/effect/decal/cleanable/greenglow/glow = locate(/obj/effect/decal/cleanable/greenglow, T)
if(!glow)
new /obj/effect/decal/cleanable/greenglow(T)
return
new /obj/effect/decal/cleanable/greenglow(T)
aluminum
name = "Aluminum"
@@ -1351,6 +1340,7 @@ datum
O.clean_blood()
reaction_turf(var/turf/T, var/volume)
if(volume >= 1)
T.overlays.Cut()
T.clean_blood()
for(var/obj/effect/decal/cleanable/C in src)
del(C)
@@ -2402,16 +2392,11 @@ datum
victim.Weaken(5)
//victim.Paralyse(10)
//victim.drop_item()
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(prob(5))
M.visible_message("<span class='warning'>[M] [pick("dry heaves!","coughs!","splutters!")]</span>")
return
frostoil
name = "Frost Oil"
id = "frostoil"
description = "A special oil that noticably chills the body. Extracted from Ice Peppers."
description = "A special oil that noticably chills the body. Extraced from Icepeppers."
reagent_state = LIQUID
color = "#B31008" // rgb: 139, 166, 233
@@ -2473,7 +2458,7 @@ datum
hot_coco
name = "Hot Chocolate"
id = "hot_coco"
description = "Made with love! And cocoa beans."
description = "Made with love! And coco beans."
reagent_state = LIQUID
nutriment_factor = 2 * REAGENTS_METABOLISM
color = "#403010" // rgb: 64, 48, 16
+3 -1
View File
@@ -448,12 +448,14 @@ datum
secondary = 1
on_reaction(var/datum/reagents/holder, var/created_volume)
var/location = get_turf(holder.my_atom)
var/datum/effect/effect/system/smoke_spread/chem/S = new /datum/effect/effect/system/smoke_spread/chem
var/datum/effect/effect/system/chem_smoke_spread/S = new /datum/effect/effect/system/chem_smoke_spread
S.attach(location)
S.set_up(holder, 10, 0, location)
playsound(location, 'sound/effects/smoke.ogg', 50, 1, -3)
spawn(0)
S.start()
sleep(10)
S.start()
holder.clear_reagents()
return