diff --git a/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm b/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm index cd5e4a9367d..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/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/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 6dba2d9990b..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/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/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 b5cc7b63f51..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/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/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 439d169bc37..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/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/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 2965456c99b..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/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) @@ -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 88251dcdd36..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/harmless_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 95d804179cd..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/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/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 a08f4bea77a..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/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/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 bb1ab0fd8dc..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/bad_smoke(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/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 + if(isturf(loca)) + location = loca + else + location = get_turf(loca) + +/datum/effect_system/proc/attach(atom/atom) + holder = atom + +/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..aa3ecd8376b --- /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, 0, 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 new file mode 100644 index 00000000000..814f264b23e --- /dev/null +++ b/code/game/objects/effects/effect_system/effects_foam.dm @@ -0,0 +1,249 @@ +// Foam +// Similar to smoke, but spreads out more +// metal foams leave behind a foamed metal wall + +/obj/effect/particle_effect/foam + name = "foam" + icon_state = "foam" + opacity = 0 + anchored = 1 + density = 0 + layer = OBJ_LAYER + 0.9 + animate_movement = 0 + var/amount = 3 + var/expand = 1 + var/metal = 0 + +/obj/effect/particle_effect/foam/New(loc, 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/effect/particle_effect/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/effect/particle_effect/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/effect/particle_effect/foam/F = locate() in T + if(F) + continue + + F = new /obj/effect/particle_effect/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/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/effect/particle_effect/foam/Crossed(atom/movable/AM) + if(metal) + return + + if(iscarbon(AM)) + 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 + 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) + amount = min(round(amt/5, 1), 7) + if(isturf(loca)) + 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/effect/particle_effect/foam/F = locate() in location + if(F) + F.amount += amount + F.amount = min(F.amount, 27) + return + + F = new /obj/effect/particle_effect/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(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(obj/item/I, 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..ef9ed8ac11a --- /dev/null +++ b/code/game/objects/effects/effect_system/effects_other.dm @@ -0,0 +1,205 @@ +///////////////////////////////////////////// +//////// 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! +///////////////////////////////////////////// + +/datum/effect_system/trail_follow + var/turf/oldposition + var/processing = 1 + var/on = 1 + +/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/trail_follow/proc/stop() + processing = 0 + on = 0 + oldposition = null + +/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 != oldposition) + if(!has_gravity(T)) + 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) + qdel(I) + oldposition = T + spawn(2) + if(on) + processing = 1 + start() + +/datum/effect_system/trail_follow/ion/space_trail + var/turf/oldloc // secondary ion trail loc + var/turf/currloc + +/datum/effect_system/trail_follow/ion/space_trail/Destroy() + oldloc = null + currloc = null + return ..() + +/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) + 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/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 = holder.dir + II.dir = holder.dir + flick("ion_fade", I) + flick("ion_fade", II) + I.icon_state = "" + II.icon_state = "" + spawn(20) + if(I) + qdel(I) + if(II) + qdel(II) + spawn(2) + if(on) + processing = 1 + 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 + +/datum/effect_system/reagents_explosion/set_up(amt, loca, flash = 0, flash_fact = 0) + amount = amt + if(isturf(loca)) + location = loca + else + location = get_turf(loca) + + flashing = flash + flashing_factor = flash_fact + + +/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 + + // 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(flashing && 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) + +/datum/effect_system/reagents_explosion/proc/holder_damage(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..64421b35fe9 --- /dev/null +++ b/code/game/objects/effects/effect_system/effects_smoke.dm @@ -0,0 +1,305 @@ +///////////////////////////////////////////// +//// SMOKE SYSTEMS +// 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 +///////////////////////////////////////////// + +/obj/effect/particle_effect/smoke + name = "smoke" + icon_state = "smoke" + icon = 'icons/effects/96x96.dmi' + pixel_x = -32 + pixel_y = -32 + opacity = 1 + anchored = 0 + var/steps = 0 + var/lifetime = 5 + var/direction + +/obj/effect/particle_effect/smoke/proc/fade_out(frames = 16) + if(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 = alpha / frames + for(var/i = 0, i < frames, i++) + alpha -= step + if(alpha < 160) + set_opacity(0) + stoplag() + +/obj/effect/particle_effect/smoke/New() + ..() + processing_objects |= src + lifetime += rand(-1,1) + +/obj/effect/particle_effect/smoke/Destroy() + processing_objects.Remove(src) + return ..() + +/obj/effect/particle_effect/smoke/proc/kill_smoke() + processing_objects.Remove(src) + addtimer(src, "fade_out", 0) + QDEL_IN(src, 10) + +/obj/effect/particle_effect/smoke/process() + lifetime-- + if(lifetime < 1) + kill_smoke() + return 0 + if(steps >= 1) + step(src,direction) + steps-- + return 1 + +/obj/effect/particle_effect/smoke/Crossed(mob/living/M) + if(!istype(M)) + return + smoke_mob(M) + +/obj/effect/particle_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/particle_effect/smoke/proc/remove_smoke_delay(mob/living/carbon/C) + if(C) + C.smoke_delay = 0 + +/datum/effect_system/smoke_spread + effect_type = /obj/effect/particle_effect/smoke + var/direction + +/datum/effect_system/smoke_spread/set_up(n = 5, c = 0, loca, direct) + if(n > 20) + n = 20 + number = n + cardinals = c + if(isturf(loca)) + location = loca + else + location = get_turf(loca) + if(direct) + direction = direct + +/datum/effect_system/smoke_spread/start() + for(var/i=0, i[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) + 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 RANGE_TURFS(2, location)) + Chilled(T) + ..() + +///////////////////////////////////////////// +// Sleep smoke +///////////////////////////////////////////// + +/obj/effect/particle_effect/smoke/sleeping + color = "#9C3636" + lifetime = 10 + +/obj/effect/particle_effect/smoke/sleeping/process() + if(..()) + for(var/mob/living/carbon/M in range(1,src)) + smoke_mob(M) + +/obj/effect/particle_effect/smoke/sleeping/smoke_mob(mob/living/carbon/M) + if(..()) + M.drop_item() + M.Sleeping(max(M.sleeping,10)) + M.emote("cough") + return 1 + +/datum/effect_system/smoke_spread/sleeping + effect_type = /obj/effect/particle_effect/smoke/sleeping + +///////////////////////////////////////////// +// Chem smoke +///////////////////////////////////////////// + +/obj/effect/particle_effect/smoke/chem + icon = 'icons/effects/chemsmoke.dmi' + opacity = 0 + lifetime = 10 + +/datum/effect_system/smoke_spread/chem + effect_type = /obj/effect/particle_effect/smoke/chem + var/obj/chemholder + +/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/smoke_spread/chem/Destroy() + QDEL_NULL(chemholder) + return ..() + +/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 + cardinals = c + + if(isturf(loca)) + location = loca + else + location = get_turf(loca) + if(direct) + direction = direct + carry.copy_to(chemholder, carry.total_volume) + 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.") + +/datum/effect_system/smoke_spread/chem/start(effect_range = 2) + var/color = mix_color_from_reagents(chemholder.reagents.reagent_list) + 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)) + var/mob/living/carbon/C = A + if(C.can_breathe_gas()) + chemholder.reagents.copy_to(C, chemholder.reagents.total_volume) + qdel(smokeholder) + for(var/i=0, i[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 49258c05c4e..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/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/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 f010bb977c0..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/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/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 4ad7f70e016..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/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/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 5795b04bfa3..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,9 @@ pass_flags = PASSTABLE /obj/effect/nanofrost_container/proc/Smoke() - new /obj/effect/effect/freezing_smoke(src.loc, 6, 1) + 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) F.color = "#B2FFFF" F.name = "nanofrost residue" @@ -327,78 +329,6 @@ playsound(src,'sound/effects/bamf.ogg',100,1) qdel(src) -/obj/effect/effect/freezing_smoke - name = "nanofrost smoke" - icon_state = "smoke" - opacity = 0 - anchored = 0.0 - mouse_opacity = 0 - icon = 'icons/effects/96x96.dmi' - pixel_x = -32 - pixel_y = -32 - color = "#B2FFFF" - var/amount = 0 - -/obj/effect/effect/freezing_smoke/New(loc, var/amt, var/blast) - ..() - spawn(100+rand(10,30)) - delete() - amount = amt - if(amount) - var/datum/effect/system/freezing_smoke_spread/F = new /datum/effect/system/freezing_smoke_spread - F.set_up(amount, 0, src.loc) - F.start() - if(blast) - for(var/turf/T in spiral_range_turfs(2, src.loc)) - Chilled(T) - return - -/obj/effect/effect/freezing_smoke/proc/Chilled(atom/A) - if(istype(A, /turf/simulated)) - var/turf/simulated/T = A - if(T.air) - var/datum/gas_mixture/G = T.air - if(get_dist(T, src) < 2) // Otherwise we'll get silliness like people using Nanofrost to kill people through walls with cold air - G.temperature = 2 - T.air_update_turf() - for(var/obj/effect/hotspot/H in T) - qdel(H) - if(G.toxins) - G.nitrogen += (G.toxins) - G.toxins = 0 - for(var/obj/machinery/atmospherics/unary/vent_pump/V in T) - V.welded = 1 - V.update_icon() - V.visible_message("[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[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 aab8d550040..36215a850c5 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -293,7 +293,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 2a41eee85c3..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/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/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 e7ec4eaffd8..77196ede0b1 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -590,7 +590,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 ae6794d5e8d..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/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/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 1c8db0d9b20..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/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/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 efc3d0f594f..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/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..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/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/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 1c2093ce8c2..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/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..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/harmless_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 23061d2a285..1984cd379be 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/living_defines.dm b/code/modules/mob/living/living_defines.dm index c120742f7c0..5aaf02688d3 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -43,6 +43,8 @@ var/list/icon/pipes_shown = list() var/last_played_vent + var/smoke_delay = 0 //used to prevent spam with smoke reagent reaction on mob. + var/step_count = 0 var/list/butcher_results = null 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 899608d0f1a..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 ..() @@ -367,8 +367,7 @@ pulse2.name = "emp sparks" pulse2.anchored = 1 pulse2.dir = pick(cardinal) - spawn(10) - pulse2.delete() + QDEL_IN(pulse2, 10) if(paicard) paicard.emp_act(severity) 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 3c521d56d04..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/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/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/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 5031ec9c061..f4d60c2604b 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -100,8 +100,6 @@ var/in_throw_mode = 0 - var/coughedtime = null - var/emote_cd = 0 // Used to supress emote spamming. 1 if on CD, 2 if disabled by admin (manually set), else 0 var/job = null//Living 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 da56a496947..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/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() - 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 03b1d07b85b..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/sleep_smoke(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 f73d306d15b..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/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() @@ -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/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..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/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/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 ff274a48993..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/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/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/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/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 38d04b527db..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/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()) 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() diff --git a/paradise.dme b/paradise.dme index d2239b98e70..8f4ac326b9a 100644 --- a/paradise.dme +++ b/paradise.dme @@ -688,8 +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\effect_system.dm" -#include "code\game\objects\effects\explosion_particles.dm" +#include "code\game\objects\effects\effects.dm" #include "code\game\objects\effects\forcefields.dm" #include "code\game\objects\effects\gibs.dm" #include "code\game\objects\effects\glowshroom.dm" @@ -713,6 +712,13 @@ #include "code\game\objects\effects\decals\Cleanable\misc.dm" #include "code\game\objects\effects\decals\Cleanable\robots.dm" #include "code\game\objects\effects\decals\Cleanable\tracks.dm" +#include "code\game\objects\effects\effect_system\effect_system.dm" +#include "code\game\objects\effects\effect_system\effects_explosion.dm" +#include "code\game\objects\effects\effect_system\effects_foam.dm" +#include "code\game\objects\effects\effect_system\effects_other.dm" +#include "code\game\objects\effects\effect_system\effects_smoke.dm" +#include "code\game\objects\effects\effect_system\effects_sparks.dm" +#include "code\game\objects\effects\effect_system\effects_water.dm" #include "code\game\objects\effects\spawners\bombspawner.dm" #include "code\game\objects\effects\spawners\gibspawner.dm" #include "code\game\objects\effects\spawners\lootdrop.dm"