From fd928d4b5fb213313241afaa850fa6b764455a59 Mon Sep 17 00:00:00 2001 From: Chinsky Date: Tue, 5 Nov 2013 02:44:39 +0400 Subject: [PATCH] Cleaned the fuck out of smoke. --- code/ATMOSPHERICS/pipes.dm | 2 +- code/WorkInProgress/Cib/amorph/life.dm | 2 +- code/WorkInProgress/explosion_particles.dm | 2 +- code/datums/spell.dm | 4 +- code/game/gamemodes/events/ninja_abilities.dm | 2 +- code/game/machinery/computer/computer.dm | 2 +- code/game/mecha/combat/marauder.dm | 2 +- code/game/objects/effects/effect_system.dm | 466 +++++------------- .../items/weapons/grenades/smokebomb.dm | 4 +- code/game/objects/items/weapons/scrolls.dm | 2 +- code/modules/awaymissions/trigger.dm | 4 +- .../mob/living/carbon/alien/humanoid/life.dm | 2 +- .../mob/living/carbon/alien/larva/life.dm | 2 +- code/modules/mob/living/carbon/human/life.dm | 2 +- code/modules/mob/living/carbon/monkey/life.dm | 2 +- code/modules/mob/living/simple_animal/bees.dm | 2 +- .../living/simple_animal/hostile/hivebot.dm | 2 +- code/modules/organs/organ_external.dm | 2 +- code/modules/power/apc.dm | 2 +- code/modules/power/smes.dm | 4 +- code/modules/reagents/Chemistry-Reagents.dm | 2 +- code/modules/reagents/Chemistry-Recipes.dm | 2 +- code/unused/new_year.dm | 2 +- code/unused/spells.dm | 4 +- 24 files changed, 158 insertions(+), 364 deletions(-) diff --git a/code/ATMOSPHERICS/pipes.dm b/code/ATMOSPHERICS/pipes.dm index ed755aac990..131eb8d8bef 100644 --- a/code/ATMOSPHERICS/pipes.dm +++ b/code/ATMOSPHERICS/pipes.dm @@ -161,7 +161,7 @@ obj/machinery/atmospherics/pipe proc/burst() src.visible_message("\red \bold [src] bursts!"); playsound(src.loc, 'sound/effects/bang.ogg', 25, 1) - var/datum/effect/effect/system/harmless_smoke_spread/smoke = new + var/datum/effect/effect/system/smoke_spread/smoke = new smoke.set_up(1,0, src.loc, 0) smoke.start() del(src) diff --git a/code/WorkInProgress/Cib/amorph/life.dm b/code/WorkInProgress/Cib/amorph/life.dm index 14c4d41ccab..e23662bbbba 100644 --- a/code/WorkInProgress/Cib/amorph/life.dm +++ b/code/WorkInProgress/Cib/amorph/life.dm @@ -148,7 +148,7 @@ if(!block) - for(var/obj/effect/effect/chem_smoke/smoke in view(1, src)) + for(var/obj/effect/effect/smoke/chem/smoke in view(1, src)) if(smoke.reagents.total_volume) smoke.reagents.reaction(src, INGEST) spawn(5) diff --git a/code/WorkInProgress/explosion_particles.dm b/code/WorkInProgress/explosion_particles.dm index 11e2cc4f01f..90020e50801 100644 --- a/code/WorkInProgress/explosion_particles.dm +++ b/code/WorkInProgress/explosion_particles.dm @@ -65,6 +65,6 @@ P.set_up(10,location) P.start() spawn(5) - var/datum/effect/effect/system/harmless_smoke_spread/S = new/datum/effect/effect/system/harmless_smoke_spread() + var/datum/effect/effect/system/smoke_spread/S = new/datum/effect/effect/system/smoke_spread() S.set_up(5,0,location,null) S.start() \ No newline at end of file diff --git a/code/datums/spell.dm b/code/datums/spell.dm index 75f2d5f3e5f..346ba7ce299 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -173,11 +173,11 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin sparks.start() if(smoke_spread) if(smoke_spread == 1) - var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread() + var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread() smoke.set_up(smoke_amt, 0, location) //no idea what the 0 is smoke.start() else if(smoke_spread == 2) - var/datum/effect/effect/system/bad_smoke_spread/smoke = new /datum/effect/effect/system/bad_smoke_spread() + var/datum/effect/effect/system/smoke_spread/bad/smoke = new /datum/effect/effect/system/smoke_spread/bad() smoke.set_up(smoke_amt, 0, location) //no idea what the 0 is smoke.start() diff --git a/code/game/gamemodes/events/ninja_abilities.dm b/code/game/gamemodes/events/ninja_abilities.dm index 9245c740e07..641bdf77ce6 100644 --- a/code/game/gamemodes/events/ninja_abilities.dm +++ b/code/game/gamemodes/events/ninja_abilities.dm @@ -57,7 +57,7 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo if(!ninjacost(,2)) var/mob/living/carbon/human/U = affecting U << "\blue There are [s_bombs] smoke bombs remaining." - var/datum/effect/effect/system/bad_smoke_spread/smoke = new /datum/effect/effect/system/bad_smoke_spread() + var/datum/effect/effect/system/smoke_spread/bad/smoke = new /datum/effect/effect/system/smoke_spread/bad() smoke.set_up(10, 0, U.loc) smoke.start() playsound(U.loc, 'sound/effects/bamf.ogg', 50, 2) diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm index ae0dc3c5c36..c47eb1f9136 100644 --- a/code/game/machinery/computer/computer.dm +++ b/code/game/machinery/computer/computer.dm @@ -27,7 +27,7 @@ for(var/x in verbs) verbs -= x set_broken() - var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread() + var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread() smoke.set_up(5, 0, src) smoke.start() return diff --git a/code/game/mecha/combat/marauder.dm b/code/game/mecha/combat/marauder.dm index fdce02f5d2e..cdb3645c62d 100644 --- a/code/game/mecha/combat/marauder.dm +++ b/code/game/mecha/combat/marauder.dm @@ -14,7 +14,7 @@ var/smoke = 5 var/smoke_ready = 1 var/smoke_cooldown = 100 - var/datum/effect/effect/system/harmless_smoke_spread/smoke_system = new + var/datum/effect/effect/system/smoke_spread/smoke_system = new operation_req_access = list(access_cent_specops) wreckage = /obj/effect/decal/mecha_wreckage/marauder add_req_access = 0 diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index c0f783c52d6..8d2d69a654f 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -21,15 +21,6 @@ would spawn and follow the beaker, even if it is carried or thrown. flags = TABLEPASS mouse_opacity = 0 -/obj/effect/effect/smoke - name = "smoke" - icon = 'icons/effects/water.dmi' - icon_state = "smoke" - opacity = 1 - anchored = 0.0 - mouse_opacity = 0 - var/amount = 8.0 - /obj/effect/proc/delete() loc = null if(reagents) @@ -222,196 +213,186 @@ steam.start() -- spawns the effect ///////////////////////////////////////////// -/obj/effect/effect/harmless_smoke +/obj/effect/effect/smoke name = "smoke" icon_state = "smoke" opacity = 1 anchored = 0.0 mouse_opacity = 0 var/amount = 6.0 + var/time_to_live = 100 + //Remove this bit to use the old smoke icon = 'icons/effects/96x96.dmi' pixel_x = -32 pixel_y = -32 -/obj/effect/effect/harmless_smoke/New() +/obj/effect/effect/smoke/New() ..() - spawn (100) + spawn (time_to_live) delete() return -/obj/effect/effect/harmless_smoke/Move() +/obj/effect/effect/smoke/HasEntered(mob/living/carbon/M as mob ) ..() - return - -/datum/effect/effect/system/harmless_smoke_spread - var/total_smoke = 0 // To stop it being spammed and lagging! - var/direction - - set_up(n = 5, c = 0, loca, direct) - if(n > 10) - n = 10 - number = n - cardinals = c - if(istype(loca, /turf/)) - location = loca - else - location = get_turf(loca) - if(direct) - direction = direct - - - start() - var/i = 0 - for(i=0, i 20) - return - spawn(0) - if(holder) - src.location = get_turf(holder) - var/obj/effect/effect/harmless_smoke/smoke = new /obj/effect/effect/harmless_smoke(src.location) - src.total_smoke++ - var/direction = src.direction - if(!direction) - if(src.cardinals) - direction = pick(cardinal) - else - direction = pick(alldirs) - for(i=0, i 20) - n = 20 - number = n - cardinals = c - if(istype(loca, /turf/)) - location = loca - else - location = get_turf(loca) - if(direct) - direction = direct +/datum/effect/effect/system/smoke_spread/set_up(n = 5, c = 0, loca, direct) + if(n > 10) + n = 10 + number = n + cardinals = c + if(istype(loca, /turf/)) + location = loca + else + location = get_turf(loca) + if(direct) + direction = direct - start() - var/i = 0 - for(i=0, i 20) - return - spawn(0) - if(holder) - src.location = get_turf(holder) - var/obj/effect/effect/bad_smoke/smoke = new /obj/effect/effect/bad_smoke(src.location) - src.total_smoke++ - var/direction = src.direction - if(!direction) - if(src.cardinals) - direction = pick(cardinal) - else - direction = pick(alldirs) - for(i=0, i 20) + return + spawn(0) + if(holder) + src.location = get_turf(holder) + var/obj/effect/effect/smoke/smoke = new smoke_type(src.location) + src.total_smoke++ + var/direction = src.direction + if(!direction) + if(src.cardinals) + direction = pick(cardinal) + else + direction = pick(alldirs) + for(i=0, i 20) - n = 20 - number = n - cardinals = c - if(istype(loca, /turf/)) - location = loca - else - location = get_turf(loca) - if(direct) - direction = direct - - - start() - var/i = 0 - for(i=0, i 20) - return - spawn(0) - if(holder) - src.location = get_turf(holder) - var/obj/effect/effect/sleep_smoke/smoke = new /obj/effect/effect/sleep_smoke(src.location) - src.total_smoke++ - var/direction = src.direction - if(!direction) - if(src.cardinals) - direction = pick(cardinal) - else - direction = pick(alldirs) - for(i=0, i 20) - n = 20 - number = n - cardinals = c - if(istype(loca, /turf/)) - location = loca - else - location = get_turf(loca) - if(direct) - direction = direct - - start() - var/i = 0 - for(i=0, i 20) - return - spawn(0) - if(holder) - src.location = get_turf(holder) - var/obj/effect/effect/mustard_gas/smoke = new /obj/effect/effect/mustard_gas(src.location) - src.total_smoke++ - var/direction = src.direction - if(!direction) - if(src.cardinals) - direction = pick(cardinal) - else - direction = pick(alldirs) - for(i=0, iThe [src] warps in!") diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index aabb225cf9b..38e4e473074 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -418,7 +418,7 @@ This function completely restores a damaged organ to perfect condition. if(status & ORGAN_DESTROYED) owner.update_body(1) else - UpdateDamageIcon(1) + owner.UpdateDamageIcon(1) return 1 return 0 diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 7a68873fd1e..599d2517236 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -962,7 +962,7 @@ cell.corrupt() src.malfhack = 1 update_icon() - var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread() + var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread() smoke.set_up(3, 0, src.loc) smoke.attach(src) smoke.start() diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index ecc7acb8173..86e2351d50d 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -303,7 +303,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/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread() + var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread() smoke.set_up(3, 0, src.loc) smoke.attach(src) smoke.start() @@ -321,7 +321,7 @@ emp_act(2) if(prob(5)) //smoke only world << "\red SMES smoke in [src.loc.loc]" - var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread() + var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread() smoke.set_up(3, 0, src.loc) smoke.attach(src) smoke.start() diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 2121ce13aa7..d760a8e5559 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -31,7 +31,7 @@ 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/chem_smoke)) + 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) diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index 07c1c778690..07c9883f2ed 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -433,7 +433,7 @@ datum secondary = 1 on_reaction(var/datum/reagents/holder, var/created_volume) var/location = get_turf(holder.my_atom) - var/datum/effect/effect/system/chem_smoke_spread/S = new /datum/effect/effect/system/chem_smoke_spread + var/datum/effect/effect/system/smoke_spread/chem/S = new /datum/effect/effect/system/smoke_spread/chem S.attach(location) S.set_up(holder, 10, 0, location) playsound(location, 'sound/effects/smoke.ogg', 50, 1, -3) diff --git a/code/unused/new_year.dm b/code/unused/new_year.dm index 1b2d7375640..3a3bf5a4c18 100644 --- a/code/unused/new_year.dm +++ b/code/unused/new_year.dm @@ -95,7 +95,7 @@ playsound(src.loc, 'sound/effects/bang.ogg', 25, 1) var/turf/T = get_turf(src) if(T) - var/datum/effect/effect/system/harmless_smoke_spread/smoke = new + var/datum/effect/effect/system/smoke_spread/smoke = new smoke.set_up(3, 0, src.loc) smoke.attach(src) smoke.start() diff --git a/code/unused/spells.dm b/code/unused/spells.dm index ea514932cc7..c5b85d39e66 100644 --- a/code/unused/spells.dm +++ b/code/unused/spells.dm @@ -318,7 +318,7 @@ if(T.y>world.maxy-4 || T.y<4) continue turfs += T if(!turfs.len) turfs += pick(/turf in orange(6)) - var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread() + var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread() smoke.set_up(10, 0, usr.loc) smoke.start() var/turf/picked = pick(turfs) @@ -360,7 +360,7 @@ usr.say("SCYAR NILA [uppertext(A)]") - var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread() + var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread() smoke.set_up(5, 0, usr.loc) smoke.attach(usr) smoke.start()