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
+2 -2
View File
@@ -31,11 +31,11 @@
s.start()
if(entersmoke)
var/datum/effect/effect/system/smoke_spread/s = new /datum/effect/effect/system/smoke_spread
var/datum/effect/effect/system/harmless_smoke_spread/s = new /datum/effect/effect/system/harmless_smoke_spread
s.set_up(4, 1, src, 0)
s.start()
if(exitsmoke)
var/datum/effect/effect/system/smoke_spread/s = new /datum/effect/effect/system/smoke_spread
var/datum/effect/effect/system/harmless_smoke_spread/s = new /datum/effect/effect/system/harmless_smoke_spread
s.set_up(4, 1, dest, 0)
s.start()
+1 -1
View File
@@ -30,7 +30,7 @@
R.my_atom = vent
R.add_reagent(pick(gunk), 50)
var/datum/effect/effect/system/smoke_spread/chem/smoke = new
var/datum/effect/effect/system/chem_smoke_spread/smoke = new
smoke.set_up(R, rand(1, 2), 0, vent, 0, silent = 1)
playsound(vent.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
smoke.start()
@@ -130,7 +130,7 @@
breath = loc.remove_air(breath_moles)
// Handle chem smoke effect -- Doohl
for(var/obj/effect/effect/smoke/chem/smoke in view(1, src))
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
if(smoke.reagents.total_volume)
smoke.reagents.reaction(src, INGEST)
spawn(5)
@@ -103,7 +103,7 @@
breath = loc.remove_air(breath_moles)
// Handle chem smoke effect -- Doohl
for(var/obj/effect/effect/smoke/chem/smoke in view(1, src))
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
if(smoke.reagents.total_volume)
smoke.reagents.reaction(src, INGEST)
spawn(5)
+1 -1
View File
@@ -395,7 +395,7 @@
if(!block)
for(var/obj/effect/effect/smoke/chem/smoke in view(1, src))
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
if(smoke.reagents.total_volume)
smoke.reagents.reaction(src, INGEST)
spawn(5)
@@ -134,7 +134,6 @@
heal_overall_damage(rads,rads)
adjustOxyLoss(-(rads))
adjustToxLoss(-(rads))
updatehealth()
return
if (radiation > 100)
@@ -148,7 +147,6 @@
radiation--
if(prob(25))
adjustToxLoss(1)
updatehealth()
if(50 to 74)
radiation -= 2
@@ -158,7 +156,6 @@
Weaken(3)
src << "\red You feel weak."
emote("collapse")
updatehealth()
if(75 to 100)
radiation -= 3
@@ -257,7 +254,8 @@
block = 1
if(!block)
for(var/obj/effect/effect/smoke/chem/smoke in view(1, src))
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
if(smoke.reagents.total_volume)
smoke.reagents.reaction(src, INGEST)
spawn(5)
@@ -483,12 +481,9 @@
else
dizziness = max(0, dizziness - 1)
updatehealth()
return //TODO: DEFERRED
proc/handle_regular_status_updates()
updatehealth()
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
blinded = 1
@@ -92,7 +92,7 @@
//smoke, water and steam calms us down
var/calming = 0
var/list/calmers = list(/obj/effect/effect/smoke/chem, \
var/list/calmers = list(/obj/effect/effect/chem_smoke, \
/obj/effect/effect/water, \
/obj/effect/effect/foam, \
/obj/effect/effect/steam, \
@@ -79,7 +79,7 @@
New()
..()
var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread()
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
smoke.set_up(5, 0, src.loc)
smoke.start()
visible_message("\red <B>The [src] warps in!</B>")
-5
View File
@@ -319,7 +319,6 @@ This function completely restores a damaged organ to perfect condition.
perma_injury = 0
update_germs()
update_icon()
return
//Updating germ levels. Handles organ germ levels and necrosis.
@@ -451,10 +450,6 @@ This function completely restores a damaged organ to perfect condition.
var/n_is = damage_state_text()
if (n_is != damage_state)
damage_state = n_is
if(status & ORGAN_DESTROYED)
owner.update_body(1)
else
owner.UpdateDamageIcon(1)
return 1
return 0
+1 -1
View File
@@ -1009,7 +1009,7 @@
cell.corrupt()
src.malfhack = 1
update_icon()
var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread()
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
smoke.set_up(3, 0, src.loc)
smoke.attach(src)
smoke.start()
+2 -2
View File
@@ -274,7 +274,7 @@
for(var/mob/M in viewers(src))
M.show_message("\red The [src.name] is making strange noises!", 3, "\red You hear sizzling electronics.", 2)
sleep(10*pick(4,5,6,7,10,14))
var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread()
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
smoke.set_up(3, 0, src.loc)
smoke.attach(src)
smoke.start()
@@ -292,7 +292,7 @@
emp_act(2)
if(prob(5)) //smoke only
world << "\red SMES smoke in [src.loc.loc]"
var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread()
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
smoke.set_up(3, 0, src.loc)
smoke.attach(src)
smoke.start()
+1 -1
View File
@@ -106,7 +106,7 @@
/obj/item/weapon/gun/magic/wand/teleport/zap_self(mob/living/user as mob)
do_teleport(user, user, 10)
var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread()
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
smoke.set_up(10, 0, user.loc)
smoke.start()
charges--
+1 -1
View File
@@ -87,7 +87,7 @@
if(!stuff.anchored && stuff.loc)
teleammount++
do_teleport(stuff, stuff, 10)
var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread()
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
smoke.set_up(max(round(10 - teleammount),1), 0, stuff.loc) //Smoke drops off if a lot of stuff is moved for the sake of sanity
smoke.start()
+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
+1 -1
View File
@@ -218,7 +218,7 @@
return
Bumped(var/atom/movable/AM) //Go straight into the chute
if(istype(AM, /obj/item/projectile) || istype(AM, /obj/effect)) return
if(istype(AM, /obj/item/projectile)) return
switch(dir)
if(NORTH)
if(AM.loc.y != src.loc.y+1) return
@@ -37,7 +37,7 @@ datum/chemical_reaction/coolant
explode()
/obj/structure/reagent_dispensers/coolanttank/proc/explode()
var/datum/effect/effect/system/smoke_spread/S = new /datum/effect/effect/system/smoke_spread
var/datum/effect/effect/system/harmless_smoke_spread/S = new /datum/effect/effect/system/harmless_smoke_spread
//S.attach(src)
S.set_up(5, 0, src.loc)