From 9e71ddd20819fccc00e147594c825c05e817daab Mon Sep 17 00:00:00 2001 From: uraniummeltdown Date: Mon, 30 Oct 2017 20:54:17 +0400 Subject: [PATCH 01/11] splits effect_system.dm into multiple files --- code/game/objects/effects/effect_system.dm | 1276 ----------------- .../effects/effect_system/effect_system.dm | 62 + .../effects/effect_system/effects_foam.dm | 257 ++++ .../effects/effect_system/effects_other.dm | 176 +++ .../effects/effect_system/effects_smoke.dm | 489 +++++++ .../effects/effect_system/effects_sparks.dm | 148 ++ .../effects/effect_system/effects_water.dm | 131 ++ paradise.dme | 7 +- 8 files changed, 1269 insertions(+), 1277 deletions(-) delete mode 100644 code/game/objects/effects/effect_system.dm create mode 100644 code/game/objects/effects/effect_system/effect_system.dm create mode 100644 code/game/objects/effects/effect_system/effects_foam.dm create mode 100644 code/game/objects/effects/effect_system/effects_other.dm create mode 100644 code/game/objects/effects/effect_system/effects_smoke.dm create mode 100644 code/game/objects/effects/effect_system/effects_sparks.dm create mode 100644 code/game/objects/effects/effect_system/effects_water.dm diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm deleted file mode 100644 index 6cf11f4f3c8..00000000000 --- a/code/game/objects/effects/effect_system.dm +++ /dev/null @@ -1,1276 +0,0 @@ -/* This is an attempt to make some easily reusable "particle" type effect, to stop the code -constantly having to be rewritten. An item like the jetpack that uses the ion_trail_follow system, just has one -defined, then set up when it is created with New(). Then this same system can just be reused each time -it needs to create more trails.A beaker could have a steam_trail_follow system set up, then the steam -would spawn and follow the beaker, even if it is carried or thrown. -*/ - - -/obj/effect/effect - name = "effect" - icon = 'icons/effects/effects.dmi' - mouse_opacity = 0 - unacidable = 1//So effect are not targeted by alien acid. - -/obj/effect/effect/New() - ..() - if(ticker) - cameranet.updateVisibility(src) - -/obj/effect/effect/Destroy() - if(ticker) - cameranet.updateVisibility(src) - return ..() - -/datum/effect/proc/fadeOut(var/atom/A, var/frames = 16) - if(A.alpha == 0) //Handle already transparent case - return - if(frames == 0) - frames = 1 //We will just assume that by 0 frames, the coder meant "during one frame". - var/step = A.alpha / frames - for(var/i = 0, i < frames, i++) - A.alpha -= step - sleep(world.tick_lag) - return - -/obj/effect/effect/water - name = "water" - icon = 'icons/effects/effects.dmi' - icon_state = "extinguish" - var/life = 15.0 - 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() - qdel(src) - - -/obj/effect/effect/water/New() - ..() - //var/turf/T = src.loc - //if(istype(T, /turf)) - // T.firelevel = 0 //TODO: FIX - spawn( 70 ) - delete() - return - return - -/obj/effect/effect/water/Move(turf/newloc) - //var/turf/T = src.loc - //if(istype(T, /turf)) - // T.firelevel = 0 //TODO: FIX - if(--src.life < 1) - //SN src = null - delete() - if(newloc.density) - return 0 - .=..() - -/obj/effect/effect/water/Bump(atom/A) - if(reagents) - reagents.reaction(A) - if(istype(A,/atom/movable)) - var/atom/movable/AM = A - AM.water_act(life, 310.15, src) - return ..() - - -/datum/effect/system - var/number = 3 - var/cardinals = 0 - var/turf/location - var/atom/holder - var/setup = 0 - - Destroy() - holder = null - location = null - return ..() - - proc/set_up(n = 3, c = 0, turf/loc) - if(n > 10) - n = 10 - number = n - cardinals = c - location = loc - setup = 1 - - proc/attach(atom/atom) - holder = atom - - proc/start() - - -///////////////////////////////////////////// -// GENERIC STEAM SPREAD SYSTEM - -//Usage: set_up(number of bits of steam, use North/South/East/West only, spawn location) -// The attach(atom/atom) proc is optional, and can be called to attach the effect -// to something, like a smoking beaker, so then you can just call start() and the steam -// will always spawn at the items location, even if it's moved. - -/* Example: -var/datum/effect/system/steam_spread/steam = new /datum/effect/system/steam_spread() -- creates new system -steam.set_up(5, 0, mob.loc) -- sets up variables -OPTIONAL: steam.attach(mob) -steam.start() -- spawns the effect -*/ -///////////////////////////////////////////// -/obj/effect/effect/steam - name = "steam" - icon = 'icons/effects/effects.dmi' - icon_state = "extinguish" - density = 0 - -/datum/effect/system/steam_spread - - set_up(n = 3, c = 0, turf/loc) - if(n > 10) - n = 10 - number = n - cardinals = c - location = loc - - start() - var/i = 0 - for(i=0, i 10) - n = 10 - number = n - cardinals = c - if(istype(loca, /turf/)) - location = loca - else - location = get_turf(loca) - - start() - var/i = 0 - for(i=0, i 20) - return - spawn(0) - if(holder) - src.location = get_turf(holder) - var/obj/effect/effect/sparks/sparks = new /obj/effect/effect/sparks(src.location) - src.total_sparks++ - var/direction - if(src.cardinals) - direction = pick(cardinal) - else - direction = pick(alldirs) - for(i=0, i 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 - - 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) - n = 20 - number = n - cardinals = c - carry.copy_to(chemholder, carry.total_volume) - - - if(istype(loca, /turf/)) - location = loca - else - location = get_turf(loca) - if(direct) - direction = direct - if(!silent) - var/contained = "" - for(var/reagent in carry.reagent_list) - contained += " [reagent] " - if(contained) - contained = "\[[contained]\]" - var/area/A = get_area(location) - - var/where = "[A.name] | [location.x], [location.y]" - var/whereLink = "[where]" - - if(carry && carry.my_atom) - if(carry.my_atom.fingerprintslast) - var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast) - var/more = "" - if(M) - more = " " - msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1) - log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].") - else - msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1) - log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.") - else - msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink]). No associated key. CODERS: carry.my_atom may be null.", 0, 1) - log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key. CODERS: carry.my_atom may be null.") - - start(effect_range = 2) - var/i = 0 - - var/color = mix_color_from_reagents(chemholder.reagents.reagent_list) - var/obj/effect/effect/chem_smoke/smokeholder = new /obj/effect/effect/chem_smoke(src.location) - for(var/atom/A in view(effect_range, smokeholder)) - chemholder.reagents.reaction(A) - if(iscarbon(A)) - var/mob/living/carbon/C = A - if(C.can_breathe_gas()) - chemholder.reagents.copy_to(C, chemholder.reagents.total_volume) - qdel(smokeholder) - for(i=0, i 20) - return - spawn(0) - if(holder) - src.location = get_turf(holder) - var/obj/effect/effect/chem_smoke/smoke = new /obj/effect/effect/chem_smoke(src.location) - src.total_smoke++ - var/direction = src.direction - if(!direction) - if(src.cardinals) - direction = pick(cardinal) - else - direction = pick(alldirs) - - if(color) - smoke.icon += color // give the smoke color, if it has any to begin with - else - // if no color, just use the old smoke icon - smoke.icon = 'icons/effects/96x96.dmi' - smoke.icon_state = "smoke" - 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, i[user] smashes through \the [src].", "You smash through \the [src].") - qdel(src) - else - to_chat(user, "You hit the metal foam but bounce off it.") - -/obj/structure/foamedmetal/attackby(var/obj/item/I, var/mob/user, params) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - if(istype(I, /obj/item/weapon/grab)) - var/obj/item/weapon/grab/G = I - G.affecting.loc = src.loc - user.visible_message("[G.assailant] smashes [G.affecting] through the foamed metal wall.") - qdel(I) - qdel(src) - return - - if(prob(I.force*20 - metal*25)) - user.visible_message("[user] smashes through the foamed metal with \the [I].", "You smash through the foamed metal with \the [I].") - qdel(src) - else - to_chat(user, "You hit the metal foam to no effect.") - -/obj/structure/foamedmetal/attack_animal(mob/living/simple_animal/M) - M.do_attack_animation(src) - if(M.melee_damage_upper == 0) - M.visible_message("[M] nudges \the [src].") - else - if(M.attack_sound) - playsound(loc, M.attack_sound, 50, 1, 1) - M.visible_message("\The [M] [M.attacktext] [src]!") - qdel(src) - -/obj/structure/foamedmetal/attack_alien(mob/living/carbon/alien/humanoid/M) - M.visible_message("[M] tears apart \the [src]!"); - qdel(src) - -/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5) - return !density - -/obj/structure/foamedmetal/CanAtmosPass() - return !density - -/datum/effect/system/reagents_explosion - var/amount // TNT equivalent - var/flashing = 0 // does explosion creates flash effect? - var/flashing_factor = 0 // factor of how powerful the flash effect relatively to the explosion - - set_up (amt, loc, flash = 0, flash_fact = 0) - amount = amt - if(istype(loc, /turf/)) - location = loc - else - location = get_turf(loc) - - flashing = flash - flashing_factor = flash_fact - - return - - start() - if(amount <= 2) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread - s.set_up(2, 1, location) - s.start() - - for(var/mob/M in viewers(5, location)) - to_chat(M, "The solution violently explodes.") - for(var/mob/M in viewers(1, location)) - if(prob (50 * amount)) - to_chat(M, "The explosion knocks you down.") - M.Weaken(rand(1,5)) - return - else - var/devastation = -1 - var/heavy = -1 - var/light = -1 - var/flash = -1 - - // Clamp all values to MAX_EXPLOSION_RANGE - if(round(amount/12) > 0) - devastation = min (MAX_EX_DEVESTATION_RANGE, devastation + round(amount/12)) - - if(round(amount/6) > 0) - heavy = min (MAX_EX_HEAVY_RANGE, heavy + round(amount/6)) - - if(round(amount/3) > 0) - light = min (MAX_EX_LIGHT_RANGE, light + round(amount/3)) - - if(flash && flashing_factor) - flash += (round(amount/4) * flashing_factor) - - for(var/mob/M in viewers(8, location)) - to_chat(M, "The solution violently explodes.") - - explosion(location, devastation, heavy, light, flash) - - proc/holder_damage(var/atom/holder) - if(holder) - var/dmglevel = 4 - - if(round(amount/8) > 0) - dmglevel = 1 - else if(round(amount/4) > 0) - dmglevel = 2 - else if(round(amount/2) > 0) - dmglevel = 3 - - if(dmglevel<4) holder.ex_act(dmglevel) - - -////////////////////////////////// -//////SPARKLE FIREWORKS -///////////////////////////////// -//////////////////////////// -/obj/effect/sparkles - name = "sparkle" - icon = 'icons/obj/fireworks.dmi'//findback - icon_state = "sparkel" - var/amount = 6.0 - anchored = 1.0 - mouse_opacity = 0 - -/obj/effect/sparkles/New() - ..() - var/icon/I = new(src.icon,src.icon_state) - var/r = rand(0,255) - var/g = rand(0,255) - var/b = rand(0,255) - I.Blend(rgb(r,g,b),ICON_MULTIPLY) - src.icon = I - playsound(src.loc, "sparks", 100, 1) - var/turf/T = src.loc - if(istype(T, /turf)) - T.hotspot_expose(3000,100) - spawn (100) - qdel(src) - return - -/obj/effect/sparkles/Destroy() - var/turf/T = src.loc - if(istype(T, /turf)) - T.hotspot_expose(3000,100) - return ..() - -/obj/effect/sparkles/Move() - ..() - var/turf/T = src.loc - if(istype(T, /turf)) - T.hotspot_expose(3000,100) - return - - -/datum/effect/system/sparkle_spread - var/total_sparks = 0 // To stop it being spammed and lagging! - -/datum/effect/system/sparkle_spread/set_up(n = 3, c = 0, loca) - if(n > 10) - n = 10 - number = n - cardinals = c - if(istype(loca, /turf/)) - location = loca - else - location = get_turf(loca) - -/datum/effect/system/sparkle_spread/start() - var/i = 0 - for(i=0, i 20) - return - spawn(0) - if(holder) - src.location = get_turf(holder) - var/obj/effect/sparkles/sparks = new(src.location) - src.total_sparks++ - var/direction - if(src.cardinals) - direction = pick(cardinal) - else - direction = pick(alldirs) - for(i=0, i 10) + n = 10 + number = n + cardinals = c + location = loc + setup = 1 + + proc/attach(atom/atom) + holder = atom + + proc/start() diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm new file mode 100644 index 00000000000..20eb653c185 --- /dev/null +++ b/code/game/objects/effects/effect_system/effects_foam.dm @@ -0,0 +1,257 @@ +// Foam +// Similar to smoke, but spreads out more +// metal foams leave behind a foamed metal wall + +/obj/structure/foam + name = "foam" + icon = 'icons/effects/effects.dmi' + icon_state = "foam" + opacity = 0 + anchored = 1 + density = 0 + layer = OBJ_LAYER + 0.9 + mouse_opacity = 0 + animate_movement = 0 + var/amount = 3 + var/expand = 1 + var/metal = 0 + + +/obj/structure/foam/New(loc, var/ismetal=0) + ..(loc) + icon_state = "[ismetal ? "m":""]foam" + if(!ismetal && reagents) + color = mix_color_from_reagents(reagents.reagent_list) + metal = ismetal + playsound(src, 'sound/effects/bubbles2.ogg', 80, 1, -3) + spawn(3 + metal*3) + process() + spawn(120) + processing_objects.Remove(src) + sleep(30) + + if(metal) + var/turf/T = get_turf(src) + if(istype(T, /turf/space)) + T.ChangeTurf(/turf/simulated/floor/plating/metalfoam) + var/turf/simulated/floor/plating/metalfoam/MF = get_turf(src) + MF.metal = metal + MF.update_icon() + + var/obj/structure/foamedmetal/M = new(src.loc) + M.metal = metal + M.updateicon() + + flick("[icon_state]-disolve", src) + sleep(5) + qdel(src) + return + +// on delete, transfer any reagents to the floor +/obj/structure/foam/Destroy() + if(!metal && reagents) + reagents.handle_reactions() + for(var/atom/A in oview(1, src)) + if(A == src) + continue + if(reagents.total_volume) + var/fraction = 5 / reagents.total_volume + reagents.reaction(A, TOUCH, fraction) + return ..() + +/obj/structure/foam/process() + if(--amount < 0) + return + + + for(var/direction in cardinal) + + + var/turf/T = get_step(src,direction) + if(!T) + continue + + if(!T.Enter(src)) + continue + + var/obj/structure/foam/F = locate() in T + if(F) + continue + + F = new /obj/structure/foam(T, metal) + F.amount = amount + if(!metal) + F.create_reagents(15) + if(reagents) + for(var/datum/reagent/R in reagents.reagent_list) + F.reagents.add_reagent(R.id, min(R.volume, 3), R.data, reagents.chem_temp) + F.color = mix_color_from_reagents(reagents.reagent_list) + +// foam disolves when heated +// except metal foams +/obj/structure/foam/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + if(!metal && prob(max(0, exposed_temperature - 475))) + flick("[icon_state]-disolve", src) + + spawn(5) + qdel(src) + + +/obj/structure/foam/Crossed(var/atom/movable/AM) + if(metal) + return + + if(istype(AM, /mob/living/carbon)) + var/mob/living/carbon/M = AM + if(M.slip("foam", 5, 2)) + if(reagents) + for(var/reagent_id in reagents.reagent_list) + var/amount = M.reagents.get_reagent_amount(reagent_id) + if(amount < 25) + M.reagents.add_reagent(reagent_id, min(round(amount / 2), 15)) + if(reagents.total_volume) + var/fraction = 5 / reagents.total_volume + reagents.reaction(M, TOUCH, fraction) + + +/datum/effect/system/foam_spread + var/amount = 5 // the size of the foam spread. + var/list/carried_reagents // the IDs of reagents present when the foam was mixed + var/metal = 0 // 0=foam, 1=metalfoam, 2=ironfoam + var/temperature = T0C + var/list/banned_reagents = list("smoke_powder", "fluorosurfactant", "stimulants") + +/datum/effect/system/foam_spread/set_up(amt=5, loca, var/datum/reagents/carry = null, var/metalfoam = 0) + amount = min(round(amt/5, 1), 7) + if(istype(loca, /turf/)) + location = loca + else + location = get_turf(loca) + + carried_reagents = list() + metal = metalfoam + temperature = carry.chem_temp + + // bit of a hack here. Foam carries along any reagent also present in the glass it is mixed + // with (defaults to water if none is present). Rather than actually transfer the reagents, + // this makes a list of the reagent ids and spawns 1 unit of that reagent when the foam disolves. + + if(carry && !metal) + for(var/datum/reagent/R in carry.reagent_list) + carried_reagents[R.id] = R.volume + +/datum/effect/system/foam_spread/start() + spawn(0) + var/obj/structure/foam/F = locate() in location + if(F) + F.amount += amount + F.amount = min(F.amount, 27) + return + + F = new /obj/structure/foam(location, metal) + F.amount = amount + + if(!metal) // don't carry other chemicals if a metal foam + F.create_reagents(15) + + if(carried_reagents) + for(var/id in carried_reagents) + if(banned_reagents.Find("[id]")) + continue + var/datum/reagent/reagent_volume = carried_reagents[id] + F.reagents.add_reagent(id, min(reagent_volume, 3), null, temperature) + F.color = mix_color_from_reagents(F.reagents.reagent_list) + else + F.reagents.add_reagent("cleaner", 1) + F.color = mix_color_from_reagents(F.reagents.reagent_list) + +// wall formed by metal foams +// dense and opaque, but easy to break + + +/obj/structure/foamedmetal + icon = 'icons/effects/effects.dmi' + icon_state = "metalfoam" + density = 1 + opacity = 1 // changed in New() + anchored = 1 + name = "foamed metal" + desc = "A lightweight foamed metal wall." + var/metal = MFOAM_ALUMINUM + +/obj/structure/foamedmetal/initialize() + ..() + air_update_turf(1) + +/obj/structure/foamedmetal/Destroy() + density = 0 + air_update_turf(1) + return ..() + +/obj/structure/foamedmetal/Move() + var/turf/T = loc + ..() + move_update_air(T) + +/obj/structure/foamedmetal/proc/updateicon() + if(metal == MFOAM_ALUMINUM) + icon_state = "metalfoam" + else + icon_state = "ironfoam" + + +/obj/structure/foamedmetal/ex_act(severity) + qdel(src) + +/obj/structure/foamedmetal/blob_act() + qdel(src) + +/obj/structure/foamedmetal/bullet_act() + if(metal==MFOAM_ALUMINUM || prob(50)) + qdel(src) + +/obj/structure/foamedmetal/attack_hand(var/mob/user) + user.changeNext_move(CLICK_CD_MELEE) + user.do_attack_animation(src) + if((HULK in user.mutations) || (prob(75 - metal*25))) + user.visible_message("[user] smashes through \the [src].", "You smash through \the [src].") + qdel(src) + else + to_chat(user, "You hit the metal foam but bounce off it.") + +/obj/structure/foamedmetal/attackby(var/obj/item/I, var/mob/user, params) + user.changeNext_move(CLICK_CD_MELEE) + user.do_attack_animation(src) + if(istype(I, /obj/item/weapon/grab)) + var/obj/item/weapon/grab/G = I + G.affecting.loc = src.loc + user.visible_message("[G.assailant] smashes [G.affecting] through the foamed metal wall.") + qdel(I) + qdel(src) + return + + if(prob(I.force*20 - metal*25)) + user.visible_message("[user] smashes through the foamed metal with \the [I].", "You smash through the foamed metal with \the [I].") + qdel(src) + else + to_chat(user, "You hit the metal foam to no effect.") + +/obj/structure/foamedmetal/attack_animal(mob/living/simple_animal/M) + M.do_attack_animation(src) + if(M.melee_damage_upper == 0) + M.visible_message("[M] nudges \the [src].") + else + if(M.attack_sound) + playsound(loc, M.attack_sound, 50, 1, 1) + M.visible_message("\The [M] [M.attacktext] [src]!") + qdel(src) + +/obj/structure/foamedmetal/attack_alien(mob/living/carbon/alien/humanoid/M) + M.visible_message("[M] tears apart \the [src]!"); + qdel(src) + +/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5) + return !density + +/obj/structure/foamedmetal/CanAtmosPass() + return !density diff --git a/code/game/objects/effects/effect_system/effects_other.dm b/code/game/objects/effects/effect_system/effects_other.dm new file mode 100644 index 00000000000..69246db2859 --- /dev/null +++ b/code/game/objects/effects/effect_system/effects_other.dm @@ -0,0 +1,176 @@ +///////////////////////////////////////////// +//////// Attach an Ion trail to any object, that spawns when it moves (like for the jetpack) +/// just pass in the object to attach it to in set_up +/// Then do start() to start it and stop() to stop it, obviously +/// and don't call start() in a loop that will be repeated otherwise it'll get spammed! +///////////////////////////////////////////// + +/obj/effect/effect/ion_trails + name = "ion trails" + icon_state = "ion_trails" + anchored = 1.0 + +/datum/effect/system/ion_trail_follow + var/turf/oldposition + var/processing = 1 + var/on = 1 + +/datum/effect/system/ion_trail_follow/Destroy() + oldposition = null + return ..() + +/datum/effect/system/ion_trail_follow/set_up(atom/atom) + attach(atom) + +/datum/effect/system/ion_trail_follow/start() //Whoever is responsible for this abomination of code should become an hero + if(!src.on) + src.on = 1 + src.processing = 1 + if(src.processing) + src.processing = 0 + var/turf/T = get_turf(src.holder) + if(T != src.oldposition) + if(!has_gravity(T)) + var/obj/effect/effect/ion_trails/I = new /obj/effect/effect/ion_trails(src.oldposition) + I.dir = src.holder.dir + flick("ion_fade", I) + I.icon_state = "" + spawn( 20 ) + if(I) + I.delete() + src.oldposition = T + spawn(2) + if(src.on) + src.processing = 1 + src.start() + +/datum/effect/system/ion_trail_follow/proc/stop() + src.processing = 0 + src.on = 0 + oldposition = null + +/datum/effect/system/ion_trail_follow/space_trail + var/turf/oldloc // secondary ion trail loc + var/turf/currloc + +/datum/effect/system/ion_trail_follow/space_trail/Destroy() + oldloc = null + currloc = null + return ..() + +/datum/effect/system/ion_trail_follow/space_trail/start() + if(!src.on) + src.on = 1 + src.processing = 1 + if(src.processing) + src.processing = 0 + spawn(0) + var/turf/T = get_turf(src.holder) + if(currloc != T) + switch(holder.dir) + if(NORTH) + src.oldposition = T + src.oldposition = get_step(oldposition, SOUTH) + src.oldloc = get_step(oldposition,EAST) + //src.oldloc = get_step(oldloc, SOUTH) + if(SOUTH) // More difficult, offset to the north! + src.oldposition = get_step(holder,NORTH) + src.oldposition = get_step(oldposition,NORTH) + src.oldloc = get_step(oldposition,EAST) + //src.oldloc = get_step(oldloc,NORTH) + if(EAST) // Just one to the north should suffice + src.oldposition = T + src.oldposition = get_step(oldposition, WEST) + src.oldloc = get_step(oldposition,NORTH) + //src.oldloc = get_step(oldloc,WEST) + if(WEST) // One to the east and north from there + src.oldposition = get_step(holder,EAST) + src.oldposition = get_step(oldposition,EAST) + src.oldloc = get_step(oldposition,NORTH) + //src.oldloc = get_step(oldloc,EAST) + if(istype(T, /turf/space)) + var/obj/effect/effect/ion_trails/I = new /obj/effect/effect/ion_trails(src.oldposition) + var/obj/effect/effect/ion_trails/II = new /obj/effect/effect/ion_trails(src.oldloc) + //src.oldposition = T + I.dir = src.holder.dir + II.dir = src.holder.dir + flick("ion_fade", I) + flick("ion_fade", II) + I.icon_state = "" + II.icon_state = "" + spawn( 20 ) + if(I) I.delete() + if(II) II.delete() + spawn(2) + if(src.on) + src.processing = 1 + src.start() + currloc = T + +//Reagent-based explosion effect +/datum/effect/system/reagents_explosion + var/amount // TNT equivalent + var/flashing = 0 // does explosion creates flash effect? + var/flashing_factor = 0 // factor of how powerful the flash effect relatively to the explosion + + set_up (amt, loc, flash = 0, flash_fact = 0) + amount = amt + if(istype(loc, /turf/)) + location = loc + else + location = get_turf(loc) + + flashing = flash + flashing_factor = flash_fact + + return + + start() + if(amount <= 2) + var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + s.set_up(2, 1, location) + s.start() + + for(var/mob/M in viewers(5, location)) + to_chat(M, "The solution violently explodes.") + for(var/mob/M in viewers(1, location)) + if(prob (50 * amount)) + to_chat(M, "The explosion knocks you down.") + M.Weaken(rand(1,5)) + return + else + var/devastation = -1 + var/heavy = -1 + var/light = -1 + var/flash = -1 + + // Clamp all values to MAX_EXPLOSION_RANGE + if(round(amount/12) > 0) + devastation = min (MAX_EX_DEVESTATION_RANGE, devastation + round(amount/12)) + + if(round(amount/6) > 0) + heavy = min (MAX_EX_HEAVY_RANGE, heavy + round(amount/6)) + + if(round(amount/3) > 0) + light = min (MAX_EX_LIGHT_RANGE, light + round(amount/3)) + + if(flash && flashing_factor) + flash += (round(amount/4) * flashing_factor) + + for(var/mob/M in viewers(8, location)) + to_chat(M, "The solution violently explodes.") + + explosion(location, devastation, heavy, light, flash) + + proc/holder_damage(var/atom/holder) + if(holder) + var/dmglevel = 4 + + if(round(amount/8) > 0) + dmglevel = 1 + else if(round(amount/4) > 0) + dmglevel = 2 + else if(round(amount/2) > 0) + dmglevel = 3 + + if(dmglevel<4) holder.ex_act(dmglevel) diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm new file mode 100644 index 00000000000..6f5ca6d6359 --- /dev/null +++ b/code/game/objects/effects/effect_system/effects_smoke.dm @@ -0,0 +1,489 @@ +///////////////////////////////////////////// +//// SMOKE SYSTEMS +// direct can be optinally added when set_up, to make the smoke always travel in one direction +// in case you wanted a vent to always smoke north for example +///////////////////////////////////////////// + +/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/effect/harmless_smoke + name = "smoke" + icon_state = "smoke" + opacity = 1 + anchored = 0.0 + mouse_opacity = 0 + var/amount = 6.0 + //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() + ..() + spawn (100) + delete() + return + +/obj/effect/effect/harmless_smoke/Move() + ..() + return + +/datum/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 + + 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) + n = 20 + number = n + cardinals = c + carry.copy_to(chemholder, carry.total_volume) + + + if(istype(loca, /turf/)) + location = loca + else + location = get_turf(loca) + if(direct) + direction = direct + if(!silent) + var/contained = "" + for(var/reagent in carry.reagent_list) + contained += " [reagent] " + if(contained) + contained = "\[[contained]\]" + var/area/A = get_area(location) + + var/where = "[A.name] | [location.x], [location.y]" + var/whereLink = "[where]" + + if(carry && carry.my_atom) + if(carry.my_atom.fingerprintslast) + var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast) + var/more = "" + if(M) + more = " " + msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1) + log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].") + else + msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1) + log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.") + else + msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink]). No associated key. CODERS: carry.my_atom may be null.", 0, 1) + log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key. CODERS: carry.my_atom may be null.") + + start(effect_range = 2) + var/i = 0 + + var/color = mix_color_from_reagents(chemholder.reagents.reagent_list) + var/obj/effect/effect/chem_smoke/smokeholder = new /obj/effect/effect/chem_smoke(src.location) + for(var/atom/A in view(effect_range, smokeholder)) + chemholder.reagents.reaction(A) + if(iscarbon(A)) + var/mob/living/carbon/C = A + if(C.can_breathe_gas()) + chemholder.reagents.copy_to(C, chemholder.reagents.total_volume) + qdel(smokeholder) + for(i=0, i 20) + return + spawn(0) + if(holder) + src.location = get_turf(holder) + var/obj/effect/effect/chem_smoke/smoke = new /obj/effect/effect/chem_smoke(src.location) + src.total_smoke++ + var/direction = src.direction + if(!direction) + if(src.cardinals) + direction = pick(cardinal) + else + direction = pick(alldirs) + + if(color) + smoke.icon += color // give the smoke color, if it has any to begin with + else + // if no color, just use the old smoke icon + smoke.icon = 'icons/effects/96x96.dmi' + smoke.icon_state = "smoke" + 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, i 10) + n = 10 + number = n + cardinals = c + if(istype(loca, /turf/)) + location = loca + else + location = get_turf(loca) + + start() + var/i = 0 + for(i=0, i 20) + return + spawn(0) + if(holder) + src.location = get_turf(holder) + var/obj/effect/effect/sparks/sparks = new /obj/effect/effect/sparks(src.location) + src.total_sparks++ + var/direction + if(src.cardinals) + direction = pick(cardinal) + else + direction = pick(alldirs) + for(i=0, i 10) + n = 10 + number = n + cardinals = c + if(istype(loca, /turf/)) + location = loca + else + location = get_turf(loca) + +/datum/effect/system/sparkle_spread/start() + var/i = 0 + for(i=0, i 20) + return + spawn(0) + if(holder) + src.location = get_turf(holder) + var/obj/effect/sparkles/sparks = new(src.location) + src.total_sparks++ + var/direction + if(src.cardinals) + direction = pick(cardinal) + else + direction = pick(alldirs) + for(i=0, i 10) + n = 10 + number = n + cardinals = c + location = loc + + start() + var/i = 0 + for(i=0, i Date: Tue, 31 Oct 2017 22:21:58 +0400 Subject: [PATCH 02/11] removed excessive spacing, removed var/ in proc args, used some ishelpers, absolute pathing for everything --- .../effects/effect_system/effect_system.dm | 31 +- .../effects/effect_system/effects_foam.dm | 19 +- .../effects/effect_system/effects_other.dm | 109 ++-- .../effects/effect_system/effects_smoke.dm | 467 +++++++++--------- .../effects/effect_system/effects_sparks.dm | 61 ++- .../effects/effect_system/effects_water.dm | 117 ++--- 6 files changed, 395 insertions(+), 409 deletions(-) diff --git a/code/game/objects/effects/effect_system/effect_system.dm b/code/game/objects/effects/effect_system/effect_system.dm index 9c601bec2c7..eddf740c9af 100644 --- a/code/game/objects/effects/effect_system/effect_system.dm +++ b/code/game/objects/effects/effect_system/effect_system.dm @@ -5,7 +5,6 @@ it needs to create more trails.A beaker could have a steam_trail_follow system s would spawn and follow the beaker, even if it is carried or thrown. */ - /obj/effect/effect name = "effect" icon = 'icons/effects/effects.dmi' @@ -25,7 +24,7 @@ would spawn and follow the beaker, even if it is carried or thrown. /obj/effect/proc/delete() qdel(src) -/datum/effect/proc/fadeOut(var/atom/A, var/frames = 16) +/datum/effect/proc/fadeOut(atom/A, frames = 16) if(A.alpha == 0) //Handle already transparent case return if(frames == 0) @@ -43,20 +42,20 @@ would spawn and follow the beaker, even if it is carried or thrown. var/atom/holder var/setup = 0 - Destroy() - holder = null - location = null - return ..() +/datum/effect/system/Destroy() + holder = null + location = null + return ..() - proc/set_up(n = 3, c = 0, turf/loc) - if(n > 10) - n = 10 - number = n - cardinals = c - location = loc - setup = 1 +/datum/effect/system/proc/set_up(n = 3, c = 0, turf/loc) + if(n > 10) + n = 10 + number = n + cardinals = c + location = loc + setup = 1 - proc/attach(atom/atom) - holder = atom +/datum/effect/system/proc/attach(atom/atom) + holder = atom - proc/start() +/datum/effect/system/proc/start() diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm index 20eb653c185..06546ab9e86 100644 --- a/code/game/objects/effects/effect_system/effects_foam.dm +++ b/code/game/objects/effects/effect_system/effects_foam.dm @@ -16,8 +16,7 @@ var/expand = 1 var/metal = 0 - -/obj/structure/foam/New(loc, var/ismetal=0) +/obj/structure/foam/New(loc, ismetal=0) ..(loc) icon_state = "[ismetal ? "m":""]foam" if(!ismetal && reagents) @@ -63,10 +62,8 @@ if(--amount < 0) return - for(var/direction in cardinal) - var/turf/T = get_step(src,direction) if(!T) continue @@ -96,12 +93,11 @@ spawn(5) qdel(src) - -/obj/structure/foam/Crossed(var/atom/movable/AM) +/obj/structure/foam/Crossed(atom/movable/AM) if(metal) return - if(istype(AM, /mob/living/carbon)) + if(iscarbon(AM)) var/mob/living/carbon/M = AM if(M.slip("foam", 5, 2)) if(reagents) @@ -113,7 +109,6 @@ var/fraction = 5 / reagents.total_volume reagents.reaction(M, TOUCH, fraction) - /datum/effect/system/foam_spread var/amount = 5 // the size of the foam spread. var/list/carried_reagents // the IDs of reagents present when the foam was mixed @@ -121,7 +116,7 @@ var/temperature = T0C var/list/banned_reagents = list("smoke_powder", "fluorosurfactant", "stimulants") -/datum/effect/system/foam_spread/set_up(amt=5, loca, var/datum/reagents/carry = null, var/metalfoam = 0) +/datum/effect/system/foam_spread/set_up(amt=5, loca, datum/reagents/carry = null, metalfoam = 0) amount = min(round(amt/5, 1), 7) if(istype(loca, /turf/)) location = loca @@ -168,7 +163,6 @@ // wall formed by metal foams // dense and opaque, but easy to break - /obj/structure/foamedmetal icon = 'icons/effects/effects.dmi' icon_state = "metalfoam" @@ -199,7 +193,6 @@ else icon_state = "ironfoam" - /obj/structure/foamedmetal/ex_act(severity) qdel(src) @@ -210,7 +203,7 @@ if(metal==MFOAM_ALUMINUM || prob(50)) qdel(src) -/obj/structure/foamedmetal/attack_hand(var/mob/user) +/obj/structure/foamedmetal/attack_hand(mob/user) user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(src) if((HULK in user.mutations) || (prob(75 - metal*25))) @@ -219,7 +212,7 @@ else to_chat(user, "You hit the metal foam but bounce off it.") -/obj/structure/foamedmetal/attackby(var/obj/item/I, var/mob/user, params) +/obj/structure/foamedmetal/attackby(obj/item/I, mob/user, params) user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(src) if(istype(I, /obj/item/weapon/grab)) diff --git a/code/game/objects/effects/effect_system/effects_other.dm b/code/game/objects/effects/effect_system/effects_other.dm index 69246db2859..27c5804ada8 100644 --- a/code/game/objects/effects/effect_system/effects_other.dm +++ b/code/game/objects/effects/effect_system/effects_other.dm @@ -35,7 +35,7 @@ I.dir = src.holder.dir flick("ion_fade", I) I.icon_state = "" - spawn( 20 ) + spawn(20) if(I) I.delete() src.oldposition = T @@ -98,9 +98,11 @@ flick("ion_fade", II) I.icon_state = "" II.icon_state = "" - spawn( 20 ) - if(I) I.delete() - if(II) II.delete() + spawn(20) + if(I) + I.delete() + if(II) + II.delete() spawn(2) if(src.on) src.processing = 1 @@ -113,64 +115,65 @@ var/flashing = 0 // does explosion creates flash effect? var/flashing_factor = 0 // factor of how powerful the flash effect relatively to the explosion - set_up (amt, loc, flash = 0, flash_fact = 0) - amount = amt - if(istype(loc, /turf/)) - location = loc - else - location = get_turf(loc) +/datum/effect/system/reagents_explosion/set_up(amt, loc, flash = 0, flash_fact = 0) + amount = amt + if(istype(loc, /turf/)) + location = loc + else + location = get_turf(loc) - flashing = flash - flashing_factor = flash_fact + flashing = flash + flashing_factor = flash_fact + return + +/datum/effect/system/reagents_explosion/start() + if(amount <= 2) + var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + s.set_up(2, 1, location) + s.start() + + for(var/mob/M in viewers(5, location)) + to_chat(M, "The solution violently explodes.") + for(var/mob/M in viewers(1, location)) + if(prob(50 * amount)) + to_chat(M, "The explosion knocks you down.") + M.Weaken(rand(1,5)) return + else + var/devastation = -1 + var/heavy = -1 + var/light = -1 + var/flash = -1 - start() - if(amount <= 2) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread - s.set_up(2, 1, location) - s.start() + // Clamp all values to MAX_EXPLOSION_RANGE + if(round(amount/12) > 0) + devastation = min (MAX_EX_DEVESTATION_RANGE, devastation + round(amount/12)) - for(var/mob/M in viewers(5, location)) - to_chat(M, "The solution violently explodes.") - for(var/mob/M in viewers(1, location)) - if(prob (50 * amount)) - to_chat(M, "The explosion knocks you down.") - M.Weaken(rand(1,5)) - return - else - var/devastation = -1 - var/heavy = -1 - var/light = -1 - var/flash = -1 + if(round(amount/6) > 0) + heavy = min (MAX_EX_HEAVY_RANGE, heavy + round(amount/6)) - // Clamp all values to MAX_EXPLOSION_RANGE - if(round(amount/12) > 0) - devastation = min (MAX_EX_DEVESTATION_RANGE, devastation + round(amount/12)) + if(round(amount/3) > 0) + light = min (MAX_EX_LIGHT_RANGE, light + round(amount/3)) - if(round(amount/6) > 0) - heavy = min (MAX_EX_HEAVY_RANGE, heavy + round(amount/6)) + if(flash && flashing_factor) + flash += (round(amount/4) * flashing_factor) - if(round(amount/3) > 0) - light = min (MAX_EX_LIGHT_RANGE, light + round(amount/3)) + for(var/mob/M in viewers(8, location)) + to_chat(M, "The solution violently explodes.") - if(flash && flashing_factor) - flash += (round(amount/4) * flashing_factor) + explosion(location, devastation, heavy, light, flash) - for(var/mob/M in viewers(8, location)) - to_chat(M, "The solution violently explodes.") +/datum/effect/system/reagents_explosion/proc/holder_damage(atom/holder) + if(holder) + var/dmglevel = 4 - explosion(location, devastation, heavy, light, flash) + if(round(amount/8) > 0) + dmglevel = 1 + else if(round(amount/4) > 0) + dmglevel = 2 + else if(round(amount/2) > 0) + dmglevel = 3 - proc/holder_damage(var/atom/holder) - if(holder) - var/dmglevel = 4 - - if(round(amount/8) > 0) - dmglevel = 1 - else if(round(amount/4) > 0) - dmglevel = 2 - else if(round(amount/2) > 0) - dmglevel = 3 - - if(dmglevel<4) holder.ex_act(dmglevel) + if(dmglevel<4) + holder.ex_act(dmglevel) diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm index 6f5ca6d6359..b7636ad427d 100644 --- a/code/game/objects/effects/effect_system/effects_smoke.dm +++ b/code/game/objects/effects/effect_system/effects_smoke.dm @@ -27,7 +27,7 @@ /obj/effect/effect/harmless_smoke/New() ..() - spawn (100) + spawn(100) delete() return @@ -39,42 +39,40 @@ 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 10) + n = 10 + number = n + cardinals = c + if(istype(loca, /turf/)) + location = loca + else + location = get_turf(loca) + if(direct) + direction = direct +/datum/effect/system/harmless_smoke_spread/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 - - 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) + n = 20 + number = n + cardinals = c + if(istype(loca, /turf/)) + location = loca + else + location = get_turf(loca) + if(direct) + direction = direct +/datum/effect/system/bad_smoke_spread/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) - n = 20 - number = n - cardinals = c - carry.copy_to(chemholder, carry.total_volume) +/datum/effect/system/chem_smoke_spread/set_up(datum/reagents/carry = null, n = 5, c = 0, loca, direct, silent = 0) + if(n > 20) + n = 20 + number = n + cardinals = c + carry.copy_to(chemholder, carry.total_volume) + if(istype(loca, /turf/)) + location = loca + else + location = get_turf(loca) + if(direct) + direction = direct + if(!silent) + var/contained = "" + for(var/reagent in carry.reagent_list) + contained += " [reagent] " + if(contained) + contained = "\[[contained]\]" + var/area/A = get_area(location) - if(istype(loca, /turf/)) - location = loca - else - location = get_turf(loca) - if(direct) - direction = direct - if(!silent) - var/contained = "" - for(var/reagent in carry.reagent_list) - contained += " [reagent] " - if(contained) - contained = "\[[contained]\]" - var/area/A = get_area(location) + var/where = "[A.name] | [location.x], [location.y]" + var/whereLink = "[where]" - var/where = "[A.name] | [location.x], [location.y]" - var/whereLink = "[where]" - - if(carry && carry.my_atom) - if(carry.my_atom.fingerprintslast) - var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast) - var/more = "" - if(M) - more = " " - msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1) - log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].") - else - msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1) - log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.") + if(carry && carry.my_atom) + if(carry.my_atom.fingerprintslast) + var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast) + var/more = "" + if(M) + more = " " + msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1) + log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].") else - msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink]). No associated key. CODERS: carry.my_atom may be null.", 0, 1) - log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key. CODERS: carry.my_atom may be null.") + msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1) + log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.") + else + msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink]). No associated key. CODERS: carry.my_atom may be null.", 0, 1) + log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key. CODERS: carry.my_atom may be null.") - start(effect_range = 2) - var/i = 0 +/datum/effect/system/chem_smoke_spread/start(effect_range = 2) + var/i = 0 - var/color = mix_color_from_reagents(chemholder.reagents.reagent_list) - var/obj/effect/effect/chem_smoke/smokeholder = new /obj/effect/effect/chem_smoke(src.location) - for(var/atom/A in view(effect_range, smokeholder)) - chemholder.reagents.reaction(A) - if(iscarbon(A)) - var/mob/living/carbon/C = A - if(C.can_breathe_gas()) - chemholder.reagents.copy_to(C, chemholder.reagents.total_volume) - qdel(smokeholder) - for(i=0, i 20) - return - spawn(0) - if(holder) - src.location = get_turf(holder) - var/obj/effect/effect/chem_smoke/smoke = new /obj/effect/effect/chem_smoke(src.location) - src.total_smoke++ - var/direction = src.direction - if(!direction) - if(src.cardinals) - direction = pick(cardinal) - else - direction = pick(alldirs) - - if(color) - smoke.icon += color // give the smoke color, if it has any to begin with + var/color = mix_color_from_reagents(chemholder.reagents.reagent_list) + var/obj/effect/effect/chem_smoke/smokeholder = new /obj/effect/effect/chem_smoke(src.location) + for(var/atom/A in view(effect_range, smokeholder)) + chemholder.reagents.reaction(A) + if(iscarbon(A)) + var/mob/living/carbon/C = A + if(C.can_breathe_gas()) + chemholder.reagents.copy_to(C, chemholder.reagents.total_volume) + qdel(smokeholder) + for(i=0, i 20) + return + spawn(0) + if(holder) + src.location = get_turf(holder) + var/obj/effect/effect/chem_smoke/smoke = new /obj/effect/effect/chem_smoke(src.location) + src.total_smoke++ + var/direction = src.direction + if(!direction) + if(src.cardinals) + direction = pick(cardinal) else - // if no color, just use the old smoke icon - smoke.icon = 'icons/effects/96x96.dmi' - smoke.icon_state = "smoke" - 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/system/sleep_smoke_spread/set_up(n = 5, c = 0, loca, direct) + if(n > 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) + 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 +/datum/effect/system/mustard_gas_spread/set_up(n = 5, c = 0, loca, direct) + if(n > 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, 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, i 10) - n = 10 - number = n - cardinals = c - if(istype(loca, /turf/)) - location = loca - else - location = get_turf(loca) +/datum/effect/system/spark_spread/set_up(n = 3, c = 0, loca) + if(n > 10) + n = 10 + number = n + cardinals = c + if(istype(loca, /turf/)) + location = loca + else + location = get_turf(loca) - start() - var/i = 0 - for(i=0, i 20) - return - spawn(0) - if(holder) - src.location = get_turf(holder) - var/obj/effect/effect/sparks/sparks = new /obj/effect/effect/sparks(src.location) - src.total_sparks++ - var/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/sparks/sparks = new /obj/effect/effect/sparks(src.location) + src.total_sparks++ + var/direction + if(src.cardinals) + direction = pick(cardinal) + else + direction = pick(alldirs) + for(i=0, i 10) - n = 10 - number = n - cardinals = c - location = loc +/datum/effect/system/steam_spread/set_up(n = 3, c = 0, turf/loc) + if(n > 10) + n = 10 + number = n + cardinals = c + location = loc - start() - var/i = 0 - for(i=0, i Date: Wed, 1 Nov 2017 20:27:32 +0400 Subject: [PATCH 03/11] removed mustard gas smoke as it's not used anywhere --- .../effects/effect_system/effects_smoke.dm | 85 ------------------- 1 file changed, 85 deletions(-) diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm index b7636ad427d..634babed1f1 100644 --- a/code/game/objects/effects/effect_system/effects_smoke.dm +++ b/code/game/objects/effects/effect_system/effects_smoke.dm @@ -393,88 +393,3 @@ spawn(150+rand(10,30)) smoke.delete() src.total_smoke-- - -///////////////////////////////////////////// -// Mustard Gas -///////////////////////////////////////////// - -/obj/effect/effect/mustard_gas - name = "mustard gas" - icon_state = "mustard" - opacity = 1 - anchored = 0.0 - mouse_opacity = 0 - var/amount = 6.0 - -/obj/effect/effect/mustard_gas/New() - ..() - spawn(100) - qdel(src) - return - -/obj/effect/effect/mustard_gas/Move() - ..() - for(var/mob/living/carbon/human/R in get_turf(src)) - if(R.internal != null && usr.wear_mask && (R.wear_mask.flags & AIRTIGHT) && R.wear_suit != null && !istype(R.wear_suit, /obj/item/clothing/suit/storage/labcoat) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket && !istype(R.wear_suit, /obj/item/clothing/suit/armor))) - else - R.adjustFireLoss(0.75) - if(R.coughedtime != 1) - R.coughedtime = 1 - R.emote("gasp") - spawn(20) - R.coughedtime = 0 - R.updatehealth() - return - -/obj/effect/effect/mustard_gas/Crossed(mob/living/carbon/human/R) - ..() - if(ishuman(R)) - if(R.internal != null && usr.wear_mask && (R.wear_mask.flags & AIRTIGHT) && R.wear_suit != null && !istype(R.wear_suit, /obj/item/clothing/suit/storage/labcoat) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket && !istype(R.wear_suit, /obj/item/clothing/suit/armor))) - return - R.adjustFireLoss(0.75) - if(R.coughedtime != 1) - R.coughedtime = 1 - R.emote("gasp") - spawn(20) - R.coughedtime = 0 - R.updatehealth() - return - -/datum/effect/system/mustard_gas_spread - var/total_smoke = 0 // To stop it being spammed and lagging! - var/direction - -/datum/effect/system/mustard_gas_spread/set_up(n = 5, c = 0, loca, direct) - if(n > 20) - n = 20 - number = n - cardinals = c - if(istype(loca, /turf/)) - location = loca - else - location = get_turf(loca) - if(direct) - direction = direct - -/datum/effect/system/mustard_gas_spread/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, i Date: Fri, 3 Nov 2017 16:48:33 +0400 Subject: [PATCH 04/11] add fade out effect to all smoke (untested), move nanofrost smoke to effects_smoke.dm, make smoke effects OOP (unfinished) --- .../effects/effect_system/effects_smoke.dm | 427 +++++++----------- .../objects/items/weapons/tanks/watertank.dm | 76 +--- 2 files changed, 170 insertions(+), 333 deletions(-) diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm index 634babed1f1..5d906945503 100644 --- a/code/game/objects/effects/effect_system/effects_smoke.dm +++ b/code/game/objects/effects/effect_system/effects_smoke.dm @@ -6,138 +6,49 @@ /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/effect/harmless_smoke - name = "smoke" - icon_state = "smoke" - opacity = 1 - anchored = 0.0 - mouse_opacity = 0 - var/amount = 6.0 - //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() - ..() - spawn(100) - delete() - return - -/obj/effect/effect/harmless_smoke/Move() - ..() - return - -/datum/effect/system/harmless_smoke_spread - var/total_smoke = 0 // To stop it being spammed and lagging! - var/direction - -/datum/effect/system/harmless_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 - -/datum/effect/system/harmless_smoke_spread/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 @@ -149,77 +60,165 @@ if(direct) direction = direct -/datum/effect/system/bad_smoke_spread/start() +/datum/effect/system/smoke_spread/start() var/i = 0 - for(i=0, i 20) + 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++ + location = get_turf(holder) + var/obj/effect/effect/harmless_smoke/smoke = new /obj/effect/effect/harmless_smoke(location) + total_smoke++ var/direction = src.direction if(!direction) - if(src.cardinals) + if(cardinals) direction = pick(cardinal) else direction = pick(alldirs) for(i=0, i[V] was frozen shut!") + for(var/mob/living/L in T) + L.ExtinguishMob() + for(var/obj/item/Item in T) + Item.extinguish() + +/datum/effect/system/smoke_spread/freezing/set_up(n = 5, c = 0, loca, direct, blasting = 0) + ..() + blast = blasting + +/datum/effect/system/smoke_spread/freezing/start() + if(blast) + for(var/turf/T in trange(2, location)) + Chilled(T) + ..() + +///////////////////////////////////////////// +// Sleep smoke +///////////////////////////////////////////// + +/obj/effect/effect/smoke/sleeping + color = "#9C3636" + +/obj/effect/effect/smoke/sleeping/Move() + ..() + for(var/mob/living/carbon/M in get_turf(src)) + smoke_mob(M) + +/obj/effect/effect/smoke/sleeping/smoke_mob() + if(..()) + M.drop_item() + M.AdjustSleeping(5) + if(M.coughedtime != 1) + M.coughedtime = 1 + M.emote("cough") + spawn(20) + if(M && M.loc) + M.coughedtime = 0 + +/datum/effect/system/smoke_spread/sleeping + smoke_type = /obj/effect/effect/smoke/sleeping ///////////////////////////////////////////// // Chem smoke ///////////////////////////////////////////// -/obj/effect/effect/chem_smoke - name = "smoke" - opacity = 0 - anchored = 0.0 - mouse_opacity = 0 - var/amount = 6.0 - +/obj/effect/effect/smoke/chem icon = 'icons/effects/chemsmoke.dmi' - pixel_x = -32 - pixel_y = -32 + opacity = 0 + time_to_live = 200+rand(10,30) -/obj/effect/effect/chem_smoke/New() - ..() - spawn(200+rand(10,30)) - delete() - return - -/obj/effect/effect/chem_smoke/Move() - ..() - -/datum/effect/system/chem_smoke_spread/New() - ..() - chemholder = new/obj() - var/datum/reagents/R = new/datum/reagents(500) - chemholder.reagents = R - R.my_atom = chemholder - -/datum/effect/system/chem_smoke_spread +/datum/effect/system/smoke_spread/chem + smoke_type = /obj/effect/effect/smoke/chem var/total_smoke = 0 // To stop it being spammed and lagging! var/direction var/obj/chemholder -/datum/effect/system/chem_smoke_spread/New() +/datum/effect/system/smoke_spread/chem/New() ..() chemholder = new/obj() var/datum/reagents/R = new/datum/reagents(500) chemholder.reagents = R R.my_atom = chemholder -/datum/effect/system/chem_smoke_spread/Destroy() +/datum/effect/system/smoke_spread/chem/Destroy() QDEL_NULL(chemholder) return ..() -/datum/effect/system/chem_smoke_spread/set_up(datum/reagents/carry = null, n = 5, c = 0, loca, direct, silent = 0) +/datum/effect/system/smoke_spread/chem/set_up(datum/reagents/carry = null, n = 5, c = 0, loca, direct, silent = 0) if(n > 20) n = 20 number = n @@ -258,11 +257,11 @@ msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink]). No associated key. CODERS: carry.my_atom may be null.", 0, 1) log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key. CODERS: carry.my_atom may be null.") -/datum/effect/system/chem_smoke_spread/start(effect_range = 2) +/datum/effect/system/smoke_spread/chem/start(effect_range = 2) var/i = 0 var/color = mix_color_from_reagents(chemholder.reagents.reagent_list) - var/obj/effect/effect/chem_smoke/smokeholder = new /obj/effect/effect/chem_smoke(src.location) + var/obj/effect/effect/smoke/chem/smokeholder = new smoke_type(location) for(var/atom/A in view(effect_range, smokeholder)) chemholder.reagents.reaction(A) if(iscarbon(A)) @@ -271,16 +270,16 @@ chemholder.reagents.copy_to(C, chemholder.reagents.total_volume) qdel(smokeholder) for(i=0, i 20) + if(total_smoke > 20) return spawn(0) if(holder) - src.location = get_turf(holder) - var/obj/effect/effect/chem_smoke/smoke = new /obj/effect/effect/chem_smoke(src.location) - src.total_smoke++ + location = get_turf(holder) + var/obj/effect/effect/smoke/chem/smoke = new smoke_type(location) + total_smoke++ var/direction = src.direction if(!direction) - if(src.cardinals) + if(cardinals) direction = pick(cardinal) else direction = pick(alldirs) @@ -294,102 +293,10 @@ 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/system/sleep_smoke_spread/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[V] was frozen shut!") - for(var/mob/living/L in T) - L.ExtinguishMob() - for(var/obj/item/Item in T) - Item.extinguish() - -/datum/effect/system/freezing_smoke_spread - -/datum/effect/system/freezing_smoke_spread/set_up(n = 6, c = 0, loca) - number = n - if(istype(loca, /turf/)) - location = loca - else - location = get_turf(loca) - -/datum/effect/system/freezing_smoke_spread/start() - var/i = 0 - for(i=0, i Date: Fri, 3 Nov 2017 22:46:49 +0400 Subject: [PATCH 05/11] finish making smoke OOP, compiles --- code/ATMOSPHERICS/pipes/simple/pipe_simple.dm | 2 +- code/datums/spell.dm | 6 ++--- code/datums/spells/rathens.dm | 2 +- code/game/gamemodes/blob/blobs/blob_mobs.dm | 2 +- .../shadowling/shadowling_abilities.dm | 2 +- code/game/gamemodes/wizard/artefact.dm | 2 +- code/game/gamemodes/wizard/godhand.dm | 2 +- code/game/mecha/combat/marauder.dm | 2 +- code/game/objects/effects/anomalies.dm | 2 +- .../effects/effect_system/effects_smoke.dm | 27 +++++++++---------- .../objects/effects/explosion_particles.dm | 2 +- .../objects/items/weapons/alien_specific.dm | 2 +- .../items/weapons/grenades/smokebomb.dm | 4 +-- code/game/objects/items/weapons/scrolls.dm | 2 +- code/modules/awaymissions/trigger.dm | 4 +-- code/modules/events/vent_clog.dm | 2 +- .../kitchen_machinery/cooker.dm | 2 +- code/modules/hydroponics/plant_genes.dm | 2 +- code/modules/martial_arts/mimejutsu.dm | 2 +- .../mining/lavaland/loot/tendril_loot.dm | 4 +-- code/modules/mining/mine_items.dm | 2 +- .../living/simple_animal/hostile/hivebot.dm | 2 +- code/modules/power/apc.dm | 2 +- code/modules/power/singularity/narsie.dm | 2 +- code/modules/power/smes.dm | 4 +-- code/modules/projectiles/guns/magic/wand.dm | 2 +- code/modules/projectiles/projectile/magic.dm | 2 +- .../chemistry/recipes/pyrotechnics.dm | 2 +- code/modules/research/experimentor.dm | 12 ++++----- code/modules/station_goals/bsa.dm | 2 +- 30 files changed, 53 insertions(+), 54 deletions(-) diff --git a/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm b/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm index cd5e4a9367d..235714e51c1 100644 --- a/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm +++ b/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm @@ -89,7 +89,7 @@ /obj/machinery/atmospherics/pipe/simple/proc/burst() src.visible_message("\The [src] bursts!"); playsound(src.loc, 'sound/effects/bang.ogg', 25, 1) - var/datum/effect/system/harmless_smoke_spread/smoke = new + var/datum/effect/system/smoke_spread/smoke = new smoke.set_up(1,0, src.loc, 0) smoke.start() qdel(src) diff --git a/code/datums/spell.dm b/code/datums/spell.dm index 6dba2d9990b..4a92130ec37 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -263,15 +263,15 @@ 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/system/harmless_smoke_spread/smoke = new /datum/effect/system/harmless_smoke_spread() + var/datum/effect/system/smoke_spread/smoke = new smoke.set_up(smoke_amt, 0, location) //no idea what the 0 is smoke.start() else if(smoke_spread == 2) - var/datum/effect/system/bad_smoke_spread/smoke = new /datum/effect/system/bad_smoke_spread() + var/datum/effect/system/smoke_spread/bad/smoke = new smoke.set_up(smoke_amt, 0, location) //no idea what the 0 is smoke.start() else if(smoke_spread == 3) - var/datum/effect/system/sleep_smoke_spread/smoke = new /datum/effect/system/sleep_smoke_spread() + var/datum/effect/system/smoke_spread/sleeping/smoke = new smoke.set_up(smoke_amt, 0, location) // same here smoke.start() diff --git a/code/datums/spells/rathens.dm b/code/datums/spells/rathens.dm index b5cc7b63f51..8eb739ece90 100644 --- a/code/datums/spells/rathens.dm +++ b/code/datums/spells/rathens.dm @@ -14,7 +14,7 @@ /obj/effect/proc_holder/spell/targeted/rathens/cast(list/targets, mob/user = usr) playsound(get_turf(user), 'sound/goonstation/effects/superfart.ogg', 25, 1) for(var/mob/living/carbon/human/H in targets) - var/datum/effect/system/harmless_smoke_spread/s = new /datum/effect/system/harmless_smoke_spread + var/datum/effect/system/smoke_spread/s = new s.set_up(5, 0, H) s.start() var/obj/item/organ/internal/appendix/A = H.get_int_organ(/obj/item/organ/internal/appendix) diff --git a/code/game/gamemodes/blob/blobs/blob_mobs.dm b/code/game/gamemodes/blob/blobs/blob_mobs.dm index 439d169bc37..e1e454eedad 100644 --- a/code/game/gamemodes/blob/blobs/blob_mobs.dm +++ b/code/game/gamemodes/blob/blobs/blob_mobs.dm @@ -97,7 +97,7 @@ /mob/living/simple_animal/hostile/blob/blobspore/death(gibbed) ..() // On death, create a small smoke of harmful gas (s-Acid) - var/datum/effect/system/chem_smoke_spread/S = new + var/datum/effect/system/smoke_spread/chem/S = new var/turf/location = get_turf(src) // Create the reagents to put into the air diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm index 2965456c99b..51b2fddcd21 100644 --- a/code/game/gamemodes/shadowling/shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm @@ -473,7 +473,7 @@ B.reagents.clear_reagents() //Just in case! B.icon_state = null //Invisible B.reagents.add_reagent("blindness_smoke", 10) - var/datum/effect/system/chem_smoke_spread/S = new /datum/effect/system/chem_smoke_spread + var/datum/effect/system/smoke_spread/chem/S = new S.attach(B) if(S) S.set_up(B.reagents, 10, 0, B.loc) diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 88251dcdd36..423121eaea0 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -53,7 +53,7 @@ var/list/candidates = pollCandidates("Do you want to play as the wizard apprentice of [H.real_name]?", ROLE_WIZARD, 1) if(candidates.len) var/mob/C = pick(candidates) - new /obj/effect/effect/harmless_smoke(H.loc) + new /obj/effect/effect/smoke(H.loc) var/mob/living/carbon/human/M = new/mob/living/carbon/human(H.loc) M.key = C.key to_chat(M, "You are the [H.real_name]'s apprentice! You are bound by magic contract to follow their orders and help them in accomplishing their goals.") diff --git a/code/game/gamemodes/wizard/godhand.dm b/code/game/gamemodes/wizard/godhand.dm index 95d804179cd..18084d65009 100644 --- a/code/game/gamemodes/wizard/godhand.dm +++ b/code/game/gamemodes/wizard/godhand.dm @@ -107,7 +107,7 @@ to_chat(user, "The spell has no effect on [target].") return - var/datum/effect/system/harmless_smoke_spread/s = new /datum/effect/system/harmless_smoke_spread + var/datum/effect/system/smoke_spread/s = new s.set_up(5, 0, target) s.start() diff --git a/code/game/mecha/combat/marauder.dm b/code/game/mecha/combat/marauder.dm index a08f4bea77a..d8d7b35cb1f 100644 --- a/code/game/mecha/combat/marauder.dm +++ b/code/game/mecha/combat/marauder.dm @@ -15,7 +15,7 @@ var/smoke = 5 var/smoke_ready = 1 var/smoke_cooldown = 100 - var/datum/effect/system/harmless_smoke_spread/smoke_system = new + var/datum/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/anomalies.dm b/code/game/objects/effects/anomalies.dm index bb1ab0fd8dc..d89f8daae9b 100644 --- a/code/game/objects/effects/anomalies.dm +++ b/code/game/objects/effects/anomalies.dm @@ -33,7 +33,7 @@ /obj/effect/anomaly/proc/anomalyNeutralize() var/turf/T = get_turf(src) - new /obj/effect/effect/bad_smoke(T) + new /obj/effect/effect/smoke/bad(T) if(aSignal) aSignal.forceMove(T) diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm index 5d906945503..19d7d1e0b58 100644 --- a/code/game/objects/effects/effect_system/effects_smoke.dm +++ b/code/game/objects/effects/effect_system/effects_smoke.dm @@ -15,7 +15,7 @@ mouse_opacity = 0 var/time_to_live = 100 -/datum/effect/effect/smoke/proc/fade_out(frames = 16) +/obj/effect/effect/smoke/proc/fade_out(frames = 16) if(alpha == 0) //Handle already transparent case return if(frames == 0) @@ -68,7 +68,7 @@ spawn(0) if(holder) location = get_turf(holder) - var/obj/effect/effect/harmless_smoke/smoke = new /obj/effect/effect/harmless_smoke(location) + var/obj/effect/effect/smoke/S = new smoke_type(location) total_smoke++ var/direction = src.direction if(!direction) @@ -78,13 +78,13 @@ direction = pick(alldirs) for(i=0, i\The [src] is full.") return reagents.remove_reagent(25,"water") - var/datum/effect/system/bad_smoke_spread/smoke = new /datum/effect/system/bad_smoke_spread() + var/datum/effect/system/smoke_spread/bad/smoke = new smoke.set_up(5, 0, user.loc) smoke.start() playsound(user.loc, 'sound/effects/bamf.ogg', 50, 2) diff --git a/code/game/objects/items/weapons/grenades/smokebomb.dm b/code/game/objects/items/weapons/grenades/smokebomb.dm index f010bb977c0..0b49be912ce 100644 --- a/code/game/objects/items/weapons/grenades/smokebomb.dm +++ b/code/game/objects/items/weapons/grenades/smokebomb.dm @@ -6,11 +6,11 @@ det_time = 20 item_state = "flashbang" slot_flags = SLOT_BELT - var/datum/effect/system/bad_smoke_spread/smoke + var/datum/effect/system/smoke_spread/bad/smoke New() ..() - src.smoke = new /datum/effect/system/bad_smoke_spread + src.smoke = new /datum/effect/system/smoke_spread/bad src.smoke.attach(src) Destroy() diff --git a/code/game/objects/items/weapons/scrolls.dm b/code/game/objects/items/weapons/scrolls.dm index 4ad7f70e016..634160a7b63 100644 --- a/code/game/objects/items/weapons/scrolls.dm +++ b/code/game/objects/items/weapons/scrolls.dm @@ -59,7 +59,7 @@ to_chat(user, "A mysterious force disrupts your arcane spell matrix, and you remain where you are.") return - var/datum/effect/system/harmless_smoke_spread/smoke = new /datum/effect/system/harmless_smoke_spread() + var/datum/effect/system/smoke_spread/smoke = new smoke.set_up(5, 0, user.loc) smoke.attach(user) smoke.start() diff --git a/code/modules/awaymissions/trigger.dm b/code/modules/awaymissions/trigger.dm index 2a41eee85c3..6ec536fa4a3 100644 --- a/code/modules/awaymissions/trigger.dm +++ b/code/modules/awaymissions/trigger.dm @@ -31,11 +31,11 @@ s.start() if(entersmoke) - var/datum/effect/system/harmless_smoke_spread/s = new /datum/effect/system/harmless_smoke_spread + var/datum/effect/system/smoke_spread/s = new s.set_up(4, 1, src, 0) s.start() if(exitsmoke) - var/datum/effect/system/harmless_smoke_spread/s = new /datum/effect/system/harmless_smoke_spread + var/datum/effect/system/smoke_spread/s = new s.set_up(4, 1, dest, 0) s.start() diff --git a/code/modules/events/vent_clog.dm b/code/modules/events/vent_clog.dm index ae6794d5e8d..73256d253cd 100644 --- a/code/modules/events/vent_clog.dm +++ b/code/modules/events/vent_clog.dm @@ -28,7 +28,7 @@ R.my_atom = vent R.add_reagent(pick(gunk), 50) - var/datum/effect/system/chem_smoke_spread/smoke = new + var/datum/effect/system/smoke_spread/chem/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(3) diff --git a/code/modules/food_and_drinks/kitchen_machinery/cooker.dm b/code/modules/food_and_drinks/kitchen_machinery/cooker.dm index 1c8db0d9b20..2f686cfb03a 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/cooker.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/cooker.dm @@ -66,7 +66,7 @@ var/obj/item/weapon/reagent_containers/food/snacks/badrecipe/burnt = new(get_turf(src)) setRegents(props, burnt) to_chat(user, "You smell burning coming from the [src]!") - var/datum/effect/system/bad_smoke_spread/smoke = new /datum/effect/system/bad_smoke_spread() // burning things makes smoke! + var/datum/effect/system/smoke_spread/bad/smoke = new // burning things makes smoke! smoke.set_up(5, 0, src) smoke.start() if(prob(firechance)) diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index efc3d0f594f..95b6c735280 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -402,7 +402,7 @@ name = "gaseous decomposition" /datum/plant_gene/trait/smoke/on_squash(obj/item/weapon/reagent_containers/food/snacks/grown/G, atom/target) - var/datum/effect/system/chem_smoke_spread/S = new + var/datum/effect/system/smoke_spread/chem/S = new var/splat_location = get_turf(target) var/smoke_amount = round(sqrt(G.seed.potency * 0.1), 1) S.attach(splat_location) diff --git a/code/modules/martial_arts/mimejutsu.dm b/code/modules/martial_arts/mimejutsu.dm index ef0826d49a1..5000b13a0f7 100644 --- a/code/modules/martial_arts/mimejutsu.dm +++ b/code/modules/martial_arts/mimejutsu.dm @@ -47,7 +47,7 @@ D.visible_message("[A] throws an invisible smoke bomb!!") - var/datum/effect/system/bad_smoke_spread/smoke = new /datum/effect/system/bad_smoke_spread() + var/datum/effect/system/smoke_spread/bad/smoke = new smoke.set_up(5, 0, D.loc) smoke.start() diff --git a/code/modules/mining/lavaland/loot/tendril_loot.dm b/code/modules/mining/lavaland/loot/tendril_loot.dm index 1c2093ce8c2..391296f3d2d 100644 --- a/code/modules/mining/lavaland/loot/tendril_loot.dm +++ b/code/modules/mining/lavaland/loot/tendril_loot.dm @@ -259,14 +259,14 @@ to_chat(user, "[src] fizzles uselessly.") return - var/datum/effect/system/harmless_smoke_spread/smoke = new /datum/effect/system/harmless_smoke_spread() + var/datum/effect/system/smoke_spread/smoke = new smoke.set_up(1, 0, user.loc) smoke.start() user.forceMove(get_turf(linked)) feedback_add_details("warp_cube","[src.type]") - var/datum/effect/system/harmless_smoke_spread/smoke2 = new /datum/effect/system/harmless_smoke_spread() + var/datum/effect/system/smoke_spread/smoke2 = new smoke2.set_up(1, 0, user.loc) smoke2.start() diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 11f16953017..5a80432f4cf 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -329,7 +329,7 @@ message_admins("[key_name_admin(usr)] (?) (FLW) activated a bluespace capsule away from the mining level! (JMP)") log_admin("[key_name(usr)] activated a bluespace capsule away from the mining level at [T.x], [T.y], [T.z]") template.load(deploy_location, centered = TRUE) - new /obj/effect/effect/harmless_smoke(get_turf(src)) + new /obj/effect/effect/smoke(get_turf(src)) qdel(src) /obj/item/weapon/survivalcapsule/luxury diff --git a/code/modules/mob/living/simple_animal/hostile/hivebot.dm b/code/modules/mob/living/simple_animal/hostile/hivebot.dm index 3c521d56d04..9d966d67a07 100644 --- a/code/modules/mob/living/simple_animal/hostile/hivebot.dm +++ b/code/modules/mob/living/simple_animal/hostile/hivebot.dm @@ -75,7 +75,7 @@ /mob/living/simple_animal/hostile/hivebot/tele/New() ..() - var/datum/effect/system/harmless_smoke_spread/smoke = new /datum/effect/system/harmless_smoke_spread() + var/datum/effect/system/smoke_spread/smoke = new smoke.set_up(5, 0, src.loc) smoke.start() visible_message("The [src] warps in!") diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index da56a496947..aa1ccae3c1d 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -1056,7 +1056,7 @@ cell.corrupt() src.malfhack = 1 update_icon() - var/datum/effect/system/harmless_smoke_spread/smoke = new /datum/effect/system/harmless_smoke_spread() + var/datum/effect/system/smoke_spread/smoke = new smoke.set_up(3, 0, src.loc) smoke.attach(src) smoke.start() diff --git a/code/modules/power/singularity/narsie.dm b/code/modules/power/singularity/narsie.dm index 03b1d07b85b..6b939da6f2f 100644 --- a/code/modules/power/singularity/narsie.dm +++ b/code/modules/power/singularity/narsie.dm @@ -41,7 +41,7 @@ /obj/singularity/narsie/large/attack_ghost(mob/dead/observer/user as mob) makeNewConstruct(/mob/living/simple_animal/hostile/construct/harvester, user, null, 1) - new /obj/effect/effect/sleep_smoke(user.loc) + new /obj/effect/effect/smoke/sleeping(user.loc) /obj/singularity/narsie/process() diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index f73d306d15b..cf6ba4df1e7 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -440,7 +440,7 @@ for(var/mob/M in viewers(src)) M.show_message("The [src.name] is making strange noises!", 3, "You hear sizzling electronics.", 2) sleep(10*pick(4,5,6,7,10,14)) - var/datum/effect/system/harmless_smoke_spread/smoke = new /datum/effect/system/harmless_smoke_spread() + var/datum/effect/system/smoke_spread/smoke = new smoke.set_up(3, 0, src.loc) smoke.attach(src) smoke.start() @@ -456,7 +456,7 @@ else emp_act(2) if(prob(5)) //smoke only - var/datum/effect/system/harmless_smoke_spread/smoke = new /datum/effect/system/harmless_smoke_spread() + var/datum/effect/system/smoke_spread/smoke = new smoke.set_up(3, 0, src.loc) smoke.attach(src) smoke.start() diff --git a/code/modules/projectiles/guns/magic/wand.dm b/code/modules/projectiles/guns/magic/wand.dm index ac804ab9192..0e8e1a3862a 100644 --- a/code/modules/projectiles/guns/magic/wand.dm +++ b/code/modules/projectiles/guns/magic/wand.dm @@ -122,7 +122,7 @@ /obj/item/weapon/gun/magic/wand/teleport/zap_self(mob/living/user) do_teleport(user, user, 10) - var/datum/effect/system/harmless_smoke_spread/smoke = new /datum/effect/system/harmless_smoke_spread() + var/datum/effect/system/smoke_spread/smoke = new smoke.set_up(10, 0, user.loc) smoke.start() charges-- diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index ff274a48993..83f9018ae31 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -100,7 +100,7 @@ if(!stuff.anchored && stuff.loc) teleammount++ do_teleport(stuff, stuff, 10) - var/datum/effect/system/harmless_smoke_spread/smoke = new /datum/effect/system/harmless_smoke_spread() + var/datum/effect/system/smoke_spread/smoke = new 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() diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm index fe54819e035..f3a264f91a6 100644 --- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm +++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm @@ -211,7 +211,7 @@ datum/chemical_reaction/flash_powder if(holder.has_reagent(f_reagent)) holder.remove_reagent(f_reagent, holder.get_reagent_amount(f_reagent)) var/location = get_turf(holder.my_atom) - var/datum/effect/system/chem_smoke_spread/S = new /datum/effect/system/chem_smoke_spread + var/datum/effect/system/smoke_spread/chem/S = new S.attach(location) playsound(location, 'sound/effects/smoke.ogg', 50, 1, -3) spawn(0) diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index f0aed90bc91..e00b89b4966 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -226,7 +226,7 @@ loaded_item = null /obj/machinery/r_n_d/experimentor/proc/throwSmoke(turf/where) - var/datum/effect/system/harmless_smoke_spread/smoke = new + var/datum/effect/system/smoke_spread/smoke = new smoke.set_up(1,0, where, 0) smoke.start() @@ -318,7 +318,7 @@ R.my_atom = src R.add_reagent(chosenchem , 15) investigate_log("Experimentor has released [chosenchem] smoke.", "experimentor") - var/datum/effect/system/chem_smoke_spread/smoke = new + var/datum/effect/system/smoke_spread/chem/smoke = new smoke.set_up(R, 1, 0, src, 0, silent = 1) playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3) smoke.start() @@ -330,7 +330,7 @@ var/datum/reagents/R = new/datum/reagents(15) R.my_atom = src R.add_reagent(chosenchem , 15) - var/datum/effect/system/chem_smoke_spread/smoke = new + var/datum/effect/system/smoke_spread/chem/smoke = new smoke.set_up(R, 1, 0, src, 0, silent = 1) playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3) smoke.start() @@ -417,7 +417,7 @@ R.my_atom = src R.add_reagent("frostoil" , 15) investigate_log("Experimentor has released frostoil gas.", "experimentor") - var/datum/effect/system/chem_smoke_spread/smoke = new + var/datum/effect/system/smoke_spread/chem/smoke = new smoke.set_up(R, 1, 0, src, 0, silent = 1) playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3) smoke.start() @@ -439,7 +439,7 @@ ejectItem(TRUE) if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) visible_message("[src] malfunctions, releasing a flurry of chilly air as [exp_on] pops out!") - var/datum/effect/system/harmless_smoke_spread/smoke = new + var/datum/effect/system/smoke_spread/smoke = new smoke.set_up(1,0, src.loc, 0) smoke.start() ejectItem() @@ -648,7 +648,7 @@ //////////////// RELIC PROCS ///////////////////////////// /obj/item/weapon/relic/proc/throwSmoke(turf/where) - var/datum/effect/system/harmless_smoke_spread/smoke = new + var/datum/effect/system/smoke_spread/smoke = new smoke.set_up(1,0, where, 0) smoke.start() diff --git a/code/modules/station_goals/bsa.dm b/code/modules/station_goals/bsa.dm index 38d04b527db..085bbe3540b 100644 --- a/code/modules/station_goals/bsa.dm +++ b/code/modules/station_goals/bsa.dm @@ -397,7 +397,7 @@ if(notice) return null //Totally nanite construction system not an immersion breaking spawning - var/datum/effect/system/harmless_smoke_spread/s = new /datum/effect/system/harmless_smoke_spread() + var/datum/effect/system/smoke_spread/s = new s.set_up(4, 0, get_turf(centerpiece)) s.start() var/obj/machinery/bsa/full/cannon = new(get_turf(centerpiece),centerpiece.get_cannon_direction()) From 718aaf4d874f5d3522b768f6eadc5efc41dcffbc Mon Sep 17 00:00:00 2001 From: uraniummeltdown Date: Sat, 4 Nov 2017 12:06:35 +0400 Subject: [PATCH 06/11] removes the useless effect/delete() proc, used QDEL_IN and addtimers, nanofrost can weld scrubbers too, some more cleanup fixes and tried to get smoke fade_out to work (it doesn't work and hasn't in the past) --- .../effects/effect_system/effect_system.dm | 14 -------- .../effects/effect_system/effects_other.dm | 6 ++-- .../effects/effect_system/effects_smoke.dm | 35 +++++++++---------- .../effects/effect_system/effects_sparks.dm | 6 ++-- .../effects/effect_system/effects_water.dm | 13 ++++--- .../mob/living/simple_animal/bot/bot.dm | 3 +- 6 files changed, 29 insertions(+), 48 deletions(-) diff --git a/code/game/objects/effects/effect_system/effect_system.dm b/code/game/objects/effects/effect_system/effect_system.dm index eddf740c9af..a558c7933f2 100644 --- a/code/game/objects/effects/effect_system/effect_system.dm +++ b/code/game/objects/effects/effect_system/effect_system.dm @@ -21,20 +21,6 @@ would spawn and follow the beaker, even if it is carried or thrown. cameranet.updateVisibility(src) return ..() -/obj/effect/proc/delete() - qdel(src) - -/datum/effect/proc/fadeOut(atom/A, frames = 16) - if(A.alpha == 0) //Handle already transparent case - return - if(frames == 0) - frames = 1 //We will just assume that by 0 frames, the coder meant "during one frame". - var/step = A.alpha / frames - for(var/i = 0, i < frames, i++) - A.alpha -= step - sleep(world.tick_lag) - return - /datum/effect/system var/number = 3 var/cardinals = 0 diff --git a/code/game/objects/effects/effect_system/effects_other.dm b/code/game/objects/effects/effect_system/effects_other.dm index 27c5804ada8..8785c3c610b 100644 --- a/code/game/objects/effects/effect_system/effects_other.dm +++ b/code/game/objects/effects/effect_system/effects_other.dm @@ -37,7 +37,7 @@ I.icon_state = "" spawn(20) if(I) - I.delete() + qdel(I) src.oldposition = T spawn(2) if(src.on) @@ -100,9 +100,9 @@ II.icon_state = "" spawn(20) if(I) - I.delete() + qdel(I) if(II) - II.delete() + qdel(II) spawn(2) if(src.on) src.processing = 1 diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm index 19d7d1e0b58..005b4459a60 100644 --- a/code/game/objects/effects/effect_system/effects_smoke.dm +++ b/code/game/objects/effects/effect_system/effects_smoke.dm @@ -23,12 +23,13 @@ var/step = alpha / frames for(var/i = 0, i < frames, i++) alpha -= step - sleep(world.tick_lag) + if(alpha < 160) + set_opacity(0) + stoplag() /obj/effect/effect/smoke/New() ..() - spawn(time_to_live) - delete() + QDEL_IN(src, time_to_live) return /obj/effect/effect/smoke/Crossed(mob/living/M) @@ -61,8 +62,7 @@ direction = direct /datum/effect/system/smoke_spread/start() - var/i = 0 - for(i=0, i 20) return spawn(0) @@ -81,10 +81,8 @@ step(S,direction) spawn(S.time_to_live*0.75+rand(10,30)) if(S) - spawn(0) - S.fade_out() - spawn(10) - S.delete() + addtimer(S, "fade_out", 0) + QDEL_IN(S, 10) total_smoke-- ///////////////////////////////////////////// @@ -147,10 +145,15 @@ G.nitrogen += (G.toxins) G.toxins = 0 for(var/obj/machinery/atmospherics/unary/vent_pump/V in T) - if(!isnull(V.welded) && !V.welded) //must be an unwelded vent pump or vent scrubber. + if(!isnull(V.welded) && !V.welded) //must be an unwelded vent pump. V.welded = 1 V.update_icon() V.visible_message("[V] was frozen shut!") + for(var/obj/machinery/atmospherics/unary/vent_scrubber/U in T) + if(!isnull(U.welded) && !U.welded) //must be an unwelded vent scrubber. + U.welded = 1 + U.update_icon() + U.visible_message("[U] was frozen shut!") for(var/mob/living/L in T) L.ExtinguishMob() for(var/obj/item/Item in T) @@ -257,8 +260,6 @@ log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key. CODERS: carry.my_atom may be null.") /datum/effect/system/smoke_spread/chem/start(effect_range = 2) - var/i = 0 - var/color = mix_color_from_reagents(chemholder.reagents.reagent_list) var/obj/effect/effect/smoke/chem/smokeholder = new smoke_type(location) for(var/atom/A in view(effect_range, smokeholder)) @@ -268,7 +269,7 @@ if(C.can_breathe_gas()) chemholder.reagents.copy_to(C, chemholder.reagents.total_volume) qdel(smokeholder) - for(i=0, i 20) return spawn(0) @@ -292,10 +293,8 @@ for(i=0, i Date: Sat, 4 Nov 2017 15:21:26 +0400 Subject: [PATCH 07/11] -removed coughedtime from mob_defines.dm and added smoke_delay to living_defines.dm -fading out smoke finally works -removed the spawns in smoke code it now uses process() -sleeping smoke uses Sleeping() instead of AdjustSleeping() --- .../effects/effect_system/effects_smoke.dm | 170 +++++++++--------- code/modules/mob/living/living_defines.dm | 2 + code/modules/mob/mob_defines.dm | 2 - 3 files changed, 90 insertions(+), 84 deletions(-) diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm index 005b4459a60..cc0259c6c6f 100644 --- a/code/game/objects/effects/effect_system/effects_smoke.dm +++ b/code/game/objects/effects/effect_system/effects_smoke.dm @@ -1,6 +1,6 @@ ///////////////////////////////////////////// //// SMOKE SYSTEMS -// direct can be optinally added when set_up, to make the smoke always travel in one direction +// direct can be optionally added when set_up, to make the smoke always travel in one direction // in case you wanted a vent to always smoke north for example ///////////////////////////////////////////// @@ -13,7 +13,9 @@ opacity = 1 anchored = 0 mouse_opacity = 0 - var/time_to_live = 100 + var/steps = 0 + var/lifetime = 5 + var/direction /obj/effect/effect/smoke/proc/fade_out(frames = 16) if(alpha == 0) //Handle already transparent case @@ -29,8 +31,27 @@ /obj/effect/effect/smoke/New() ..() - QDEL_IN(src, time_to_live) - return + processing_objects |= src + lifetime += rand(-1,1) + +/obj/effect/effect/smoke/Destroy() + processing_objects.Remove(src) + return ..() + +/obj/effect/effect/smoke/proc/kill_smoke() + processing_objects.Remove(src) + addtimer(src, "fade_out", 0) + QDEL_IN(src, 10) + +/obj/effect/effect/smoke/process() + lifetime-- + if(lifetime < 1) + kill_smoke() + return 0 + if(steps >= 1) + step(src,direction) + steps-- + return 1 /obj/effect/effect/smoke/Crossed(mob/living/M) if(!istype(M)) @@ -40,12 +61,21 @@ /obj/effect/effect/smoke/proc/smoke_mob(mob/living/carbon/C) if(!istype(C)) return FALSE + if(lifetime<1) + return FALSE if(!C.can_breathe_gas()) return FALSE + if(C.smoke_delay) + return FALSE + C.smoke_delay++ + addtimer(src, "remove_smoke_delay", 10, FALSE, C) return TRUE +/obj/effect/effect/smoke/proc/remove_smoke_delay(mob/living/carbon/C) + if(C) + C.smoke_delay = 0 + /datum/effect/system/smoke_spread - var/total_smoke = 0 // To stop it being spammed and lagging! var/direction var/smoke_type = /obj/effect/effect/smoke @@ -63,39 +93,37 @@ /datum/effect/system/smoke_spread/start() for(var/i=0, i 20) - return - spawn(0) - if(holder) - location = get_turf(holder) - var/obj/effect/effect/smoke/S = new smoke_type(location) - total_smoke++ - var/direction = src.direction - if(!direction) - if(cardinals) - direction = pick(cardinal) - else - direction = pick(alldirs) - for(i=0, i 20) - return - spawn(0) - if(holder) - location = get_turf(holder) - var/obj/effect/effect/smoke/chem/smoke = new smoke_type(location) - total_smoke++ - var/direction = src.direction - if(!direction) - if(cardinals) - direction = pick(cardinal) - else - direction = pick(alldirs) - - if(color) - smoke.icon += color // give the smoke color, if it has any to begin with + if(holder) + location = get_turf(holder) + var/obj/effect/effect/smoke/chem/S = new smoke_type(location) + if(!direction) + if(cardinals) + S.direction = pick(cardinal) else - // if no color, just use the old smoke icon - smoke.icon = 'icons/effects/96x96.dmi' - smoke.icon_state = "smoke" - for(i=0, i Date: Sat, 4 Nov 2017 16:19:54 +0400 Subject: [PATCH 08/11] /obj/effect information --- code/game/objects/effects/effects.dm | 6 ++++++ paradise.dme | 1 + 2 files changed, 7 insertions(+) create mode 100644 code/game/objects/effects/effects.dm diff --git a/code/game/objects/effects/effects.dm b/code/game/objects/effects/effects.dm new file mode 100644 index 00000000000..d88965fbbbf --- /dev/null +++ b/code/game/objects/effects/effects.dm @@ -0,0 +1,6 @@ + +//objects in /obj/effect should never be things that are attackable, use obj/structure instead. +//Effects are mostly temporary visual effects like sparks, smoke, as well as decals, etc... + +/obj/effect + icon = 'icons/effects/effects.dmi' diff --git a/paradise.dme b/paradise.dme index 35266b3cdef..dcb0ac52b5c 100644 --- a/paradise.dme +++ b/paradise.dme @@ -688,6 +688,7 @@ #include "code\game\objects\effects\aliens.dm" #include "code\game\objects\effects\anomalies.dm" #include "code\game\objects\effects\bump_teleporter.dm" +#include "code\game\objects\effects\effects.dm" #include "code\game\objects\effects\explosion_particles.dm" #include "code\game\objects\effects\forcefields.dm" #include "code\game\objects\effects\gibs.dm" From 5c4f4ec5e5ee087fb46fd46efcf41a04bf97d5b3 Mon Sep 17 00:00:00 2001 From: uraniummeltdown Date: Sat, 4 Nov 2017 18:21:51 +0400 Subject: [PATCH 09/11] effect/system to effect_system effect/effect to effect/particle_effect make foam an effect again move explosion_particles.dm to effect_system folder OOP effect code, addtimers, QDEL_IN fixed reagent explosions never having a flash range due to a typo --- .../effects/effect_system/effect_system.dm | 53 +++++-- .../effect_system/effects_explosion.dm | 61 ++++++++ .../effects/effect_system/effects_foam.dm | 31 ++-- .../effects/effect_system/effects_other.dm | 136 +++++++++++------- .../effects/effect_system/effects_smoke.dm | 85 ++++++----- .../effects/effect_system/effects_sparks.dm | 133 +++-------------- .../effects/effect_system/effects_water.dm | 94 ++---------- .../objects/effects/explosion_particles.dm | 68 --------- paradise.dme | 2 +- 9 files changed, 273 insertions(+), 390 deletions(-) create mode 100644 code/game/objects/effects/effect_system/effects_explosion.dm delete mode 100644 code/game/objects/effects/explosion_particles.dm diff --git a/code/game/objects/effects/effect_system/effect_system.dm b/code/game/objects/effects/effect_system/effect_system.dm index a558c7933f2..1669d9b09d2 100644 --- a/code/game/objects/effects/effect_system/effect_system.dm +++ b/code/game/objects/effects/effect_system/effect_system.dm @@ -5,43 +5,68 @@ it needs to create more trails.A beaker could have a steam_trail_follow system s would spawn and follow the beaker, even if it is carried or thrown. */ -/obj/effect/effect - name = "effect" - icon = 'icons/effects/effects.dmi' +/obj/effect/particle_effect + name = "particle effect" mouse_opacity = 0 - unacidable = 1//So effect are not targeted by alien acid. + unacidable = 1//So effects are not targeted by alien acid. -/obj/effect/effect/New() +/obj/effect/particle_effect/New() ..() if(ticker) cameranet.updateVisibility(src) -/obj/effect/effect/Destroy() +/obj/effect/particle_effect/Destroy() if(ticker) cameranet.updateVisibility(src) return ..() -/datum/effect/system +/datum/effect_system var/number = 3 var/cardinals = 0 var/turf/location var/atom/holder - var/setup = 0 + var/effect_type + var/total_effects = 0 -/datum/effect/system/Destroy() +/datum/effect_system/Destroy() holder = null location = null return ..() -/datum/effect/system/proc/set_up(n = 3, c = 0, turf/loc) +/datum/effect_system/proc/set_up(n = 3, c = 0, loca) if(n > 10) n = 10 number = n cardinals = c - location = loc - setup = 1 + if(isturf(loca)) + location = loca + else + location = get_turf(loca) -/datum/effect/system/proc/attach(atom/atom) +/datum/effect_system/proc/attach(atom/atom) holder = atom -/datum/effect/system/proc/start() +/datum/effect_system/proc/start() + for(var/i in 1 to number) + if(total_effects > 20) + return + addtimer(src, "generate_effect", 0) + +/datum/effect_system/proc/generate_effect() + if(holder) + location = get_turf(holder) + var/obj/effect/E = new effect_type(location) + total_effects++ + var/direction + if(cardinals) + direction = pick(cardinal) + else + direction = pick(alldirs) + var/steps_amt = pick(1,2,3) + for(var/j in 1 to steps_amt) + sleep(5) + step(E,direction) + addtimer(src, "decrement_total_effect", 20) + +/datum/effect_system/proc/decrement_total_effect() + total_effects-- diff --git a/code/game/objects/effects/effect_system/effects_explosion.dm b/code/game/objects/effects/effect_system/effects_explosion.dm new file mode 100644 index 00000000000..63b3d4d5271 --- /dev/null +++ b/code/game/objects/effects/effect_system/effects_explosion.dm @@ -0,0 +1,61 @@ +/obj/effect/particle_effect/expl_particles + name = "explosive particles" + icon_state = "explosion_particle" + opacity = 1 + anchored = 1 + +/obj/effect/particle_effect/expl_particles/New() + ..() + QDEL_IN(src, 15) + +/datum/effect_system/expl_particles + number = 10 + +/datum/effect_system/expl_particles/start() + for(var/i in 1 to number) + spawn(0) + var/obj/effect/particle_effect/expl_particles/expl = new /obj/effect/particle_effect/expl_particles(location) + var/direct = pick(alldirs) + var/steps_amt = pick(1;25,2;50,3,4;200) + for(var/j in 1 to steps_amt) + sleep(1) + step(expl,direct) + +/obj/effect/explosion + name = "explosive particles" + icon = 'icons/effects/96x96.dmi' + icon_state = "explosion" + opacity = 1 + anchored = 1 + mouse_opacity = 0 + pixel_x = -32 + pixel_y = -32 + +/obj/effect/explosion/New() + ..() + QDEL_IN(src, 10) + +/datum/effect_system/explosion + +/datum/effect_system/explosion/set_up(loca) + if(isturf(loca)) + location = loca + else + location = get_turf(loca) + +/datum/effect_system/explosion/start() + new/obj/effect/explosion(location) + var/datum/effect_system/expl_particles/P = new/datum/effect_system/expl_particles() + P.set_up(10,location) + P.start() + +/datum/effect_system/explosion/smoke + +/datum/effect_system/explosion/smoke/proc/create_smoke() + var/datum/effect_system/smoke_spread/S = new + S.set_up(5,0,location,null) + S.start() + +/datum/effect_system/explosion/smoke/start() + ..() + addtimer(src, "create_smoke", 5) diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm index 06546ab9e86..814f264b23e 100644 --- a/code/game/objects/effects/effect_system/effects_foam.dm +++ b/code/game/objects/effects/effect_system/effects_foam.dm @@ -2,21 +2,19 @@ // Similar to smoke, but spreads out more // metal foams leave behind a foamed metal wall -/obj/structure/foam +/obj/effect/particle_effect/foam name = "foam" - icon = 'icons/effects/effects.dmi' icon_state = "foam" opacity = 0 anchored = 1 density = 0 layer = OBJ_LAYER + 0.9 - mouse_opacity = 0 animate_movement = 0 var/amount = 3 var/expand = 1 var/metal = 0 -/obj/structure/foam/New(loc, ismetal=0) +/obj/effect/particle_effect/foam/New(loc, ismetal=0) ..(loc) icon_state = "[ismetal ? "m":""]foam" if(!ismetal && reagents) @@ -47,7 +45,7 @@ return // on delete, transfer any reagents to the floor -/obj/structure/foam/Destroy() +/obj/effect/particle_effect/foam/Destroy() if(!metal && reagents) reagents.handle_reactions() for(var/atom/A in oview(1, src)) @@ -58,7 +56,7 @@ reagents.reaction(A, TOUCH, fraction) return ..() -/obj/structure/foam/process() +/obj/effect/particle_effect/foam/process() if(--amount < 0) return @@ -71,11 +69,11 @@ if(!T.Enter(src)) continue - var/obj/structure/foam/F = locate() in T + var/obj/effect/particle_effect/foam/F = locate() in T if(F) continue - F = new /obj/structure/foam(T, metal) + F = new /obj/effect/particle_effect/foam(T, metal) F.amount = amount if(!metal) F.create_reagents(15) @@ -86,14 +84,14 @@ // foam disolves when heated // except metal foams -/obj/structure/foam/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) +/obj/effect/particle_effect/foam/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) if(!metal && prob(max(0, exposed_temperature - 475))) flick("[icon_state]-disolve", src) spawn(5) qdel(src) -/obj/structure/foam/Crossed(atom/movable/AM) +/obj/effect/particle_effect/foam/Crossed(atom/movable/AM) if(metal) return @@ -109,16 +107,17 @@ var/fraction = 5 / reagents.total_volume reagents.reaction(M, TOUCH, fraction) -/datum/effect/system/foam_spread +/datum/effect_system/foam_spread + effect_type = /obj/effect/particle_effect/foam var/amount = 5 // the size of the foam spread. var/list/carried_reagents // the IDs of reagents present when the foam was mixed var/metal = 0 // 0=foam, 1=metalfoam, 2=ironfoam var/temperature = T0C var/list/banned_reagents = list("smoke_powder", "fluorosurfactant", "stimulants") -/datum/effect/system/foam_spread/set_up(amt=5, loca, datum/reagents/carry = null, metalfoam = 0) +/datum/effect_system/foam_spread/set_up(amt=5, loca, datum/reagents/carry = null, metalfoam = 0) amount = min(round(amt/5, 1), 7) - if(istype(loca, /turf/)) + if(isturf(loca)) location = loca else location = get_turf(loca) @@ -135,15 +134,15 @@ for(var/datum/reagent/R in carry.reagent_list) carried_reagents[R.id] = R.volume -/datum/effect/system/foam_spread/start() +/datum/effect_system/foam_spread/start() spawn(0) - var/obj/structure/foam/F = locate() in location + var/obj/effect/particle_effect/foam/F = locate() in location if(F) F.amount += amount F.amount = min(F.amount, 27) return - F = new /obj/structure/foam(location, metal) + F = new /obj/effect/particle_effect/foam(location, metal) F.amount = amount if(!metal) // don't carry other chemicals if a metal foam diff --git a/code/game/objects/effects/effect_system/effects_other.dm b/code/game/objects/effects/effect_system/effects_other.dm index 8785c3c610b..ef9ed8ac11a 100644 --- a/code/game/objects/effects/effect_system/effects_other.dm +++ b/code/game/objects/effects/effect_system/effects_other.dm @@ -1,69 +1,96 @@ ///////////////////////////////////////////// -//////// Attach an Ion trail to any object, that spawns when it moves (like for the jetpack) +//////// Attach a trail to any object, that spawns when it moves (like for the jetpack) /// just pass in the object to attach it to in set_up /// Then do start() to start it and stop() to stop it, obviously /// and don't call start() in a loop that will be repeated otherwise it'll get spammed! ///////////////////////////////////////////// -/obj/effect/effect/ion_trails - name = "ion trails" - icon_state = "ion_trails" - anchored = 1.0 - -/datum/effect/system/ion_trail_follow +/datum/effect_system/trail_follow var/turf/oldposition var/processing = 1 var/on = 1 -/datum/effect/system/ion_trail_follow/Destroy() +/datum/effect_system/trail_follow/set_up(atom/atom) + attach(atom) + oldposition = get_turf(atom) + +/datum/effect_system/trail_follow/Destroy() oldposition = null return ..() -/datum/effect/system/ion_trail_follow/set_up(atom/atom) - attach(atom) +/datum/effect_system/trail_follow/proc/stop() + processing = 0 + on = 0 + oldposition = null -/datum/effect/system/ion_trail_follow/start() //Whoever is responsible for this abomination of code should become an hero - if(!src.on) - src.on = 1 - src.processing = 1 - if(src.processing) - src.processing = 0 +/datum/effect_system/trail_follow/steam + effect_type = /obj/effect/particle_effect/steam + +/datum/effect_system/trail_follow/steam/start() //Whoever is responsible for this abomination of code should become an hero + if(!on) + on = 1 + processing = 1 + if(!oldposition) + oldposition = get_turf(holder) + if(processing) + processing = 0 + if(number < 3) + var/obj/effect/particle_effect/steam/I = new effect_type(oldposition) + number++ + I.dir = holder.dir + oldposition = get_turf(holder) + spawn(10) + qdel(I) + number-- + spawn(2) + if(on) + processing = 1 + start() + +/obj/effect/particle_effect/ion_trails + name = "ion trails" + icon_state = "ion_trails" + anchored = 1 + +/datum/effect_system/trail_follow/ion + effect_type = /obj/effect/particle_effect/ion_trails + +/datum/effect_system/trail_follow/ion/start() //Whoever is responsible for this abomination of code should become an hero + if(!on) + on = 1 + processing = 1 + if(processing) + processing = 0 var/turf/T = get_turf(src.holder) - if(T != src.oldposition) + if(T != oldposition) if(!has_gravity(T)) - var/obj/effect/effect/ion_trails/I = new /obj/effect/effect/ion_trails(src.oldposition) - I.dir = src.holder.dir + var/obj/effect/particle_effect/ion_trails/I = new effect_type(oldposition) + I.dir = holder.dir flick("ion_fade", I) I.icon_state = "" spawn(20) - if(I) - qdel(I) - src.oldposition = T + qdel(I) + oldposition = T spawn(2) - if(src.on) - src.processing = 1 - src.start() + if(on) + processing = 1 + start() -/datum/effect/system/ion_trail_follow/proc/stop() - src.processing = 0 - src.on = 0 - oldposition = null - -/datum/effect/system/ion_trail_follow/space_trail +/datum/effect_system/trail_follow/ion/space_trail var/turf/oldloc // secondary ion trail loc var/turf/currloc -/datum/effect/system/ion_trail_follow/space_trail/Destroy() +/datum/effect_system/trail_follow/ion/space_trail/Destroy() oldloc = null currloc = null return ..() -/datum/effect/system/ion_trail_follow/space_trail/start() - if(!src.on) - src.on = 1 - src.processing = 1 - if(src.processing) - src.processing = 0 +/datum/effect_system/trail_follow/ion/space_trail/start() + if(!on) + on = 1 + processing = 1 + if(processing) + processing = 0 spawn(0) var/turf/T = get_turf(src.holder) if(currloc != T) @@ -89,11 +116,11 @@ src.oldloc = get_step(oldposition,NORTH) //src.oldloc = get_step(oldloc,EAST) if(istype(T, /turf/space)) - var/obj/effect/effect/ion_trails/I = new /obj/effect/effect/ion_trails(src.oldposition) - var/obj/effect/effect/ion_trails/II = new /obj/effect/effect/ion_trails(src.oldloc) + var/obj/effect/particle_effect/ion_trails/I = new effect_type(oldposition) + var/obj/effect/particle_effect/ion_trails/II = new effect_type(oldloc) //src.oldposition = T - I.dir = src.holder.dir - II.dir = src.holder.dir + I.dir = holder.dir + II.dir = holder.dir flick("ion_fade", I) flick("ion_fade", II) I.icon_state = "" @@ -104,32 +131,31 @@ if(II) qdel(II) spawn(2) - if(src.on) - src.processing = 1 - src.start() + if(on) + processing = 1 + start() currloc = T //Reagent-based explosion effect -/datum/effect/system/reagents_explosion +/datum/effect_system/reagents_explosion var/amount // TNT equivalent var/flashing = 0 // does explosion creates flash effect? var/flashing_factor = 0 // factor of how powerful the flash effect relatively to the explosion -/datum/effect/system/reagents_explosion/set_up(amt, loc, flash = 0, flash_fact = 0) +/datum/effect_system/reagents_explosion/set_up(amt, loca, flash = 0, flash_fact = 0) amount = amt - if(istype(loc, /turf/)) - location = loc + if(isturf(loca)) + location = loca else - location = get_turf(loc) + location = get_turf(loca) flashing = flash flashing_factor = flash_fact - return -/datum/effect/system/reagents_explosion/start() +/datum/effect_system/reagents_explosion/start() if(amount <= 2) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, location) s.start() @@ -156,7 +182,7 @@ if(round(amount/3) > 0) light = min (MAX_EX_LIGHT_RANGE, light + round(amount/3)) - if(flash && flashing_factor) + if(flashing && flashing_factor) flash += (round(amount/4) * flashing_factor) for(var/mob/M in viewers(8, location)) @@ -164,7 +190,7 @@ explosion(location, devastation, heavy, light, flash) -/datum/effect/system/reagents_explosion/proc/holder_damage(atom/holder) +/datum/effect_system/reagents_explosion/proc/holder_damage(atom/holder) if(holder) var/dmglevel = 4 diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm index cc0259c6c6f..64421b35fe9 100644 --- a/code/game/objects/effects/effect_system/effects_smoke.dm +++ b/code/game/objects/effects/effect_system/effects_smoke.dm @@ -4,7 +4,7 @@ // in case you wanted a vent to always smoke north for example ///////////////////////////////////////////// -/obj/effect/effect/smoke +/obj/effect/particle_effect/smoke name = "smoke" icon_state = "smoke" icon = 'icons/effects/96x96.dmi' @@ -12,12 +12,11 @@ pixel_y = -32 opacity = 1 anchored = 0 - mouse_opacity = 0 var/steps = 0 var/lifetime = 5 var/direction -/obj/effect/effect/smoke/proc/fade_out(frames = 16) +/obj/effect/particle_effect/smoke/proc/fade_out(frames = 16) if(alpha == 0) //Handle already transparent case return if(frames == 0) @@ -29,21 +28,21 @@ set_opacity(0) stoplag() -/obj/effect/effect/smoke/New() +/obj/effect/particle_effect/smoke/New() ..() processing_objects |= src lifetime += rand(-1,1) -/obj/effect/effect/smoke/Destroy() +/obj/effect/particle_effect/smoke/Destroy() processing_objects.Remove(src) return ..() -/obj/effect/effect/smoke/proc/kill_smoke() +/obj/effect/particle_effect/smoke/proc/kill_smoke() processing_objects.Remove(src) addtimer(src, "fade_out", 0) QDEL_IN(src, 10) -/obj/effect/effect/smoke/process() +/obj/effect/particle_effect/smoke/process() lifetime-- if(lifetime < 1) kill_smoke() @@ -53,12 +52,12 @@ steps-- return 1 -/obj/effect/effect/smoke/Crossed(mob/living/M) +/obj/effect/particle_effect/smoke/Crossed(mob/living/M) if(!istype(M)) return smoke_mob(M) -/obj/effect/effect/smoke/proc/smoke_mob(mob/living/carbon/C) +/obj/effect/particle_effect/smoke/proc/smoke_mob(mob/living/carbon/C) if(!istype(C)) return FALSE if(lifetime<1) @@ -71,31 +70,31 @@ addtimer(src, "remove_smoke_delay", 10, FALSE, C) return TRUE -/obj/effect/effect/smoke/proc/remove_smoke_delay(mob/living/carbon/C) +/obj/effect/particle_effect/smoke/proc/remove_smoke_delay(mob/living/carbon/C) if(C) C.smoke_delay = 0 -/datum/effect/system/smoke_spread +/datum/effect_system/smoke_spread + effect_type = /obj/effect/particle_effect/smoke var/direction - var/smoke_type = /obj/effect/effect/smoke -/datum/effect/system/smoke_spread/set_up(n = 5, c = 0, loca, direct) +/datum/effect_system/smoke_spread/set_up(n = 5, c = 0, loca, direct) if(n > 20) n = 20 number = n cardinals = c - if(istype(loca, /turf/)) + if(isturf(loca)) location = loca else location = get_turf(loca) if(direct) direction = direct -/datum/effect/system/smoke_spread/start() +/datum/effect_system/smoke_spread/start() for(var/i=0, i 20) n = 20 number = n cardinals = c - if(istype(loca, /turf/)) + if(isturf(loca)) location = loca else location = get_turf(loca) @@ -273,9 +272,9 @@ msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink]). No associated key. CODERS: carry.my_atom may be null.", 0, 1) log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key. CODERS: carry.my_atom may be null.") -/datum/effect/system/smoke_spread/chem/start(effect_range = 2) +/datum/effect_system/smoke_spread/chem/start(effect_range = 2) var/color = mix_color_from_reagents(chemholder.reagents.reagent_list) - var/obj/effect/effect/smoke/chem/smokeholder = new smoke_type(location) + var/obj/effect/particle_effect/smoke/chem/smokeholder = new effect_type(location) for(var/atom/A in view(effect_range, smokeholder)) chemholder.reagents.reaction(A) if(iscarbon(A)) @@ -286,7 +285,7 @@ for(var/i=0, i 10) - n = 10 - number = n - cardinals = c - if(istype(loca, /turf/)) - location = loca - else - location = get_turf(loca) - -/datum/effect/system/spark_spread/start() - var/i = 0 - for(i=0, i 20) - return - spawn(0) - if(holder) - src.location = get_turf(holder) - var/obj/effect/effect/sparks/sparks = new /obj/effect/effect/sparks(src.location) - src.total_sparks++ - var/direction - if(src.cardinals) - direction = pick(cardinal) - else - direction = pick(alldirs) - for(i=0, i 10) - n = 10 - number = n - cardinals = c - if(istype(loca, /turf/)) - location = loca - else - location = get_turf(loca) - -/datum/effect/system/sparkle_spread/start() - var/i = 0 - for(i=0, i 20) - return - spawn(0) - if(holder) - src.location = get_turf(holder) - var/obj/effect/sparkles/sparks = new(src.location) - src.total_sparks++ - var/direction - if(src.cardinals) - direction = pick(cardinal) - else - direction = pick(alldirs) - for(i=0, i 10) - n = 10 - number = n - cardinals = c - location = loc - -/datum/effect/system/steam_spread/start() - var/i = 0 - for(i=0, i Date: Sat, 4 Nov 2017 20:16:01 +0400 Subject: [PATCH 10/11] compiles, find and replace particle_effect and effect_system --- code/ATMOSPHERICS/pipes/simple/pipe_simple.dm | 2 +- code/datums/helper_datums/teleport.dm | 12 ++++++------ code/datums/spell.dm | 8 ++++---- code/datums/spells/ethereal_jaunt.dm | 2 +- code/datums/spells/rathens.dm | 2 +- code/game/gamemodes/antag_spawner.dm | 2 +- code/game/gamemodes/blob/blobs/blob_mobs.dm | 2 +- .../gamemodes/miniantags/abduction/abduction_gear.dm | 2 +- .../gamemodes/miniantags/abduction/machinery/pad.dm | 2 +- .../miniantags/revenant/revenant_abilities.dm | 4 ++-- .../gamemodes/shadowling/shadowling_abilities.dm | 4 ++-- code/game/gamemodes/vampire/vampire_powers.dm | 2 +- code/game/gamemodes/wizard/artefact.dm | 2 +- code/game/gamemodes/wizard/godhand.dm | 6 +++--- code/game/machinery/ai_slipper.dm | 2 +- code/game/machinery/camera/camera.dm | 2 +- code/game/machinery/computer/HolodeckControl.dm | 6 +++--- code/game/machinery/computer/message.dm | 2 +- code/game/machinery/cryopod.dm | 2 +- code/game/machinery/deployable.dm | 8 ++++---- code/game/machinery/doors/airlock.dm | 2 +- code/game/machinery/doors/door.dm | 2 +- code/game/machinery/doors/poddoor.dm | 6 +++--- code/game/machinery/doors/windowdoor.dm | 2 +- code/game/machinery/igniter.dm | 2 +- code/game/machinery/machinery.dm | 2 +- code/game/machinery/portable_turret.dm | 4 ++-- code/game/machinery/programmable_unloader.dm | 2 +- code/game/machinery/quantum_pad.dm | 2 +- code/game/mecha/combat/marauder.dm | 2 +- code/game/mecha/equipment/tools/work_tools.dm | 2 +- code/game/mecha/mecha.dm | 2 +- code/game/objects/effects/anomalies.dm | 2 +- code/game/objects/effects/decals/Cleanable/robots.dm | 2 +- code/game/objects/effects/decals/remains.dm | 4 ++-- code/game/objects/effects/gibs.dm | 2 +- code/game/objects/effects/mines.dm | 2 +- code/game/objects/explosion.dm | 4 ++-- code/game/objects/items/devices/chameleonproj.dm | 2 +- code/game/objects/items/devices/radio/electropack.dm | 2 +- code/game/objects/items/toys.dm | 4 ++-- code/game/objects/items/weapons/RCD.dm | 4 ++-- code/game/objects/items/weapons/alien_specific.dm | 2 +- code/game/objects/items/weapons/cigs.dm | 4 ++-- code/game/objects/items/weapons/extinguisher.dm | 2 +- code/game/objects/items/weapons/fireworks.dm | 4 ++-- .../game/objects/items/weapons/grenades/smokebomb.dm | 4 ++-- code/game/objects/items/weapons/legcuffs.dm | 2 +- code/game/objects/items/weapons/melee/energy.dm | 4 ++-- code/game/objects/items/weapons/rpd.dm | 4 ++-- code/game/objects/items/weapons/scrolls.dm | 2 +- code/game/objects/items/weapons/storage/secure.dm | 2 +- code/game/objects/items/weapons/tanks/jetpack.dm | 6 +++--- code/game/objects/items/weapons/tanks/watertank.dm | 4 ++-- code/game/objects/items/weapons/twohanded.dm | 4 ++-- .../objects/structures/crates_lockers/closets.dm | 4 ++-- .../game/objects/structures/crates_lockers/crates.dm | 8 ++++---- code/game/objects/structures/electricchair.dm | 2 +- code/game/objects/structures/grille.dm | 2 +- code/game/objects/structures/tables_racks.dm | 2 +- code/game/turfs/unsimulated/beach.dm | 4 ++-- code/modules/assembly/igniter.dm | 2 +- code/modules/awaymissions/mission_code/beach.dm | 2 +- code/modules/awaymissions/mission_code/wildwest.dm | 2 +- code/modules/awaymissions/trigger.dm | 8 ++++---- code/modules/clothing/gloves/miscellaneous.dm | 2 +- code/modules/clothing/spacesuits/hardsuit.dm | 2 +- code/modules/clothing/spacesuits/rig/rig.dm | 2 +- code/modules/events/rogue_drones.dm | 2 +- code/modules/events/vent_clog.dm | 2 +- code/modules/fish/fishtank.dm | 2 +- .../food_and_drinks/kitchen_machinery/cooker.dm | 2 +- .../kitchen_machinery/kitchen_machine.dm | 2 +- code/modules/hydroponics/plant_genes.dm | 2 +- code/modules/martial_arts/mimejutsu.dm | 2 +- code/modules/mining/equipment_locker.dm | 4 ++-- code/modules/mining/lavaland/loot/tendril_loot.dm | 4 ++-- code/modules/mining/mine_items.dm | 2 +- .../mob/living/carbon/alien/humanoid/humanoid.dm | 2 +- code/modules/mob/living/carbon/human/death.dm | 2 +- code/modules/mob/living/carbon/human/human.dm | 2 +- code/modules/mob/living/carbon/human/human_organs.dm | 2 +- code/modules/mob/living/carbon/human/life.dm | 4 ++-- code/modules/mob/living/silicon/robot/robot.dm | 6 +++--- code/modules/mob/living/simple_animal/bot/bot.dm | 4 ++-- .../modules/mob/living/simple_animal/bot/cleanbot.dm | 4 ++-- .../modules/mob/living/simple_animal/bot/ed209bot.dm | 2 +- .../modules/mob/living/simple_animal/bot/floorbot.dm | 2 +- code/modules/mob/living/simple_animal/bot/medbot.dm | 2 +- code/modules/mob/living/simple_animal/bot/mulebot.dm | 2 +- code/modules/mob/living/simple_animal/bot/secbot.dm | 2 +- .../mob/living/simple_animal/friendly/corgi.dm | 4 ++-- .../mob/living/simple_animal/hostile/hivebot.dm | 4 ++-- .../living/simple_animal/hostile/retaliate/drone.dm | 10 +++++----- .../file_system/programs/antagonist/revelation.dm | 4 ++-- code/modules/ninja/energy_katana.dm | 4 ++-- code/modules/power/apc.dm | 8 ++++---- code/modules/power/cable.dm | 2 +- code/modules/power/lighting.dm | 4 ++-- code/modules/power/singularity/containment_field.dm | 2 +- code/modules/power/singularity/emitter.dm | 2 +- code/modules/power/singularity/narsie.dm | 2 +- code/modules/power/smes.dm | 10 +++++----- code/modules/projectiles/guns/magic/wand.dm | 2 +- code/modules/projectiles/projectile/bullets.dm | 4 ++-- code/modules/projectiles/projectile/energy.dm | 4 ++-- code/modules/projectiles/projectile/magic.dm | 2 +- code/modules/projectiles/projectile/special.dm | 2 +- code/modules/reagents/chem_splash.dm | 2 +- .../reagents/chemistry/reagents/pyrotechnic.dm | 2 +- code/modules/reagents/chemistry/recipes/others.dm | 6 +++--- .../reagents/chemistry/recipes/pyrotechnics.dm | 12 ++++++------ code/modules/reagents/chemistry/recipes/toxins.dm | 2 +- code/modules/research/experimentor.dm | 12 ++++++------ code/modules/spacepods/spacepod.dm | 4 ++-- code/modules/station_goals/bsa.dm | 2 +- code/modules/surgery/organs/augments_arms.dm | 2 +- code/modules/surgery/organs/organ_external.dm | 2 +- code/modules/telesci/telepad.dm | 2 +- code/modules/telesci/telesci_computer.dm | 6 +++--- 120 files changed, 201 insertions(+), 201 deletions(-) diff --git a/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm b/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm index 235714e51c1..54fd177e94d 100644 --- a/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm +++ b/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm @@ -89,7 +89,7 @@ /obj/machinery/atmospherics/pipe/simple/proc/burst() src.visible_message("\The [src] bursts!"); playsound(src.loc, 'sound/effects/bang.ogg', 25, 1) - var/datum/effect/system/smoke_spread/smoke = new + var/datum/effect_system/smoke_spread/smoke = new smoke.set_up(1,0, src.loc, 0) smoke.start() qdel(src) diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm index 5e89d48be5e..0e6b2cdc82b 100644 --- a/code/datums/helper_datums/teleport.dm +++ b/code/datums/helper_datums/teleport.dm @@ -9,8 +9,8 @@ var/atom/movable/teleatom //atom to teleport var/atom/destination //destination to teleport to var/precision = 0 //teleport precision - var/datum/effect/system/effectin //effect to show right before teleportation - var/datum/effect/system/effectout //effect to show right after teleportation + var/datum/effect_system/effectin //effect to show right before teleportation + var/datum/effect_system/effectout //effect to show right after teleportation var/soundin //soundfile to play before teleportation var/soundout //soundfile to play after teleportation var/force_teleport = 1 //if false, teleport will use Move() proc (dense objects will prevent teleportation) @@ -59,7 +59,7 @@ //custom effects must be properly set up first for instant-type teleports //optional -/datum/teleport/proc/setEffects(datum/effect/system/aeffectin=null,datum/effect/system/aeffectout=null) +/datum/teleport/proc/setEffects(datum/effect_system/aeffectin=null,datum/effect_system/aeffectout=null) effectin = istype(aeffectin) ? aeffectin : null effectout = istype(aeffectout) ? aeffectout : null return 1 @@ -79,7 +79,7 @@ /datum/teleport/proc/teleportChecks() return 1 -/datum/teleport/proc/playSpecials(atom/location,datum/effect/system/effect,sound) +/datum/teleport/proc/playSpecials(atom/location,datum/effect_system/effect,sound) if(location) if(effect) spawn(-1) @@ -146,9 +146,9 @@ /datum/teleport/instant/science -/datum/teleport/instant/science/setEffects(datum/effect/system/aeffectin,datum/effect/system/aeffectout) +/datum/teleport/instant/science/setEffects(datum/effect_system/aeffectin,datum/effect_system/aeffectout) if(aeffectin==null || aeffectout==null) - var/datum/effect/system/spark_spread/aeffect = new + var/datum/effect_system/spark_spread/aeffect = new aeffect.set_up(5, 1, teleatom) effectin = effectin || aeffect effectout = effectout || aeffect diff --git a/code/datums/spell.dm b/code/datums/spell.dm index 4a92130ec37..7afdc1b91d9 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -258,20 +258,20 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin if(istype(target,/mob/living) && message) to_chat(target, text("[message]")) if(sparks_spread) - var/datum/effect/system/spark_spread/sparks = new /datum/effect/system/spark_spread() + var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread() sparks.set_up(sparks_amt, 0, location) //no idea what the 0 is sparks.start() if(smoke_spread) if(smoke_spread == 1) - var/datum/effect/system/smoke_spread/smoke = new + var/datum/effect_system/smoke_spread/smoke = new smoke.set_up(smoke_amt, 0, location) //no idea what the 0 is smoke.start() else if(smoke_spread == 2) - var/datum/effect/system/smoke_spread/bad/smoke = new + var/datum/effect_system/smoke_spread/bad/smoke = new smoke.set_up(smoke_amt, 0, location) //no idea what the 0 is smoke.start() else if(smoke_spread == 3) - var/datum/effect/system/smoke_spread/sleeping/smoke = new + var/datum/effect_system/smoke_spread/sleeping/smoke = new smoke.set_up(smoke_amt, 0, location) // same here smoke.start() diff --git a/code/datums/spells/ethereal_jaunt.dm b/code/datums/spells/ethereal_jaunt.dm index b9ad3d22e70..89b3ec3994a 100644 --- a/code/datums/spells/ethereal_jaunt.dm +++ b/code/datums/spells/ethereal_jaunt.dm @@ -69,7 +69,7 @@ flick("liquify",animation) target.loc = holder target.client.eye = holder - var/datum/effect/system/steam_spread/steam = new /datum/effect/system/steam_spread() + var/datum/effect_system/steam_spread/steam = new /datum/effect_system/steam_spread() steam.set_up(10, 0, mobloc) steam.start() sleep(jaunt_duration) diff --git a/code/datums/spells/rathens.dm b/code/datums/spells/rathens.dm index 8eb739ece90..adecaff614c 100644 --- a/code/datums/spells/rathens.dm +++ b/code/datums/spells/rathens.dm @@ -14,7 +14,7 @@ /obj/effect/proc_holder/spell/targeted/rathens/cast(list/targets, mob/user = usr) playsound(get_turf(user), 'sound/goonstation/effects/superfart.ogg', 25, 1) for(var/mob/living/carbon/human/H in targets) - var/datum/effect/system/smoke_spread/s = new + var/datum/effect_system/smoke_spread/s = new s.set_up(5, 0, H) s.start() var/obj/item/organ/internal/appendix/A = H.get_int_organ(/obj/item/organ/internal/appendix) diff --git a/code/game/gamemodes/antag_spawner.dm b/code/game/gamemodes/antag_spawner.dm index d85b3c91258..0e33a68fabc 100644 --- a/code/game/gamemodes/antag_spawner.dm +++ b/code/game/gamemodes/antag_spawner.dm @@ -52,7 +52,7 @@ if(!borg_to_spawn) //If there's no type at all, let it still be used but don't do anything used = 0 return - var/datum/effect/system/spark_spread/S = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/S = new /datum/effect_system/spark_spread S.set_up(4, 1, src) S.start() var/mob/living/silicon/robot/R diff --git a/code/game/gamemodes/blob/blobs/blob_mobs.dm b/code/game/gamemodes/blob/blobs/blob_mobs.dm index e1e454eedad..c9e15d20f38 100644 --- a/code/game/gamemodes/blob/blobs/blob_mobs.dm +++ b/code/game/gamemodes/blob/blobs/blob_mobs.dm @@ -97,7 +97,7 @@ /mob/living/simple_animal/hostile/blob/blobspore/death(gibbed) ..() // On death, create a small smoke of harmful gas (s-Acid) - var/datum/effect/system/smoke_spread/chem/S = new + var/datum/effect_system/smoke_spread/chem/S = new var/turf/location = get_turf(src) // Create the reagents to put into the air diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm index 1408e0a87fc..a221ddadd55 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm @@ -461,7 +461,7 @@ Congratulations! You are now trained for invasive xenobiology research!"} /obj/item/weapon/restraints/handcuffs/energy/used/dropped(mob/user) user.visible_message("[user]'s [src] break in a discharge of energy!", \ "[user]'s [src] break in a discharge of energy!") - var/datum/effect/system/spark_spread/S = new + var/datum/effect_system/spark_spread/S = new S.set_up(4,0,user.loc) S.start() qdel(src) diff --git a/code/game/gamemodes/miniantags/abduction/machinery/pad.dm b/code/game/gamemodes/miniantags/abduction/machinery/pad.dm index f0ceac0d6ce..e03a5bf9666 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/pad.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/pad.dm @@ -50,7 +50,7 @@ duration = 80 /obj/effect/overlay/temp/teleport_abductor/New() - var/datum/effect/system/spark_spread/S = new + var/datum/effect_system/spark_spread/S = new S.set_up(10,0,loc) S.start() ..() \ No newline at end of file diff --git a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm index 3504ada2a94..dc4a62438b7 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm @@ -209,7 +209,7 @@ if(!L.on) return L.visible_message("\The [L] suddenly flares brightly and begins to spark!") - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread/ + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread/ s.set_up(4, 0, L) s.start() new/obj/effect/overlay/temp/revenant(L.loc) @@ -222,7 +222,7 @@ return M.Beam(L,icon_state="purple_lightning",icon='icons/effects/effects.dmi',time=5) M.electrocute_act(shock_damage, "[L.name]", safety=1) - var/datum/effect/system/spark_spread/z = new /datum/effect/system/spark_spread/ + var/datum/effect_system/spark_spread/z = new /datum/effect_system/spark_spread/ z.set_up(4, 0, M) z.start() playsound(M, 'sound/machines/defib_zap.ogg', 50, 1, -1) diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm index 51b2fddcd21..e0a4052bd75 100644 --- a/code/game/gamemodes/shadowling/shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm @@ -473,7 +473,7 @@ B.reagents.clear_reagents() //Just in case! B.icon_state = null //Invisible B.reagents.add_reagent("blindness_smoke", 10) - var/datum/effect/system/smoke_spread/chem/S = new + var/datum/effect_system/smoke_spread/chem/S = new S.attach(B) if(S) S.set_up(B.reagents, 10, 0, B.loc) @@ -535,7 +535,7 @@ to_chat(S, "ERROR $!(@ ERROR )#^! SENSORY OVERLOAD \[$(!@#") S << 'sound/misc/interference.ogg' playsound(S, 'sound/machines/warning-buzzer.ogg', 50, 1) - var/datum/effect/system/spark_spread/sp = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread sp.set_up(5, 1, S) sp.start() S.Weaken(6) diff --git a/code/game/gamemodes/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm index 076aea8049c..c78cc55676f 100644 --- a/code/game/gamemodes/vampire/vampire_powers.dm +++ b/code/game/gamemodes/vampire/vampire_powers.dm @@ -431,7 +431,7 @@ flick("liquify", animation) user.forceMove(holder) user.client.eye = holder - var/datum/effect/system/steam_spread/steam = new /datum/effect/system/steam_spread() + var/datum/effect_system/steam_spread/steam = new /datum/effect_system/steam_spread() steam.set_up(10, 0, originalloc) steam.start() sleep(jaunt_duration) diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 423121eaea0..482ac6f644e 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -53,7 +53,7 @@ var/list/candidates = pollCandidates("Do you want to play as the wizard apprentice of [H.real_name]?", ROLE_WIZARD, 1) if(candidates.len) var/mob/C = pick(candidates) - new /obj/effect/effect/smoke(H.loc) + new /obj/effect/particle_effect/smoke(H.loc) var/mob/living/carbon/human/M = new/mob/living/carbon/human(H.loc) M.key = C.key to_chat(M, "You are the [H.real_name]'s apprentice! You are bound by magic contract to follow their orders and help them in accomplishing their goals.") diff --git a/code/game/gamemodes/wizard/godhand.dm b/code/game/gamemodes/wizard/godhand.dm index 18084d65009..16f9adb8dd9 100644 --- a/code/game/gamemodes/wizard/godhand.dm +++ b/code/game/gamemodes/wizard/godhand.dm @@ -49,7 +49,7 @@ if(!proximity || target == user || !ismob(target) || !iscarbon(user) || user.lying || user.handcuffed) //exploding after touching yourself would be bad return var/mob/M = target - var/datum/effect/system/spark_spread/sparks = new + var/datum/effect_system/spark_spread/sparks = new sparks.set_up(4, 0, M.loc) //no idea what the 0 is sparks.start() M.gib() @@ -85,7 +85,7 @@ /obj/item/weapon/melee/touch_attack/fake_disintegrate/afterattack(atom/target, mob/living/carbon/user, proximity) if(!proximity || target == user || !ismob(target) || !iscarbon(user) || user.lying || user.handcuffed) //not exploding after touching yourself would be bad return - var/datum/effect/system/spark_spread/sparks = new + var/datum/effect_system/spark_spread/sparks = new sparks.set_up(4, 0, target.loc) //no idea what the 0 is sparks.start() playsound(target.loc, 'sound/goonstation/effects/gib.ogg', 50, 1) @@ -107,7 +107,7 @@ to_chat(user, "The spell has no effect on [target].") return - var/datum/effect/system/smoke_spread/s = new + var/datum/effect_system/smoke_spread/s = new s.set_up(5, 0, target) s.start() diff --git a/code/game/machinery/ai_slipper.dm b/code/game/machinery/ai_slipper.dm index 63aeee28b2f..13d619aef9f 100644 --- a/code/game/machinery/ai_slipper.dm +++ b/code/game/machinery/ai_slipper.dm @@ -62,7 +62,7 @@ if(cooldown_on || disabled) return else - new /obj/structure/foam(loc) + new /obj/effect/particle_effect/foam(loc) uses-- cooldown_on = TRUE cooldown_time = world.timeofday + 100 diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 5391e633b26..b0179ff493f 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -244,7 +244,7 @@ else if(istype(W, /obj/item/weapon/melee/energy/blade))//Putting it here last since it's a special case. I wonder if there is a better way to do these than type casting. toggle_cam(user, 1) - var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, loc) spark_system.start() playsound(loc, W.usesound, 50, 1) diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index c5c34e9da02..7d75d8ae016 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -217,7 +217,7 @@ for(var/turf/T in linkedholodeck) if(prob(30)) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, T) s.start() T.ex_act(3) @@ -257,7 +257,7 @@ if(L.name=="Atmospheric Test Start") spawn(20) var/turf/T = get_turf(L) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, T) s.start() if(T) @@ -306,7 +306,7 @@ /* if(L.name=="Atmospheric Test Start") spawn(20) var/turf/T = get_turf(L) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, T) s.start() if(T) diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index 644f9cddec8..a0ddb949449 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -15,7 +15,7 @@ //Server linked to. var/obj/machinery/message_server/linkedServer = null //Sparks effect - For emag - var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread //Messages - Saves me time if I want to change something. var/noserver = "ALERT: No server detected." var/incorrectkey = "ALERT: Incorrect decryption key!" diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 6df9f81f14c..3097c556681 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -148,7 +148,7 @@ playsound(src, 'sound/machines/buzz-sigh.ogg', 30, 1) return visible_message("The console sparks, and some items fall out!") - var/datum/effect/system/spark_spread/sparks = new + var/datum/effect_system/spark_spread/sparks = new sparks.set_up(5, 1, src) sparks.start() for(var/obj/item/I in objective_items) diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index 05dbcb4e12a..723a2cc3770 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -188,7 +188,7 @@ for reference: to_chat(user, "Barrier lock toggled off.") return else - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, src) s.start() visible_message("BZZzZZzZZzZT") @@ -223,14 +223,14 @@ for reference: emagged = 1 req_access = null to_chat(user, "You break the ID authentication lock on the [src].") - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, src) s.start() visible_message("BZZzZZzZZzZT") else if(src.emagged == 1) src.emagged = 2 to_chat(user, "You short out the anchoring mechanism on the [src].") - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, src) s.start() visible_message("BZZzZZzZZzZT") @@ -275,7 +275,7 @@ for reference: /* var/obj/item/stack/rods/ =*/ new /obj/item/stack/rods(Tsec) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 80a4a36ee44..4d9598681b1 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -650,7 +650,7 @@ About the new airlock wires panel: if(isElectrified() && density && istype(mover, /obj/item)) var/obj/item/I = mover if(I.flags & CONDUCT) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() return ..() diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 4f68c721c1c..88b750feeb9 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -190,7 +190,7 @@ qdel(src) if(3.0) if(prob(80)) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, src) s.start() return diff --git a/code/game/machinery/doors/poddoor.dm b/code/game/machinery/doors/poddoor.dm index 1f83484ae70..f8ea575dce8 100644 --- a/code/game/machinery/doors/poddoor.dm +++ b/code/game/machinery/doors/poddoor.dm @@ -26,20 +26,20 @@ if(prob(80)) qdel(src) else - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, src) s.start() if(2.0) if(prob(20)) qdel(src) else - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, src) s.start() if(3.0) if(prob(80)) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, src) s.start() diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index baaf936e189..36a1045894d 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -232,7 +232,7 @@ desc += "
Its access panel is smoking slightly." if(istype(weapon, /obj/item/weapon/melee/energy/blade)) var/obj/item/weapon/melee/energy/blade/B - var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, loc) spark_system.start() playsound(loc, "sparks", 50, 1) diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm index 219f1613d99..44a5cc3eee4 100755 --- a/code/game/machinery/igniter.dm +++ b/code/game/machinery/igniter.dm @@ -98,7 +98,7 @@ flick("[base_state]-spark", src) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, src) s.start() src.last_spark = world.time diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index b8244771de0..65f34737756 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -556,7 +556,7 @@ Class Procs: return 0 if((TK in user.mutations) && !Adjacent(user)) return 0 - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() if(electrocute_mob(user, get_area(src), src, 0.7)) diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index d9162bd5359..d46a49742e9 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -49,7 +49,7 @@ var/shot_sound //what sound should play when the turret fires var/eshot_sound //what sound should play when the emagged turret fires - var/datum/effect/system/spark_spread/spark_system //the spark system, used for generating... sparks? + var/datum/effect_system/spark_spread/spark_system //the spark system, used for generating... sparks? var/wrenching = 0 var/last_target //last target fired at, prevents turrets from erratically firing at all valid targets in range @@ -96,7 +96,7 @@ one_access = 1 //Sets up a spark system - spark_system = new /datum/effect/system/spark_spread + spark_system = new /datum/effect_system/spark_spread spark_system.set_up(5, 0, src) spark_system.attach(src) diff --git a/code/game/machinery/programmable_unloader.dm b/code/game/machinery/programmable_unloader.dm index 039e894b86d..62dfff01b5c 100644 --- a/code/game/machinery/programmable_unloader.dm +++ b/code/game/machinery/programmable_unloader.dm @@ -279,7 +279,7 @@ emagged = 1 overrides += emag_overrides - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, src) s.start() return diff --git a/code/game/machinery/quantum_pad.dm b/code/game/machinery/quantum_pad.dm index 809d0a9b09a..d742ab00658 100644 --- a/code/game/machinery/quantum_pad.dm +++ b/code/game/machinery/quantum_pad.dm @@ -94,7 +94,7 @@ doteleport(user) /obj/machinery/quantumpad/proc/sparks() - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, get_turf(src)) s.start() diff --git a/code/game/mecha/combat/marauder.dm b/code/game/mecha/combat/marauder.dm index d8d7b35cb1f..1fa404ed5ce 100644 --- a/code/game/mecha/combat/marauder.dm +++ b/code/game/mecha/combat/marauder.dm @@ -15,7 +15,7 @@ var/smoke = 5 var/smoke_ready = 1 var/smoke_cooldown = 100 - var/datum/effect/system/smoke_spread/smoke_system = new + var/datum/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/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index 4421eba9aae..bf547881869 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -148,7 +148,7 @@ var/list/the_targets = list(T,T1,T2) spawn(0) for(var/a=0, a<5, a++) - var/obj/effect/effect/water/W = new /obj/effect/effect/water(get_turf(chassis)) + var/obj/effect/particle_effect/water/W = new /obj/effect/particle_effect/water(get_turf(chassis)) if(!W) return var/turf/my_target = pick(the_targets) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 975ecdc1e84..2f2772774a3 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -37,7 +37,7 @@ var/maint_access = 1 var/dna //dna-locking the mech var/list/proc_res = list() //stores proc owners, like proc_res["functionname"] = owner reference - var/datum/effect/system/spark_spread/spark_system = new + var/datum/effect_system/spark_spread/spark_system = new var/lights = 0 var/lights_power = 6 var/emagged = 0 diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm index d89f8daae9b..ee8c4efdec4 100644 --- a/code/game/objects/effects/anomalies.dm +++ b/code/game/objects/effects/anomalies.dm @@ -33,7 +33,7 @@ /obj/effect/anomaly/proc/anomalyNeutralize() var/turf/T = get_turf(src) - new /obj/effect/effect/smoke/bad(T) + new /obj/effect/particle_effect/smoke/bad(T) if(aSignal) aSignal.forceMove(T) diff --git a/code/game/objects/effects/decals/Cleanable/robots.dm b/code/game/objects/effects/decals/Cleanable/robots.dm index dbebd72066d..a3582ef0874 100644 --- a/code/game/objects/effects/decals/Cleanable/robots.dm +++ b/code/game/objects/effects/decals/Cleanable/robots.dm @@ -29,7 +29,7 @@ var/obj/effect/decal/cleanable/blood/oil/streak = new(src.loc) streak.update_icon() else if(prob(10)) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() if(step_to(src, get_step(src, direction), 0)) diff --git a/code/game/objects/effects/decals/remains.dm b/code/game/objects/effects/decals/remains.dm index 8835d31c6c2..d57a364255b 100644 --- a/code/game/objects/effects/decals/remains.dm +++ b/code/game/objects/effects/decals/remains.dm @@ -24,7 +24,7 @@ /obj/effect/decal/remains/robot/New() ..() - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() @@ -38,7 +38,7 @@ /obj/effect/decal/remains/slime/New() ..() var/datum/reagents/R = new/datum/reagents(5) - var/obj/effect/effect/water/W = new(get_turf(src)) + var/obj/effect/particle_effect/water/W = new(get_turf(src)) W.reagents = R R.my_atom = W R.add_reagent("water", 5) diff --git a/code/game/objects/effects/gibs.dm b/code/game/objects/effects/gibs.dm index 39cafaa51ed..3cffb3f7eaf 100644 --- a/code/game/objects/effects/gibs.dm +++ b/code/game/objects/effects/gibs.dm @@ -30,7 +30,7 @@ var/obj/effect/decal/cleanable/blood/gibs/gib = null if(sparks) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, location) s.start() diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm index 106c60dc650..eadb460aecc 100644 --- a/code/game/objects/effects/mines.dm +++ b/code/game/objects/effects/mines.dm @@ -27,7 +27,7 @@ if(triggered) return visible_message("[victim] sets off [bicon(src)] [src]!") - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() mineEffect(victim) diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index 86050343662..d166e90c704 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -59,11 +59,11 @@ if(heavy_impact_range > 1) if(smoke) - var/datum/effect/system/explosion/smoke/E = new/datum/effect/system/explosion/smoke() + var/datum/effect_system/explosion/smoke/E = new/datum/effect_system/explosion/smoke() E.set_up(epicenter) E.start() else - var/datum/effect/system/explosion/E = new/datum/effect/system/explosion() + var/datum/effect_system/explosion/E = new/datum/effect_system/explosion() E.set_up(epicenter) E.start() diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index eef0b2072b8..5cd82aef889 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -66,7 +66,7 @@ /obj/item/device/chameleon/proc/disrupt(var/delete_dummy = 1) if(active_dummy) - var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread spark_system.set_up(5, 0, src) spark_system.attach(src) spark_system.start() diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index 7c01d03ca36..e8d023ff101 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -87,7 +87,7 @@ if(M) M.moved_recently = 0 to_chat(M, "You feel a sharp shock!") - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, M) s.start() diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 9f3f2f4545a..560d79975b4 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -244,7 +244,7 @@ /obj/item/toy/snappop/virus/throw_impact(atom/hit_atom) ..() - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() new /obj/effect/decal/cleanable/ash(src.loc) @@ -264,7 +264,7 @@ var/ash_type = /obj/effect/decal/cleanable/ash /obj/item/toy/snappop/proc/pop_burst(var/n=3, var/c=1) - var/datum/effect/system/spark_spread/s = new() + var/datum/effect_system/spark_spread/s = new() s.set_up(n, c, src) s.start() new ash_type(loc) diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index 47047b081e7..9142e7bb2ac 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -20,7 +20,7 @@ RCD origin_tech = "engineering=4;materials=2" toolspeed = 1 usesound = 'sound/items/Deconstruct.ogg' - var/datum/effect/system/spark_spread/spark_system + var/datum/effect_system/spark_spread/spark_system var/max_matter = 100 var/matter = 0 var/working = 0 @@ -47,7 +47,7 @@ RCD /obj/item/weapon/rcd/New() desc = "A RCD. It currently holds [matter]/[max_matter] matter-units." - spark_system = new /datum/effect/system/spark_spread + spark_system = new /datum/effect_system/spark_spread spark_system.set_up(5, 0, src) spark_system.attach(src) rcd_list += src diff --git a/code/game/objects/items/weapons/alien_specific.dm b/code/game/objects/items/weapons/alien_specific.dm index fb81d7f5494..ed16709d642 100644 --- a/code/game/objects/items/weapons/alien_specific.dm +++ b/code/game/objects/items/weapons/alien_specific.dm @@ -40,7 +40,7 @@ to_chat(user, "\The [src] is full.") return reagents.remove_reagent(25,"water") - var/datum/effect/system/smoke_spread/bad/smoke = new + var/datum/effect_system/smoke_spread/bad/smoke = new smoke.set_up(5, 0, user.loc) smoke.start() playsound(user.loc, 'sound/effects/bamf.ogg', 50, 2) diff --git a/code/game/objects/items/weapons/cigs.dm b/code/game/objects/items/weapons/cigs.dm index 766fe92c1ee..fde8461e2ec 100644 --- a/code/game/objects/items/weapons/cigs.dm +++ b/code/game/objects/items/weapons/cigs.dm @@ -130,7 +130,7 @@ LIGHTERS ARE IN LIGHTERS.DM src.lit = 1 damtype = "fire" if(reagents.get_reagent_amount("plasma")) // the plasma explodes when exposed to fire - var/datum/effect/system/reagents_explosion/e = new() + var/datum/effect_system/reagents_explosion/e = new() e.set_up(round(reagents.get_reagent_amount("plasma") / 2.5, 1), get_turf(src), 0, 0) e.start() if(ismob(loc)) @@ -139,7 +139,7 @@ LIGHTERS ARE IN LIGHTERS.DM qdel(src) return if(reagents.get_reagent_amount("fuel")) // the fuel explodes, too, but much less violently - var/datum/effect/system/reagents_explosion/e = new() + var/datum/effect_system/reagents_explosion/e = new() e.set_up(round(reagents.get_reagent_amount("fuel") / 5, 1), get_turf(src), 0, 0) e.start() if(ismob(loc)) diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index 42874e05cf4..a137ccf6dac 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -139,7 +139,7 @@ for(var/a=0, a<5, a++) spawn(0) - var/obj/effect/effect/water/W = new /obj/effect/effect/water( get_turf(src) ) + var/obj/effect/particle_effect/water/W = new /obj/effect/particle_effect/water( get_turf(src) ) var/turf/my_target = pick(the_targets) if(precision) the_targets -= my_target diff --git a/code/game/objects/items/weapons/fireworks.dm b/code/game/objects/items/weapons/fireworks.dm index 1b191a2f894..0293e7c32e4 100644 --- a/code/game/objects/items/weapons/fireworks.dm +++ b/code/game/objects/items/weapons/fireworks.dm @@ -3,7 +3,7 @@ obj/item/weapon/firework icon = 'icons/obj/fireworks.dmi' icon_state = "rocket_0" var/litzor = 0 - var/datum/effect/system/sparkle_spread/S + var/datum/effect_system/sparkle_spread/S obj/item/weapon/firework/attackby(obj/item/weapon/W,mob/user, params) if(litzor) return @@ -25,7 +25,7 @@ obj/item/weapon/sparkler icon = 'icons/obj/fireworks.dmi' icon_state = "sparkler_0" var/litzor = 0 - var/datum/effect/system/spark_spread/S + var/datum/effect_system/spark_spread/S obj/item/weapon/sparkler/attackby(obj/item/weapon/W,mob/user, params) if(litzor) return diff --git a/code/game/objects/items/weapons/grenades/smokebomb.dm b/code/game/objects/items/weapons/grenades/smokebomb.dm index 0b49be912ce..758aad0d298 100644 --- a/code/game/objects/items/weapons/grenades/smokebomb.dm +++ b/code/game/objects/items/weapons/grenades/smokebomb.dm @@ -6,11 +6,11 @@ det_time = 20 item_state = "flashbang" slot_flags = SLOT_BELT - var/datum/effect/system/smoke_spread/bad/smoke + var/datum/effect_system/smoke_spread/bad/smoke New() ..() - src.smoke = new /datum/effect/system/smoke_spread/bad + src.smoke = new /datum/effect_system/smoke_spread/bad src.smoke.attach(src) Destroy() diff --git a/code/game/objects/items/weapons/legcuffs.dm b/code/game/objects/items/weapons/legcuffs.dm index cbb8c3d4ed2..21845a47515 100644 --- a/code/game/objects/items/weapons/legcuffs.dm +++ b/code/game/objects/items/weapons/legcuffs.dm @@ -147,7 +147,7 @@ ..() spawn(100) if(!istype(loc, /mob)) - var/datum/effect/system/spark_spread/sparks = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread sparks.set_up(1, 1, src) sparks.start() qdel(src) diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index afbea9b4c17..1c4ff92708a 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -207,13 +207,13 @@ throw_speed = 3 throw_range = 1 w_class = WEIGHT_CLASS_BULKY //So you can't hide it in your pocket or some such. - var/datum/effect/system/spark_spread/spark_system + var/datum/effect_system/spark_spread/spark_system sharp = 1 //Most of the other special functions are handled in their own files. aka special snowflake code so kewl /obj/item/weapon/melee/energy/blade/New() ..() - spark_system = new /datum/effect/system/spark_spread() + spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, src) spark_system.attach(src) diff --git a/code/game/objects/items/weapons/rpd.dm b/code/game/objects/items/weapons/rpd.dm index f380ae2d26e..2bb948cddeb 100644 --- a/code/game/objects/items/weapons/rpd.dm +++ b/code/game/objects/items/weapons/rpd.dm @@ -41,7 +41,7 @@ w_class = WEIGHT_CLASS_NORMAL materials = list(MAT_METAL = 75000, MAT_GLASS = 37500) origin_tech = "engineering=4;materials=2" - var/datum/effect/system/spark_spread/spark_system + var/datum/effect_system/spark_spread/spark_system var/lastused var/iconrotation = 0 //used to orient icons and pipes var/mode = 1 //Disposals, atmospherics, etc. @@ -53,7 +53,7 @@ /obj/item/weapon/rpd/New() ..() - spark_system = new /datum/effect/system/spark_spread() + spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(1, 0, src) spark_system.attach(src) diff --git a/code/game/objects/items/weapons/scrolls.dm b/code/game/objects/items/weapons/scrolls.dm index 634160a7b63..38de37a3b16 100644 --- a/code/game/objects/items/weapons/scrolls.dm +++ b/code/game/objects/items/weapons/scrolls.dm @@ -59,7 +59,7 @@ to_chat(user, "A mysterious force disrupts your arcane spell matrix, and you remain where you are.") return - var/datum/effect/system/smoke_spread/smoke = new + var/datum/effect_system/smoke_spread/smoke = new smoke.set_up(5, 0, user.loc) smoke.attach(user) smoke.start() diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index 9eaf9eb8a3a..aca19ab423e 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -74,7 +74,7 @@ overlays += image('icons/obj/storage.dmi', icon_locking) locked = 0 if(istype(weapon, /obj/item/weapon/melee/energy/blade)) - var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, src.loc) spark_system.start() playsound(loc, 'sound/weapons/blade1.ogg', 50, 1) diff --git a/code/game/objects/items/weapons/tanks/jetpack.dm b/code/game/objects/items/weapons/tanks/jetpack.dm index 022a8744d7d..3334fdf2de7 100644 --- a/code/game/objects/items/weapons/tanks/jetpack.dm +++ b/code/game/objects/items/weapons/tanks/jetpack.dm @@ -5,7 +5,7 @@ w_class = WEIGHT_CLASS_BULKY item_state = "jetpack" distribute_pressure = ONE_ATMOSPHERE*O2STANDARD - var/datum/effect/system/ion_trail_follow/ion_trail + var/datum/effect_system/trail_follow/ion/ion_trail actions_types = list(/datum/action/item_action/set_internals, /datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization) var/on = 0 var/stabilizers = 0 @@ -13,7 +13,7 @@ /obj/item/weapon/tank/jetpack/New() ..() - ion_trail = new /datum/effect/system/ion_trail_follow() + ion_trail = new /datum/effect_system/trail_follow/ion() ion_trail.set_up(src) /obj/item/weapon/tank/jetpack/Destroy() @@ -143,7 +143,7 @@ /obj/item/weapon/tank/jetpack/carbondioxide/New() ..() - ion_trail = new /datum/effect/system/ion_trail_follow() + ion_trail = new /datum/effect_system/trail_follow/ion() ion_trail.set_up(src) air_contents.carbon_dioxide = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) diff --git a/code/game/objects/items/weapons/tanks/watertank.dm b/code/game/objects/items/weapons/tanks/watertank.dm index 5e6f96b57c3..eed6904cc91 100644 --- a/code/game/objects/items/weapons/tanks/watertank.dm +++ b/code/game/objects/items/weapons/tanks/watertank.dm @@ -300,7 +300,7 @@ if(!Adj|| !istype(target, /turf)) return if(metal_synthesis_cooldown < 5) - var/obj/structure/foam/F = new /obj/structure/foam(get_turf(target), 1) + var/obj/effect/particle_effect/foam/F = new /obj/effect/particle_effect/foam(get_turf(target), 1) F.amount = 0 metal_synthesis_cooldown++ spawn(100) @@ -319,7 +319,7 @@ pass_flags = PASSTABLE /obj/effect/nanofrost_container/proc/Smoke() - var/datum/effect/system/smoke_spread/freezing/S = new + var/datum/effect_system/smoke_spread/freezing/S = new S.set_up(6, 0, loc, null, 1) S.start() var/obj/effect/decal/cleanable/flour/F = new /obj/effect/decal/cleanable/flour(src.loc) diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index 4526af7f98d..5d1755dc9d3 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -607,7 +607,7 @@ origin_tech = "combat=4;powerstorage=7" /obj/item/weapon/twohanded/mjollnir/proc/shock(mob/living/target as mob) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread() + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread() s.set_up(5, 1, target.loc) s.start() target.visible_message("[target.name] was shocked by the [src.name]!", \ @@ -735,7 +735,7 @@ Z.take_organ_damage(0,30) user.visible_message("[user] slams the charged axe into [Z.name] with all their might!") playsound(loc, 'sound/magic/lightningbolt.ogg', 5, 1) - var/datum/effect/system/spark_spread/sparks = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread sparks.set_up(1, 1, src) sparks.start() diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index e989cea7e85..931b777552f 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -212,7 +212,7 @@ if(!(E.rcell && E.rcell.use(E.chargecost))) to_chat(user, "Unable to teleport, insufficient charge.") return - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() do_teleport(src, E.pad, 0) @@ -239,7 +239,7 @@ if(!(E.rcell && E.rcell.use(E.chargecost))) to_chat(user, "Unable to teleport, insufficient charge.") return - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() do_teleport(src, L) diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 043fdf2f9c4..aa0f0bc5d00 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -38,7 +38,7 @@ if(isliving(usr)) var/mob/living/L = usr if(L.electrocute_act(17, src)) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() return 2 @@ -115,7 +115,7 @@ if(!(E.rcell && E.rcell.use(E.chargecost))) to_chat(user, "Unable to teleport, insufficient charge.") return - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() do_teleport(src, E.pad, 0) @@ -139,7 +139,7 @@ if(!(E.rcell && E.rcell.use(E.chargecost))) to_chat(user, "Unable to teleport, insufficient charge.") return - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() do_teleport(src, L) @@ -217,7 +217,7 @@ if(isliving(user)) var/mob/living/L = user if(L.electrocute_act(17, src)) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() return diff --git a/code/game/objects/structures/electricchair.dm b/code/game/objects/structures/electricchair.dm index 2995bda23c3..75b4d6fa5cd 100644 --- a/code/game/objects/structures/electricchair.dm +++ b/code/game/objects/structures/electricchair.dm @@ -72,7 +72,7 @@ A.updateicon() flick("echair_shock", src) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(12, 1, src) s.start() visible_message("The electric chair went off!", "You hear a deep sharp shock!") diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index c1b4984c158..bd552f91a9c 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -276,7 +276,7 @@ var/obj/structure/cable/C = T.get_cable_node() if(C) if(electrocute_mob(user, C, src)) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() return 1 diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index d6bec1019b2..ab014582fe9 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -240,7 +240,7 @@ return if(istype(W, /obj/item/weapon/melee/energy/blade)) - var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, src.loc) spark_system.start() playsound(src.loc, W.usesound, 50, 1) diff --git a/code/game/turfs/unsimulated/beach.dm b/code/game/turfs/unsimulated/beach.dm index 104c0996f0d..e3fad855558 100644 --- a/code/game/turfs/unsimulated/beach.dm +++ b/code/game/turfs/unsimulated/beach.dm @@ -54,7 +54,7 @@ /turf/unsimulated/beach/water/drop, /turf/unsimulated/beach/water/drop/dense, /turf/unsimulated/beach/water, /turf/unsimulated/beach/water/dense, /turf/unsimulated/beach/water/edge_drop) - var/obj/effect/effect/beach_drop_overlay/water_overlay + var/obj/effect/beach_drop_overlay/water_overlay /turf/unsimulated/beach/water/drop/New() ..() @@ -64,7 +64,7 @@ QDEL_NULL(water_overlay) return ..() -/obj/effect/effect/beach_drop_overlay +/obj/effect/beach_drop_overlay name = "Water" icon = 'icons/turf/floors/seadrop-o.dmi' layer = MOB_LAYER + 0.1 diff --git a/code/modules/assembly/igniter.dm b/code/modules/assembly/igniter.dm index b1c76236853..a00cc985483 100644 --- a/code/modules/assembly/igniter.dm +++ b/code/modules/assembly/igniter.dm @@ -4,7 +4,7 @@ icon_state = "igniter" materials = list(MAT_METAL=500, MAT_GLASS=50) origin_tech = "magnets=1" - var/datum/effect/system/spark_spread/sparks = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread /obj/item/device/assembly/igniter/New() ..() diff --git a/code/modules/awaymissions/mission_code/beach.dm b/code/modules/awaymissions/mission_code/beach.dm index 7ae37e759c1..f285d4434da 100644 --- a/code/modules/awaymissions/mission_code/beach.dm +++ b/code/modules/awaymissions/mission_code/beach.dm @@ -21,7 +21,7 @@ return ..() /obj/effect/waterfall/proc/drip() - var/obj/effect/effect/water/W = new(loc) + var/obj/effect/particle_effect/water/W = new(loc) W.dir = dir spawn(1) W.loc = get_step(W, dir) diff --git a/code/modules/awaymissions/mission_code/wildwest.dm b/code/modules/awaymissions/mission_code/wildwest.dm index 0a2eaeef1bf..465e2a3056f 100644 --- a/code/modules/awaymissions/mission_code/wildwest.dm +++ b/code/modules/awaymissions/mission_code/wildwest.dm @@ -177,7 +177,7 @@ call(src,triggerproc)(M) /obj/effect/meatgrinder/proc/triggerrad1(mob) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread for(var/mob/O in viewers(world.view, src.loc)) s.set_up(3, 1, src) s.start() diff --git a/code/modules/awaymissions/trigger.dm b/code/modules/awaymissions/trigger.dm index 6ec536fa4a3..0ac6e656206 100644 --- a/code/modules/awaymissions/trigger.dm +++ b/code/modules/awaymissions/trigger.dm @@ -22,20 +22,20 @@ M.Move(dest) if(entersparks) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(4, 1, src) s.start() if(exitsparks) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(4, 1, dest) s.start() if(entersmoke) - var/datum/effect/system/smoke_spread/s = new + var/datum/effect_system/smoke_spread/s = new s.set_up(4, 1, src, 0) s.start() if(exitsmoke) - var/datum/effect/system/smoke_spread/s = new + var/datum/effect_system/smoke_spread/s = new s.set_up(4, 1, dest, 0) s.start() diff --git a/code/modules/clothing/gloves/miscellaneous.dm b/code/modules/clothing/gloves/miscellaneous.dm index 69588148b9d..6bd080748cb 100644 --- a/code/modules/clothing/gloves/miscellaneous.dm +++ b/code/modules/clothing/gloves/miscellaneous.dm @@ -92,7 +92,7 @@ if(H.a_intent == INTENT_HARM) var/mob/living/carbon/C = A if(cell.use(stun_cost)) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 0, loc) s.start() playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1) diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index b67e485aa6e..99be3e73189 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -585,7 +585,7 @@ /obj/item/clothing/suit/space/hardsuit/shielded/hit_reaction(mob/living/carbon/human/owner, attack_text) if(current_charges > 0) - var/datum/effect/system/spark_spread/s = new + var/datum/effect_system/spark_spread/s = new s.set_up(2, 1, src) s.start() owner.visible_message("[owner]'s shields deflect [attack_text] in a shower of sparks!") diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index f1fb29ed645..1b35df255c8 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -80,7 +80,7 @@ // Wiring! How exciting. var/datum/wires/rig/wires - var/datum/effect/system/spark_spread/spark_system + var/datum/effect_system/spark_spread/spark_system /obj/item/weapon/rig/examine() to_chat(usr, "This is [bicon(src)][src.name].") diff --git a/code/modules/events/rogue_drones.dm b/code/modules/events/rogue_drones.dm index 3a770bf7864..6be28375305 100644 --- a/code/modules/events/rogue_drones.dm +++ b/code/modules/events/rogue_drones.dm @@ -38,7 +38,7 @@ /datum/event/rogue_drone/end() var/num_recovered = 0 for(var/mob/living/simple_animal/hostile/retaliate/malf_drone/D in drones_list) - var/datum/effect/system/spark_spread/sparks = new /datum/effect/system/spark_spread() + var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread() sparks.set_up(3, 0, D.loc) sparks.start() D.z = level_name_to_num(CENTCOMM) diff --git a/code/modules/events/vent_clog.dm b/code/modules/events/vent_clog.dm index 73256d253cd..564194f413b 100644 --- a/code/modules/events/vent_clog.dm +++ b/code/modules/events/vent_clog.dm @@ -28,7 +28,7 @@ R.my_atom = vent R.add_reagent(pick(gunk), 50) - var/datum/effect/system/smoke_spread/chem/smoke = new + var/datum/effect_system/smoke_spread/chem/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(3) diff --git a/code/modules/fish/fishtank.dm b/code/modules/fish/fishtank.dm index 85ec9f292c4..1b5294867d4 100644 --- a/code/modules/fish/fishtank.dm +++ b/code/modules/fish/fishtank.dm @@ -523,7 +523,7 @@ if(water_level && prob(45)) //If there is water, there is a chance the cat will slip, Syndicat will spark like E-N when this happens M.visible_message("[M.name] slipped and got soaked!", "You slipped and got soaked!") if(istype(M, /mob/living/simple_animal/pet/cat/Syndi)) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() else //No water or didn't slip, get that fish! diff --git a/code/modules/food_and_drinks/kitchen_machinery/cooker.dm b/code/modules/food_and_drinks/kitchen_machinery/cooker.dm index 2f686cfb03a..ac82fa9743d 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/cooker.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/cooker.dm @@ -66,7 +66,7 @@ var/obj/item/weapon/reagent_containers/food/snacks/badrecipe/burnt = new(get_turf(src)) setRegents(props, burnt) to_chat(user, "You smell burning coming from the [src]!") - var/datum/effect/system/smoke_spread/bad/smoke = new // burning things makes smoke! + var/datum/effect_system/smoke_spread/bad/smoke = new // burning things makes smoke! smoke.set_up(5, 0, src) smoke.start() if(prob(firechance)) diff --git a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm index e09198cb4e9..289a4c66d4c 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm @@ -364,7 +364,7 @@ updateUsrDialog() /obj/machinery/kitchen_machine/proc/broke() - var/datum/effect/system/spark_spread/s = new + var/datum/effect_system/spark_spread/s = new s.set_up(2, 1, src) s.start() icon_state = broken_icon // Make it look all busted up and shit diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index 95b6c735280..1d07a130369 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -402,7 +402,7 @@ name = "gaseous decomposition" /datum/plant_gene/trait/smoke/on_squash(obj/item/weapon/reagent_containers/food/snacks/grown/G, atom/target) - var/datum/effect/system/smoke_spread/chem/S = new + var/datum/effect_system/smoke_spread/chem/S = new var/splat_location = get_turf(target) var/smoke_amount = round(sqrt(G.seed.potency * 0.1), 1) S.attach(splat_location) diff --git a/code/modules/martial_arts/mimejutsu.dm b/code/modules/martial_arts/mimejutsu.dm index 5000b13a0f7..01acec88a88 100644 --- a/code/modules/martial_arts/mimejutsu.dm +++ b/code/modules/martial_arts/mimejutsu.dm @@ -47,7 +47,7 @@ D.visible_message("[A] throws an invisible smoke bomb!!") - var/datum/effect/system/smoke_spread/bad/smoke = new + var/datum/effect_system/smoke_spread/bad/smoke = new smoke.set_up(5, 0, D.loc) smoke.start() diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index 541961e5297..f3e4adfa1e4 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -278,7 +278,7 @@ updateUsrDialog() /obj/machinery/mineral/ore_redemption/ex_act(severity, target) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() if(severity == 1) @@ -506,7 +506,7 @@ qdel(voucher) /obj/machinery/mineral/equipment_vendor/ex_act(severity, target) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() if(prob(50 / severity) && severity < 3) diff --git a/code/modules/mining/lavaland/loot/tendril_loot.dm b/code/modules/mining/lavaland/loot/tendril_loot.dm index 391296f3d2d..37b266f15a6 100644 --- a/code/modules/mining/lavaland/loot/tendril_loot.dm +++ b/code/modules/mining/lavaland/loot/tendril_loot.dm @@ -259,14 +259,14 @@ to_chat(user, "[src] fizzles uselessly.") return - var/datum/effect/system/smoke_spread/smoke = new + var/datum/effect_system/smoke_spread/smoke = new smoke.set_up(1, 0, user.loc) smoke.start() user.forceMove(get_turf(linked)) feedback_add_details("warp_cube","[src.type]") - var/datum/effect/system/smoke_spread/smoke2 = new + var/datum/effect_system/smoke_spread/smoke2 = new smoke2.set_up(1, 0, user.loc) smoke2.start() diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 5a80432f4cf..0bca9688abb 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -329,7 +329,7 @@ message_admins("[key_name_admin(usr)] (?) (FLW) activated a bluespace capsule away from the mining level! (JMP)") log_admin("[key_name(usr)] activated a bluespace capsule away from the mining level at [T.x], [T.y], [T.z]") template.load(deploy_location, centered = TRUE) - new /obj/effect/effect/smoke(get_turf(src)) + new /obj/effect/particle_effect/smoke(get_turf(src)) qdel(src) /obj/item/weapon/survivalcapsule/luxury diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index 5132ae9453c..ae67c3d78fd 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -123,7 +123,7 @@ stuttering = power Stun(power) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index d0468fb12b6..8ad380dbc9f 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -40,7 +40,7 @@ hgibs(loc, dna) else new /obj/effect/decal/cleanable/blood/gibs/robot(loc) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index a2235b3811c..8055435a3b7 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -399,7 +399,7 @@ Stuttering(power) Stun(power) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm index 157e95da32d..7c5642658e3 100644 --- a/code/modules/mob/living/carbon/human/human_organs.dm +++ b/code/modules/mob/living/carbon/human/human_organs.dm @@ -107,7 +107,7 @@ custom_emote(1, "drops what they were holding, their [E.name] malfunctioning!") - var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, src) spark_system.attach(src) spark_system.start() diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 516f6b5aee8..8c2106f2303 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -767,12 +767,12 @@ adjustToxLoss(0.1) else //stuff only for synthetics if(alcohol_strength >= spark_start && prob(25)) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() if(alcohol_strength >= collapse_start && prob(10)) emote("collapse") - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() if(alcohol_strength >= braindamage_start && prob(10)) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index d70293ae10c..d1a1d848821 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -59,7 +59,7 @@ var/list/robot_verbs_default = list( var/viewalerts = 0 var/modtype = "Default" var/lower_mod = 0 - var/datum/effect/system/spark_spread/spark_system//So they can initialize sparks whenever/N + var/datum/effect_system/spark_spread/spark_system//So they can initialize sparks whenever/N var/jeton = 0 var/low_power_mode = 0 //whether the robot has no charge left. var/weapon_lock = 0 @@ -85,13 +85,13 @@ var/list/robot_verbs_default = list( var/magpulse = 0 var/ionpulse = 0 // Jetpack-like effect. var/ionpulse_on = 0 // Jetpack-like effect. - var/datum/effect/system/ion_trail_follow/ion_trail // Ionpulse effect. + var/datum/effect_system/trail_follow/ion/ion_trail // Ionpulse effect. var/datum/action/item_action/toggle_research_scanner/scanner = null var/list/module_actions = list() /mob/living/silicon/robot/New(loc,var/syndie = 0,var/unfinished = 0, var/alien = 0) - spark_system = new /datum/effect/system/spark_spread() + spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, src) spark_system.attach(src) diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 494e666799f..09a7a124783 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -345,7 +345,7 @@ to_chat(user, "The welder must be on for this task!") else if(W.force) //if force is non-zero - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() ..() @@ -353,7 +353,7 @@ /mob/living/simple_animal/bot/bullet_act(obj/item/projectile/Proj) if(Proj && (Proj.damage_type == BRUTE || Proj.damage_type == BURN)) if(prob(75) && Proj.damage > 0) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() return ..() diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm index a71fbe2ae03..58911c4316b 100644 --- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm +++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm @@ -98,7 +98,7 @@ if(prob(5)) //Spawns foam! visible_message("[src] whirs and bubbles violently, before releasing a plume of froth!") - new /obj/structure/foam(loc) + new /obj/effect/particle_effect/foam(loc) else if(prob(5)) audible_message("[src] makes an excited beeping booping sound!") @@ -184,7 +184,7 @@ if(prob(50)) new /obj/item/robot_parts/l_arm(Tsec) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() ..() diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm index 37699e820f2..c577722fe43 100644 --- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm +++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm @@ -393,7 +393,7 @@ Auto Patrol[]"}, if(lasercolor == "r") new /obj/item/clothing/suit/redtag(Tsec) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index a02447cd4ea..40a2b1f1631 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -406,7 +406,7 @@ T.amount = amount amount = 0 - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() ..() diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index b3116d194b8..c4952b09a34 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -569,7 +569,7 @@ if(prob(50)) new /obj/item/robot_parts/l_arm(Tsec) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() ..() diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 40b2dc832ba..6130213df27 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -834,7 +834,7 @@ cell.update_icon() cell = null - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index 46a8ec12f76..9c04e47521a 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -437,7 +437,7 @@ Auto Patrol: []"}, if(prob(50)) new /obj/item/robot_parts/l_arm(Tsec) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm index 6ef96d07447..a6d61aba1da 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm @@ -621,12 +621,12 @@ //spark for no reason if(prob(5)) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() /mob/living/simple_animal/pet/corgi/Ian/borgi/death(gibbed) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() ..() diff --git a/code/modules/mob/living/simple_animal/hostile/hivebot.dm b/code/modules/mob/living/simple_animal/hostile/hivebot.dm index 9d966d67a07..c2284764050 100644 --- a/code/modules/mob/living/simple_animal/hostile/hivebot.dm +++ b/code/modules/mob/living/simple_animal/hostile/hivebot.dm @@ -48,7 +48,7 @@ ranged = 1 /mob/living/simple_animal/hostile/hivebot/death(gibbed) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() ..() @@ -75,7 +75,7 @@ /mob/living/simple_animal/hostile/hivebot/tele/New() ..() - var/datum/effect/system/smoke_spread/smoke = new + var/datum/effect_system/smoke_spread/smoke = new smoke.set_up(5, 0, src.loc) smoke.start() visible_message("The [src] warps in!") diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm index d4a88b49e60..60b2f88c428 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm @@ -22,7 +22,7 @@ speed = 8 projectiletype = /obj/item/projectile/beam/drone projectilesound = 'sound/weapons/laser3.ogg' - var/datum/effect/system/ion_trail_follow/ion_trail + var/datum/effect_system/trail_follow/ion/ion_trail //the drone randomly switches between these states because it's malfunctioning var/hostile_drone = 0 @@ -80,14 +80,14 @@ //repair a bit of damage if(prob(1)) src.visible_message("[bicon(src)] [src] shudders and shakes as some of it's damaged systems come back online.") - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() health += rand(25,100) //spark for no reason if(prob(5)) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() @@ -129,7 +129,7 @@ src.visible_message("[bicon(src)] [src] begins to spark and shake violenty!") else src.visible_message("[bicon(src)] [src] sparks and shakes like it's about to explode!") - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() @@ -154,7 +154,7 @@ /mob/living/simple_animal/hostile/retaliate/malf_drone/Destroy() //Seriously, what the actual hell. //some random debris left behind if(has_loot) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() var/obj/O diff --git a/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm b/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm index 148766ef59d..38da8499756 100644 --- a/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm +++ b/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm @@ -27,14 +27,14 @@ if(battery_module && prob(25)) qdel(battery_module) computer.visible_message("\The [computer]'s battery explodes in rain of sparks.") - var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, computer.loc) spark_system.start() if(recharger && prob(50)) qdel(recharger) computer.visible_message("\The [computer]'s recharger explodes in rain of sparks.") - var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, computer.loc) spark_system.start() diff --git a/code/modules/ninja/energy_katana.dm b/code/modules/ninja/energy_katana.dm index 0865536bc36..47ad02f970d 100644 --- a/code/modules/ninja/energy_katana.dm +++ b/code/modules/ninja/energy_katana.dm @@ -7,7 +7,7 @@ throwforce = 20 armour_penetration = 50 var/cooldown = 0 // Because spam aint cool, yo. - var/datum/effect/system/spark_spread/spark_system + var/datum/effect_system/spark_spread/spark_system /obj/item/weapon/katana/energy/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) @@ -69,7 +69,7 @@ /obj/item/weapon/katana/energy/New() ..() - spark_system = new /datum/effect/system/spark_spread() + spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, src) spark_system.attach(src) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index aa1ccae3c1d..59ae659f227 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -530,7 +530,7 @@ var/turf/T = get_turf(src) var/obj/structure/cable/N = T.get_cable_node() if(prob(50) && electrocute_mob(usr, N, N)) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() return @@ -549,7 +549,7 @@ if(do_after(user, 50 * W.toolspeed, target = src)) if(terminal && opened && has_electronics!=2) if(prob(50) && electrocute_mob(usr, terminal.powernet, terminal)) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() return @@ -1056,11 +1056,11 @@ cell.corrupt() src.malfhack = 1 update_icon() - var/datum/effect/system/smoke_spread/smoke = new + var/datum/effect_system/smoke_spread/smoke = new smoke.set_up(3, 0, src.loc) smoke.attach(src) smoke.start() - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() for(var/mob/M in viewers(src)) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index e44a694ba06..62313ddbccb 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -195,7 +195,7 @@ By design, d1 is the smallest direction and d2 is the highest if(!prob(prb)) return 0 if(electrocute_mob(user, powernet, src, siemens_coeff)) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() return 1 diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 061cd62bc44..deda65c3f5c 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -371,7 +371,7 @@ to_chat(user, "You stick \the [W] into the light socket!") if(has_power() && (W.flags & CONDUCT)) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() if(prob(75)) @@ -525,7 +525,7 @@ if(status == LIGHT_OK || status == LIGHT_BURNED) playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1) if(on || overloaded) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() status = LIGHT_BROKEN diff --git a/code/modules/power/singularity/containment_field.dm b/code/modules/power/singularity/containment_field.dm index 564a52e0acd..3a5a059d670 100644 --- a/code/modules/power/singularity/containment_field.dm +++ b/code/modules/power/singularity/containment_field.dm @@ -99,7 +99,7 @@ if(hasShocked) return 0 hasShocked = 1 - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, AM.loc) s.start() var/atom/target = get_edge_target_turf(AM, get_dir(src, get_step_away(AM, src))) diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 3ebcbb565dc..34dad709bd1 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -202,7 +202,7 @@ A.dir = src.dir playsound(get_turf(src), 'sound/weapons/emitter.ogg', 25, 1) if(prob(35)) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() diff --git a/code/modules/power/singularity/narsie.dm b/code/modules/power/singularity/narsie.dm index 6b939da6f2f..0aeb944a510 100644 --- a/code/modules/power/singularity/narsie.dm +++ b/code/modules/power/singularity/narsie.dm @@ -41,7 +41,7 @@ /obj/singularity/narsie/large/attack_ghost(mob/dead/observer/user as mob) makeNewConstruct(/mob/living/simple_animal/hostile/construct/harvester, user, null, 1) - new /obj/effect/effect/smoke/sleeping(user.loc) + new /obj/effect/particle_effect/smoke/sleeping(user.loc) /obj/singularity/narsie/process() diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index cf6ba4df1e7..6c8b02d5e23 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -184,7 +184,7 @@ if(do_after(user, 50 * I.toolspeed, target = src)) if(prob(50) && electrocute_mob(usr, terminal.powernet, terminal)) //animate the electrocution if uncautious and unlucky - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() return @@ -325,7 +325,7 @@ var/turf/T = get_turf(user) var/obj/structure/cable/N = T.get_cable_node() //get the connecting node cable, if there's one if(prob(50) && electrocute_mob(user, N, N)) //animate the electrocution if uncautious and unlucky - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() return @@ -440,7 +440,7 @@ for(var/mob/M in viewers(src)) M.show_message("The [src.name] is making strange noises!", 3, "You hear sizzling electronics.", 2) sleep(10*pick(4,5,6,7,10,14)) - var/datum/effect/system/smoke_spread/smoke = new + var/datum/effect_system/smoke_spread/smoke = new smoke.set_up(3, 0, src.loc) smoke.attach(src) smoke.start() @@ -448,7 +448,7 @@ qdel(src) return if(prob(15)) //Power drain - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() if(prob(50)) @@ -456,7 +456,7 @@ else emp_act(2) if(prob(5)) //smoke only - var/datum/effect/system/smoke_spread/smoke = new + var/datum/effect_system/smoke_spread/smoke = new smoke.set_up(3, 0, src.loc) smoke.attach(src) smoke.start() diff --git a/code/modules/projectiles/guns/magic/wand.dm b/code/modules/projectiles/guns/magic/wand.dm index 0e8e1a3862a..1f567dd8997 100644 --- a/code/modules/projectiles/guns/magic/wand.dm +++ b/code/modules/projectiles/guns/magic/wand.dm @@ -122,7 +122,7 @@ /obj/item/weapon/gun/magic/wand/teleport/zap_self(mob/living/user) do_teleport(user, user, 10) - var/datum/effect/system/smoke_spread/smoke = new + var/datum/effect_system/smoke_spread/smoke = new smoke.set_up(10, 0, user.loc) smoke.start() charges-- diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index 701be48d7b1..c392a31b2ea 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -78,7 +78,7 @@ ..() /obj/item/projectile/bullet/pellet/weak/on_range() - var/datum/effect/system/spark_spread/sparks = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread sparks.set_up(1, 1, src) sparks.start() ..() @@ -96,7 +96,7 @@ /obj/item/projectile/bullet/pellet/overload/on_range() explosion(src, 0, 0, 2) - var/datum/effect/system/spark_spread/sparks = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread sparks.set_up(3, 3, src) sparks.start() ..() diff --git a/code/modules/projectiles/projectile/energy.dm b/code/modules/projectiles/projectile/energy.dm index d9e8a0759bd..10786ec4b82 100644 --- a/code/modules/projectiles/projectile/energy.dm +++ b/code/modules/projectiles/projectile/energy.dm @@ -22,7 +22,7 @@ /obj/item/projectile/energy/electrode/on_hit(var/atom/target, var/blocked = 0) . = ..() if(!ismob(target) || blocked >= 100) //Fully blocked by mob or collided with dense object - burst into sparks! - var/datum/effect/system/spark_spread/sparks = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread sparks.set_up(1, 1, src) sparks.start() else if(iscarbon(target)) @@ -34,7 +34,7 @@ C.do_jitter_animation(jitter) /obj/item/projectile/energy/electrode/on_range() //to ensure the bolt sparks when it reaches the end of its range if it didn't hit a target yet - var/datum/effect/system/spark_spread/sparks = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread sparks.set_up(1, 1, src) sparks.start() ..() diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index 83f9018ae31..ed523c0b753 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -100,7 +100,7 @@ if(!stuff.anchored && stuff.loc) teleammount++ do_teleport(stuff, stuff, 10) - var/datum/effect/system/smoke_spread/smoke = new + var/datum/effect_system/smoke_spread/smoke = new 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() diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index 94fb6a71e18..fb42ce7cb57 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -191,7 +191,7 @@ icon_state = "snappop" /obj/item/projectile/clown/Bump(atom/A as mob|obj|turf|area) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() new /obj/effect/decal/cleanable/ash(loc) diff --git a/code/modules/reagents/chem_splash.dm b/code/modules/reagents/chem_splash.dm index 7c16bf1ab9a..e586e6f806b 100644 --- a/code/modules/reagents/chem_splash.dm +++ b/code/modules/reagents/chem_splash.dm @@ -29,7 +29,7 @@ splash_holder.handle_reactions() // React them now. if(splash_holder.total_volume && affected_range >= 0) //The possible reactions didnt use up all reagents, so we spread it around. - var/datum/effect/system/steam_spread/steam = new /datum/effect/system/steam_spread() + var/datum/effect_system/steam_spread/steam = new /datum/effect_system/steam_spread() steam.set_up(10, 0, epicenter) steam.attach(epicenter) steam.start() diff --git a/code/modules/reagents/chemistry/reagents/pyrotechnic.dm b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm index e75b904d648..859f5b4a479 100644 --- a/code/modules/reagents/chemistry/reagents/pyrotechnic.dm +++ b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm @@ -140,7 +140,7 @@ /* /datum/reagent/blackpowder/on_ex_act() var/location = get_turf(holder.my_atom) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, location) s.start() sleep(rand(10,15)) diff --git a/code/modules/reagents/chemistry/recipes/others.dm b/code/modules/reagents/chemistry/recipes/others.dm index 3bdcfd5c029..8735dfa16c2 100644 --- a/code/modules/reagents/chemistry/recipes/others.dm +++ b/code/modules/reagents/chemistry/recipes/others.dm @@ -19,7 +19,7 @@ var/location = get_turf(holder.my_atom) holder.my_atom.visible_message("The solution spews out foam!") - var/datum/effect/system/foam_spread/s = new() + var/datum/effect_system/foam_spread/s = new() s.set_up(created_volume, location, holder, 0) s.start() holder.clear_reagents() @@ -37,7 +37,7 @@ holder.my_atom.visible_message("The solution spews out a metalic foam!") - var/datum/effect/system/foam_spread/s = new() + var/datum/effect_system/foam_spread/s = new() s.set_up(created_volume, location, holder, MFOAM_ALUMINUM) s.start() @@ -54,7 +54,7 @@ holder.my_atom.visible_message("[src] malfunctions, releasing a flurry of chilly air as [exp_on] pops out!") - var/datum/effect/system/smoke_spread/smoke = new + var/datum/effect_system/smoke_spread/smoke = new smoke.set_up(1,0, src.loc, 0) smoke.start() ejectItem() @@ -648,7 +648,7 @@ //////////////// RELIC PROCS ///////////////////////////// /obj/item/weapon/relic/proc/throwSmoke(turf/where) - var/datum/effect/system/smoke_spread/smoke = new + var/datum/effect_system/smoke_spread/smoke = new smoke.set_up(1,0, where, 0) smoke.start() diff --git a/code/modules/spacepods/spacepod.dm b/code/modules/spacepods/spacepod.dm index e2a21f507fa..be18f6a6516 100644 --- a/code/modules/spacepods/spacepod.dm +++ b/code/modules/spacepods/spacepod.dm @@ -40,7 +40,7 @@ var/datum/global_iterator/pr_int_temp_processor //normalizes internal air mixture temperature var/datum/global_iterator/pr_give_air //moves air from tank to cabin - var/datum/effect/system/ion_trail_follow/space_trail/ion_trail + var/datum/effect_system/trail_follow/ion/space_trail/ion_trail var/hatch_open = 0 @@ -106,7 +106,7 @@ battery = new battery_type(src) add_cabin() add_airtank() - src.ion_trail = new /datum/effect/system/ion_trail_follow/space_trail() + src.ion_trail = new /datum/effect_system/trail_follow/ion/space_trail() src.ion_trail.set_up(src) src.ion_trail.start() src.use_internal_tank = 1 diff --git a/code/modules/station_goals/bsa.dm b/code/modules/station_goals/bsa.dm index 085bbe3540b..f9aa857c3e8 100644 --- a/code/modules/station_goals/bsa.dm +++ b/code/modules/station_goals/bsa.dm @@ -397,7 +397,7 @@ if(notice) return null //Totally nanite construction system not an immersion breaking spawning - var/datum/effect/system/smoke_spread/s = new + var/datum/effect_system/smoke_spread/s = new s.set_up(4, 0, get_turf(centerpiece)) s.start() var/obj/machinery/bsa/full/cannon = new(get_turf(centerpiece),centerpiece.get_cannon_direction()) diff --git a/code/modules/surgery/organs/augments_arms.dm b/code/modules/surgery/organs/augments_arms.dm index 4b62e42cb8a..4d5e46e8ef4 100644 --- a/code/modules/surgery/organs/augments_arms.dm +++ b/code/modules/surgery/organs/augments_arms.dm @@ -275,7 +275,7 @@ var/mob/living/carbon/human/H = user if(H.get_int_organ(/obj/item/organ/internal/cell)) if(A.emagged || A.stat & BROKEN) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, A) s.start() to_chat(H, "The APC power currents surge erratically, damaging your chassis!") diff --git a/code/modules/surgery/organs/organ_external.dm b/code/modules/surgery/organs/organ_external.dm index a623c0a0d0f..f03c05c934a 100644 --- a/code/modules/surgery/organs/organ_external.dm +++ b/code/modules/surgery/organs/organ_external.dm @@ -702,7 +702,7 @@ Note that amputating the affected organ does in fact remove the infection from t "Your [src.name] explodes!",\ "You hear an explosion!") explosion(get_turf(owner),-1,-1,2,3) - var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, victim) spark_system.attach(owner) spark_system.start() diff --git a/code/modules/telesci/telepad.dm b/code/modules/telesci/telepad.dm index f8a177e413d..3c3c9815836 100644 --- a/code/modules/telesci/telepad.dm +++ b/code/modules/telesci/telepad.dm @@ -157,7 +157,7 @@ /obj/item/weapon/rcs/emag_act(user as mob) if(!emagged) emagged = 1 - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() to_chat(user, " You emag the RCS. Activate it to toggle between modes.") diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm index 9caaee5187c..4034aab05df 100644 --- a/code/modules/telesci/telesci_computer.dm +++ b/code/modules/telesci/telesci_computer.dm @@ -148,7 +148,7 @@ /obj/machinery/computer/telescience/proc/sparks() if(telepad) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, get_turf(telepad)) s.start() else @@ -206,7 +206,7 @@ // use a lot of power use_power(power * 10) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, get_turf(telepad)) s.start() @@ -217,7 +217,7 @@ temp_msg += "Data printed below." var/sparks = get_turf(target) - var/datum/effect/system/spark_spread/y = new /datum/effect/system/spark_spread + var/datum/effect_system/spark_spread/y = new /datum/effect_system/spark_spread y.set_up(5, 1, sparks) y.start() From 2fd7d2e32f768e693dfb5901245d749b7e793d45 Mon Sep 17 00:00:00 2001 From: uraniummeltdown Date: Sat, 4 Nov 2017 22:20:28 +0400 Subject: [PATCH 11/11] finishing touches, particle effects pass tables and grilles --- .../objects/effects/effect_system/effect_system.dm | 1 + .../effects/effect_system/effects_explosion.dm | 2 +- .../objects/effects/effect_system/effects_water.dm | 11 ++--------- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/code/game/objects/effects/effect_system/effect_system.dm b/code/game/objects/effects/effect_system/effect_system.dm index 1669d9b09d2..fa65008d307 100644 --- a/code/game/objects/effects/effect_system/effect_system.dm +++ b/code/game/objects/effects/effect_system/effect_system.dm @@ -9,6 +9,7 @@ would spawn and follow the beaker, even if it is carried or thrown. name = "particle effect" mouse_opacity = 0 unacidable = 1//So effects are not targeted by alien acid. + pass_flags = PASSTABLE | PASSGRILLE /obj/effect/particle_effect/New() ..() diff --git a/code/game/objects/effects/effect_system/effects_explosion.dm b/code/game/objects/effects/effect_system/effects_explosion.dm index 63b3d4d5271..aa3ecd8376b 100644 --- a/code/game/objects/effects/effect_system/effects_explosion.dm +++ b/code/game/objects/effects/effect_system/effects_explosion.dm @@ -46,7 +46,7 @@ /datum/effect_system/explosion/start() new/obj/effect/explosion(location) var/datum/effect_system/expl_particles/P = new/datum/effect_system/expl_particles() - P.set_up(10,location) + P.set_up(10, 0, location) P.start() /datum/effect_system/explosion/smoke diff --git a/code/game/objects/effects/effect_system/effects_water.dm b/code/game/objects/effects/effect_system/effects_water.dm index a09a00120a9..c4009516f92 100644 --- a/code/game/objects/effects/effect_system/effects_water.dm +++ b/code/game/objects/effects/effect_system/effects_water.dm @@ -1,24 +1,17 @@ //WATER EFFECTS /obj/effect/particle_effect/water name = "water" - icon = 'icons/effects/effects.dmi' icon_state = "extinguish" - var/life = 15.0 + var/life = 15 /obj/effect/particle_effect/water/New() ..() - //var/turf/T = src.loc - //if(istype(T, /turf)) - // T.firelevel = 0 //TODO: FIX QDEL_IN(src, 70) /obj/effect/particle_effect/water/Move(turf/newloc) - //var/turf/T = src.loc - //if(istype(T, /turf)) - // T.firelevel = 0 //TODO: FIX if(--life < 1) - //SN src = null qdel() + return 0 if(newloc.density) return 0 .=..()