diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index d1f29a5979e..61f436806a6 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -329,14 +329,14 @@ if(uses <= 0) icon_state ="shifter_drained" playsound(mobloc, "sparks", 50, 1) - new /obj/effect/overlay/temp/cult/phase/out(mobloc) + new /obj/effect/overlay/temp/dir_setting/cult/phase/out(mobloc) var/atom/movable/pulled = handle_teleport_grab(destination, C) C.forceMove(destination) if(pulled) C.start_pulling(pulled) //forcemove resets pulls, so we need to re-pull - new /obj/effect/overlay/temp/cult/phase(destination) + new /obj/effect/overlay/temp/dir_setting/cult/phase(destination) playsound(destination, 'sound/effects/phasein.ogg', 25, 1) playsound(destination, "sparks", 50, 1) diff --git a/code/game/objects/effects/overlays.dm b/code/game/objects/effects/overlays.dm index 10d78bd2ae1..a0a4417de4e 100644 --- a/code/game/objects/effects/overlays.dm +++ b/code/game/objects/effects/overlays.dm @@ -10,14 +10,14 @@ return /obj/effect/overlay/beam//Not actually a projectile, just an effect. - name="beam" - icon='icons/effects/beam.dmi' - icon_state="b_beam" + name = "beam" + icon = 'icons/effects/beam.dmi' + icon_state = "b_beam" var/tmp/atom/BeamSource - New() - ..() - spawn(10) - qdel(src) + +/obj/effect/overlay/beam/New() + ..() + QDEL_IN(src, 10) /obj/effect/overlay/palmtree_r name = "Palm tree" @@ -46,168 +46,6 @@ icon_state = "admin" layer = 4.1 -/obj/effect/overlay/temp - anchored = 1 - layer = 4.1 - mouse_opacity = 0 - var/duration = 10 - var/randomdir = 1 - -/obj/effect/overlay/temp/New() - if(randomdir) - dir = pick(cardinal) - - flick("[icon_state]", src) //Because we might be pulling it from a pool, flick whatever icon it uses so it starts at the start of the icon's animation. - - spawn(duration) - qdel(src) - -/obj/effect/overlay/temp/revenant - name = "spooky lights" - icon = 'icons/effects/effects.dmi' - icon_state = "purplesparkles" - -/obj/effect/overlay/temp/revenant/cracks - name = "glowing cracks" - icon_state = "purplecrack" - duration = 6 - -/obj/effect/overlay/temp/guardian - randomdir = 0 - -/obj/effect/overlay/temp/guardian/phase - duration = 5 - icon_state = "phasein" - -/obj/effect/overlay/temp/guardian/phase/out - icon_state = "phaseout" - -/obj/effect/overlay/temp/emp - name = "emp sparks" - icon = 'icons/effects/effects.dmi' - icon_state = "empdisable" - -/obj/effect/overlay/temp/emp/pulse - name = "emp pulse" - icon_state = "emppulse" - duration = 8 - randomdir = 0 - -/obj/effect/overlay/temp/heal //color is white by default, set to whatever is needed - name = "healing glow" - icon = 'icons/effects/effects.dmi' - icon_state = "heal" - duration = 15 - -/obj/effect/overlay/temp/heal/New(loc, colour) - ..() - pixel_x = rand(-12, 12) - pixel_y = rand(-9, 0) - if(colour) - color = colour - -/obj/effect/overlay/temp/kinetic_blast - name = "kinetic explosion" - icon = 'icons/obj/projectiles.dmi' - icon_state = "kinetic_blast" - layer = 4.1 - duration = 4 - -/obj/effect/overlay/temp/explosion - name = "explosion" - icon = 'icons/effects/96x96.dmi' - icon_state = "explosion" - pixel_x = -32 - pixel_y = -32 - duration = 8 - -/obj/effect/overlay/temp/explosion/fast - icon_state = "explosionfast" - duration = 4 - -/obj/effect/overlay/temp/decoy - desc = "It's a decoy!" - duration = 15 - -/obj/effect/overlay/temp/decoy/New(loc, atom/mimiced_atom) - ..() - alpha = initial(alpha) - if(mimiced_atom) - name = mimiced_atom.name - appearance = mimiced_atom.appearance - dir = mimiced_atom.dir - mouse_opacity = 0 - -/obj/effect/overlay/temp/decoy/fading/New(loc, atom/mimiced_atom) - ..() - animate(src, alpha = 0, time = duration) - -/obj/effect/overlay/temp/cult - icon = 'icons/effects/effects.dmi' - randomdir = 0 - duration = 10 - -/obj/effect/overlay/temp/cult/sparks - randomdir = 1 - name = "blood sparks" - icon_state = "bloodsparkles" - -/obj/effect/overlay/temp/dir_setting - randomdir = FALSE - -/obj/effect/overlay/temp/dir_setting/New(loc, set_dir) - if(set_dir) - setDir(set_dir) - ..() - -/obj/effect/overlay/temp/dir_setting/bloodsplatter - icon = 'icons/effects/blood.dmi' - duration = 5 - randomdir = FALSE - layer = MOB_LAYER - 0.1 - color = "#C80000" - var/splatter_type = "splatter" - -/obj/effect/overlay/temp/dir_setting/bloodsplatter/New(loc, set_dir, blood_color) - if(blood_color) - color = blood_color - if(set_dir in diagonals) - icon_state = "[splatter_type][pick(1, 2, 6)]" - else - icon_state = "[splatter_type][pick(3, 4, 5)]" - ..() - var/target_pixel_x = 0 - var/target_pixel_y = 0 - switch(set_dir) - if(NORTH) - target_pixel_y = 16 - if(SOUTH) - target_pixel_y = -16 - layer = MOB_LAYER + 0.1 - if(EAST) - target_pixel_x = 16 - if(WEST) - target_pixel_x = -16 - if(NORTHEAST) - target_pixel_x = 16 - target_pixel_y = 16 - if(NORTHWEST) - target_pixel_x = -16 - target_pixel_y = 16 - if(SOUTHEAST) - target_pixel_x = 16 - target_pixel_y = -16 - layer = MOB_LAYER + 0.1 - if(SOUTHWEST) - target_pixel_x = -16 - target_pixel_y = -16 - layer = MOB_LAYER + 0.1 - animate(src, pixel_x = target_pixel_x, pixel_y = target_pixel_y, alpha = 0, time = duration) - -/obj/effect/overlay/temp/dir_setting/bloodsplatter/xenosplatter - color = null - splatter_type = "xsplatter" - /obj/effect/overlay/wall_rot name = "Wallrot" desc = "Ick..." @@ -221,68 +59,3 @@ ..() pixel_x += rand(-10, 10) pixel_y += rand(-10, 10) -/obj/effect/overlay/temp/cult - randomdir = 0 - duration = 10 - - - icon = 'icons/effects/effects.dmi' - -/obj/effect/overlay/temp/cult/sparks - randomdir = 1 - name = "blood sparks" - icon_state = "bloodsparkles" - -/obj/effect/overlay/temp/cult/phase - name = "phase glow" - duration = 7 - icon_state = "cultin" - -/obj/effect/overlay/temp/cult/phase/New(loc, set_dir) - ..() - if(set_dir) - dir = set_dir - -/obj/effect/overlay/temp/cult/phase/out - icon_state = "cultout" - -/obj/effect/overlay/temp/heal //color is white by default, set to whatever is needed - name = "healing glow" - icon = 'icons/effects/effects.dmi' - icon_state = "heal" - duration = 15 - -/obj/effect/overlay/temp/heal/New(loc, colour) - ..() - pixel_x = rand(-12, 12) - pixel_y = rand(-9, 0) - if(colour) - color = colour - -/obj/effect/overlay/temp/cult/sac - name = "maw of Nar-Sie" - icon_state = "sacconsume" - -/obj/effect/overlay/temp/cult/door - name = "unholy glow" - icon_state = "doorglow" - layer = 3.17 //above closed doors - -/obj/effect/overlay/temp/cult/door/unruned - icon_state = "unruneddoorglow" - -/obj/effect/overlay/temp/cult/turf - name = "unholy glow" - icon_state = "wallglow" - layer = TURF_LAYER + 0.07 - -/obj/effect/overlay/temp/cult/turf/open/floor - icon_state = "floorglow" - duration = 5 - -/obj/effect/overlay/temp/shieldflash - icon_state = "shield-flash" - duration = 3 - -/obj/effect/overlay/temp/shieldflash/New(var/flash_color) - diff --git a/code/game/objects/effects/temporary_visuals/cult.dm b/code/game/objects/effects/temporary_visuals/cult.dm new file mode 100644 index 00000000000..cb2440a9596 --- /dev/null +++ b/code/game/objects/effects/temporary_visuals/cult.dm @@ -0,0 +1,39 @@ +//temporary visual effects(/obj/effect/overlay/temp) used by cult stuff +/obj/effect/overlay/temp/cult + icon = 'icons/effects/effects.dmi' + randomdir = FALSE + duration = 10 + +/obj/effect/overlay/temp/cult/sparks + randomdir = TRUE + name = "blood sparks" + icon_state = "bloodsparkles" + +/obj/effect/overlay/temp/dir_setting/cult/phase + name = "phase glow" + duration = 7 + icon_state = "cultin" + +/obj/effect/overlay/temp/dir_setting/cult/phase/out + icon_state = "cultout" + +/obj/effect/overlay/temp/cult/sac + name = "maw of Nar-Sie" + icon_state = "sacconsume" + +/obj/effect/overlay/temp/cult/door + name = "unholy glow" + icon_state = "doorglow" + layer = 3.17 //above closed doors + +/obj/effect/overlay/temp/cult/door/unruned + icon_state = "unruneddoorglow" + +/obj/effect/overlay/temp/cult/turf + name = "unholy glow" + icon_state = "wallglow" + layer = TURF_LAYER + 0.07 + +/obj/effect/overlay/temp/cult/turf/open/floor + icon_state = "floorglow" + duration = 5 \ No newline at end of file diff --git a/code/game/objects/effects/temporary_visuals/miscellaneous.dm b/code/game/objects/effects/temporary_visuals/miscellaneous.dm new file mode 100644 index 00000000000..0f30880a57f --- /dev/null +++ b/code/game/objects/effects/temporary_visuals/miscellaneous.dm @@ -0,0 +1,136 @@ +/obj/effect/overlay/temp/dir_setting/bloodsplatter + icon = 'icons/effects/blood.dmi' + duration = 5 + randomdir = FALSE + layer = MOB_LAYER - 0.1 + color = "#C80000" + var/splatter_type = "splatter" + +/obj/effect/overlay/temp/dir_setting/bloodsplatter/New(loc, set_dir, blood_color) + if(blood_color) + color = blood_color + if(set_dir in diagonals) + icon_state = "[splatter_type][pick(1, 2, 6)]" + else + icon_state = "[splatter_type][pick(3, 4, 5)]" + ..() + var/target_pixel_x = 0 + var/target_pixel_y = 0 + switch(set_dir) + if(NORTH) + target_pixel_y = 16 + if(SOUTH) + target_pixel_y = -16 + layer = MOB_LAYER + 0.1 + if(EAST) + target_pixel_x = 16 + if(WEST) + target_pixel_x = -16 + if(NORTHEAST) + target_pixel_x = 16 + target_pixel_y = 16 + if(NORTHWEST) + target_pixel_x = -16 + target_pixel_y = 16 + if(SOUTHEAST) + target_pixel_x = 16 + target_pixel_y = -16 + layer = MOB_LAYER + 0.1 + if(SOUTHWEST) + target_pixel_x = -16 + target_pixel_y = -16 + layer = MOB_LAYER + 0.1 + animate(src, pixel_x = target_pixel_x, pixel_y = target_pixel_y, alpha = 0, time = duration) + +/obj/effect/overlay/temp/dir_setting/bloodsplatter/xenosplatter + color = null + splatter_type = "xsplatter" + +/obj/effect/overlay/temp/dir_setting/speedbike_trail + name = "speedbike trails" + icon = 'icons/effects/effects.dmi' + icon_state = "ion_fade" + duration = 10 + randomdir = FALSE + layer = MOB_LAYER - 0.2 + +/obj/effect/overlay/temp/guardian + randomdir = FALSE + +/obj/effect/overlay/temp/guardian/phase + duration = 5 + icon_state = "phasein" + +/obj/effect/overlay/temp/guardian/phase/out + icon_state = "phaseout" + +/obj/effect/overlay/temp/decoy + desc = "It's a decoy!" + duration = 15 + +/obj/effect/overlay/temp/decoy/New(loc, atom/mimiced_atom) + ..() + alpha = initial(alpha) + if(mimiced_atom) + name = mimiced_atom.name + appearance = mimiced_atom.appearance + setDir(mimiced_atom.dir) + mouse_opacity = 0 + +/obj/effect/overlay/temp/decoy/fading/New(loc, atom/mimiced_atom) + ..() + animate(src, alpha = 0, time = duration) + +/obj/effect/overlay/temp/revenant + name = "spooky lights" + icon = 'icons/effects/effects.dmi' + icon_state = "purplesparkles" + +/obj/effect/overlay/temp/revenant/cracks + name = "glowing cracks" + icon_state = "purplecrack" + duration = 6 + +/obj/effect/overlay/temp/emp + name = "emp sparks" + icon = 'icons/effects/effects.dmi' + icon_state = "empdisable" + +/obj/effect/overlay/temp/emp/pulse + name = "emp pulse" + icon_state = "emppulse" + duration = 8 + randomdir = FALSE + +/obj/effect/overlay/temp/heal //color is white by default, set to whatever is needed + name = "healing glow" + icon = 'icons/effects/effects.dmi' + icon_state = "heal" + duration = 15 + +/obj/effect/overlay/temp/heal/New(loc, colour) + ..() + pixel_x = rand(-12, 12) + pixel_y = rand(-9, 0) + if(colour) + color = colour + +/obj/effect/overlay/temp/kinetic_blast + name = "kinetic explosion" + icon = 'icons/obj/projectiles.dmi' + icon_state = "kinetic_blast" + layer = ABOVE_MOB_LAYER + duration = 4 + +/obj/effect/overlay/temp/explosion + name = "explosion" + icon = 'icons/effects/96x96.dmi' + icon_state = "explosion" + pixel_x = -32 + pixel_y = -32 + duration = 8 + +/obj/effect/overlay/temp/explosion/fast + icon_state = "explosionfast" + duration = 4 + diff --git a/code/game/objects/effects/temporary_visuals/temporary_visual.dm b/code/game/objects/effects/temporary_visuals/temporary_visual.dm new file mode 100644 index 00000000000..f43e41d79a7 --- /dev/null +++ b/code/game/objects/effects/temporary_visuals/temporary_visual.dm @@ -0,0 +1,32 @@ +//temporary visual effects +/obj/effect/overlay/temp + anchored = 1 + layer = ABOVE_MOB_LAYER + mouse_opacity = 0 + var/duration = 10 + var/randomdir = TRUE + +/obj/effect/overlay/temp/New() + if(randomdir) + setDir(pick(cardinal)) + + flick("[icon_state]", src) //Because we might be pulling it from a pool, flick whatever icon it uses so it starts at the start of the icon's animation. + + QDEL_IN(src, duration) + +/obj/effect/overlay/temp/singularity_act() + return + +/obj/effect/overlay/temp/singularity_pull() + return + +/obj/effect/overlay/temp/ex_act() + return + +/obj/effect/overlay/temp/dir_setting + randomdir = FALSE + +/obj/effect/overlay/temp/dir_setting/New(loc, set_dir) + if(set_dir) + setDir(set_dir) + ..() \ No newline at end of file diff --git a/code/modules/vehicle/speedbike.dm b/code/modules/vehicle/speedbike.dm index 7d46114fb63..198d3a6e9a5 100644 --- a/code/modules/vehicle/speedbike.dm +++ b/code/modules/vehicle/speedbike.dm @@ -14,21 +14,9 @@ overlay.layer = MOB_LAYER + 0.1 overlays += overlay -/obj/effect/overlay/temp/speedbike_trail - name = "speedbike trails" - icon = 'icons/effects/effects.dmi' - icon_state = "ion_fade" - duration = 10 - randomdir = 0 - layer = MOB_LAYER - 0.2 - -/obj/effect/overlay/temp/speedbike_trail/New(loc,move_dir) - ..() - dir = move_dir - /obj/vehicle/space/speedbike/Move(newloc,move_dir) if(buckled_mob) - new /obj/effect/overlay/temp/speedbike_trail(loc) + new /obj/effect/overlay/temp/dir_setting/speedbike_trail(loc) . = ..() /obj/vehicle/space/speedbike/handle_vehicle_layer() diff --git a/paradise.dme b/paradise.dme index 52c38c69f68..13ccd5155a1 100644 --- a/paradise.dme +++ b/paradise.dme @@ -727,6 +727,9 @@ #include "code\game\objects\effects\spawners\random_spawners.dm" #include "code\game\objects\effects\spawners\vaultspawner.dm" #include "code\game\objects\effects\spawners\windowspawner.dm" +#include "code\game\objects\effects\temporary_visuals\cult.dm" +#include "code\game\objects\effects\temporary_visuals\miscellaneous.dm" +#include "code\game\objects\effects\temporary_visuals\temporary_visual.dm" #include "code\game\objects\items\ashtray.dm" #include "code\game\objects\items\blueprints.dm" #include "code\game\objects\items\bodybag.dm"