diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 880f9cf897d..8f9f98e82fe 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -496,25 +496,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
var/y=arcsin(x/sqrt(1+x*x))
return y
-
-/proc/anim(turf/location,target as mob|obj,a_icon,a_icon_state as text,flick_anim as text,sleeptime = 0,direction as num)
-//This proc throws up either an icon or an animation for a specified amount of time.
-//The variables should be apparent enough.
- var/atom/movable/overlay/animation = new(location)
- if(direction)
- animation.setDir(direction)
- animation.icon = a_icon
- animation.layer = target:layer+1
- if(a_icon_state)
- animation.icon_state = a_icon_state
- else
- animation.icon_state = "blank"
- animation.master = target
- flick(flick_anim, animation)
- sleep(max(sleeptime, 15))
- qdel(animation)
-
-
/atom/proc/GetAllContents()
var/list/processing_list = list(src)
var/list/assembled = list()
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index cbe78fdd4dc..8cb112ca8f8 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -305,26 +305,6 @@
throw_impact(AM)
return 1
-//Overlays
-/atom/movable/overlay
- var/atom/master = null
- anchored = 1
-
-/atom/movable/overlay/New()
- verbs.Cut()
-
-/atom/movable/overlay/attackby(a, b, c)
- if (src.master)
- return src.master.attackby(a, b, c)
-
-/atom/movable/overlay/attack_paw(a, b, c)
- if (src.master)
- return src.master.attack_paw(a, b, c)
-
-/atom/movable/overlay/attack_hand(a, b, c)
- if (src.master)
- return src.master.attack_hand(a, b, c)
-
/atom/movable/proc/handle_buckled_mob_movement(newloc,direct)
for(var/m in buckled_mobs)
var/mob/living/buckled_mob = m
diff --git a/code/game/gamemodes/clock_cult/clock_items.dm b/code/game/gamemodes/clock_cult/clock_items.dm
index 8b43b780761..3082e756b88 100644
--- a/code/game/gamemodes/clock_cult/clock_items.dm
+++ b/code/game/gamemodes/clock_cult/clock_items.dm
@@ -772,13 +772,13 @@
impale_cooldown = world.time + initial(impale_cooldown)
attack_cooldown = world.time + initial(attack_cooldown)
if(target)
- PoolOrNew(/obj/effect/overlay/temp/bloodsplatter, list(get_turf(target), get_dir(user, target)))
+ PoolOrNew(/obj/effect/overlay/temp/dir_setting/bloodsplatter, list(get_turf(target), get_dir(user, target)))
target.Stun(2)
user << "You prepare to remove your ratvarian spear from [target]..."
var/remove_verb = pick("pull", "yank", "drag")
if(do_after(user, 10, 1, target))
var/turf/T = get_turf(target)
- var/obj/effect/overlay/temp/bloodsplatter/B = PoolOrNew(/obj/effect/overlay/temp/bloodsplatter, list(T, get_dir(target, user)))
+ var/obj/effect/overlay/temp/dir_setting/bloodsplatter/B = PoolOrNew(/obj/effect/overlay/temp/dir_setting/bloodsplatter, list(T, get_dir(target, user)))
playsound(T, 'sound/misc/splort.ogg', 200, 1)
playsound(T, 'sound/weapons/pierce.ogg', 200, 1)
if(target.stat != CONSCIOUS)
diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm
index 0f419ad2fec..499c09eca84 100644
--- a/code/game/gamemodes/cult/cult_items.dm
+++ b/code/game/gamemodes/cult/cult_items.dm
@@ -345,14 +345,14 @@
if(uses <= 0)
icon_state ="shifter_drained"
playsound(mobloc, "sparks", 50, 1)
- PoolOrNew(/obj/effect/overlay/temp/cult/phase/out, list(mobloc, C.dir))
+ PoolOrNew(/obj/effect/overlay/temp/dir_setting/cult/phase/out, list(mobloc, C.dir))
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
- PoolOrNew(/obj/effect/overlay/temp/cult/phase, list(destination, C.dir))
+ PoolOrNew(/obj/effect/overlay/temp/dir_setting/cult/phase, list(destination, C.dir))
playsound(destination, 'sound/effects/phasein.ogg', 25, 1)
playsound(destination, "sparks", 50, 1)
diff --git a/code/game/gamemodes/miniantags/abduction/machinery/pad.dm b/code/game/gamemodes/miniantags/abduction/machinery/pad.dm
index 1e3a5428a10..b5434dbfdd1 100644
--- a/code/game/gamemodes/miniantags/abduction/machinery/pad.dm
+++ b/code/game/gamemodes/miniantags/abduction/machinery/pad.dm
@@ -16,13 +16,11 @@
flick("alien-pad", src)
for(var/mob/living/target in loc)
target.forceMove(teleport_target)
- spawn(0)
- anim(target.loc,target,'icons/mob/mob.dmi',,"uncloak",,target.dir)
+ PoolOrNew(/obj/effect/overlay/temp/dir_setting/ninja, list(get_turf(target), target.dir))
/obj/machinery/abductor/pad/proc/Retrieve(mob/living/target)
flick("alien-pad", src)
- spawn(0)
- anim(target.loc,target,'icons/mob/mob.dmi',,"uncloak",,target.dir)
+ PoolOrNew(/obj/effect/overlay/temp/dir_setting/ninja, list(get_turf(target), target.dir))
Warp(target)
/obj/machinery/abductor/pad/proc/MobToLoc(place,mob/living/target)
@@ -30,7 +28,7 @@
sleep(80)
flick("alien-pad", src)
target.forceMove(place)
- anim(target.loc,target,'icons/mob/mob.dmi',,"uncloak",,target.dir)
+ PoolOrNew(/obj/effect/overlay/temp/dir_setting/ninja, list(get_turf(target), target.dir))
/obj/machinery/abductor/pad/proc/PadToLoc(place)
PoolOrNew(/obj/effect/overlay/temp/teleport_abductor, place)
@@ -38,8 +36,7 @@
flick("alien-pad", src)
for(var/mob/living/target in get_turf(src))
target.forceMove(place)
- spawn(0)
- anim(target.loc,target,'icons/mob/mob.dmi',,"uncloak",,target.dir)
+ PoolOrNew(/obj/effect/overlay/temp/dir_setting/ninja, list(get_turf(target), target.dir))
/obj/effect/overlay/temp/teleport_abductor
diff --git a/code/game/gamemodes/miniantags/morph/morph.dm b/code/game/gamemodes/miniantags/morph/morph.dm
index 1d98760553f..f1b34bdebf9 100644
--- a/code/game/gamemodes/miniantags/morph/morph.dm
+++ b/code/game/gamemodes/miniantags/morph/morph.dm
@@ -121,8 +121,6 @@
form = null
alpha = initial(alpha)
- //anim(loc,src,'icons/mob/mob.dmi',,"morph",,src.dir)
-
visible_message("[src] suddenly collapses in on itself, dissolving into a pile of green flesh!", \
"You reform to your normal body.")
name = initial(name)
diff --git a/code/game/gamemodes/wizard/soulstone.dm b/code/game/gamemodes/wizard/soulstone.dm
index 8e0793ff4a5..e9c0e194255 100644
--- a/code/game/gamemodes/wizard/soulstone.dm
+++ b/code/game/gamemodes/wizard/soulstone.dm
@@ -220,12 +220,7 @@
/obj/item/device/soulstone/proc/init_shade(mob/living/carbon/human/T, mob/U, vic = 0)
new /obj/effect/decal/remains/human(T.loc) //Spawns a skeleton
T.invisibility = INVISIBILITY_ABSTRACT
- var/atom/movable/overlay/animation = new /atom/movable/overlay( T.loc )
- animation.icon_state = "blank"
- animation.icon = 'icons/mob/mob.dmi'
- animation.master = T
- flick("dust-h", animation)
- qdel(animation)
+ T.dust_animation()
var/mob/living/simple_animal/shade/S = new /mob/living/simple_animal/shade(src)
S.status_flags |= GODMODE //So they won't die inside the stone somehow
S.canmove = 0//Can't move out of the soul stone
diff --git a/code/game/objects/effects/overlays.dm b/code/game/objects/effects/overlays.dm
index d0d79764c09..87d07232160 100644
--- a/code/game/objects/effects/overlays.dm
+++ b/code/game/objects/effects/overlays.dm
@@ -42,13 +42,21 @@
timerid = QDEL_IN(src, duration)
-/obj/effect/overlay/temp/bloodsplatter
+/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 = BELOW_MOB_LAYER
-/obj/effect/overlay/temp/bloodsplatter/New(loc, set_dir)
+/obj/effect/overlay/temp/dir_setting/bloodsplatter/New(loc, set_dir)
if(set_dir in diagonals)
icon_state = "splatter[pick(1, 2, 6)]"
else
@@ -80,7 +88,6 @@
target_pixel_x = -16
target_pixel_y = -16
layer = ABOVE_MOB_LAYER
- setDir(set_dir)
animate(src, pixel_x = target_pixel_x, pixel_y = target_pixel_y, alpha = 0, time = duration)
@@ -122,6 +129,57 @@
randomdir = 0
duration = 6
+/obj/effect/overlay/temp/dir_setting/ninja
+ name = "ninja shadow"
+ icon = 'icons/mob/mob.dmi'
+ icon_state = "uncloak"
+ duration = 9
+
+/obj/effect/overlay/temp/dir_setting/ninja/cloak
+ icon_state = "cloak"
+
+/obj/effect/overlay/temp/dir_setting/ninja/shadow
+ icon_state = "shadow"
+
+/obj/effect/overlay/temp/dir_setting/ninja/phase
+ name = "ninja energy"
+ icon_state = "phasein"
+
+/obj/effect/overlay/temp/dir_setting/ninja/phase/out
+ icon_state = "phaseout"
+
+/obj/effect/overlay/temp/dir_setting/wraith
+ name = "blood"
+ icon = 'icons/mob/mob.dmi'
+ icon_state = "phase_shift2"
+ duration = 12
+
+/obj/effect/overlay/temp/dir_setting/wraith/out
+ icon_state = "phase_shift"
+
+/obj/effect/overlay/temp/wizard
+ name = "water"
+ icon = 'icons/mob/mob.dmi'
+ icon_state = "reappear"
+ duration = 5
+
+/obj/effect/overlay/temp/wizard/out
+ icon_state = "liquify"
+ duration = 12
+
+/obj/effect/overlay/temp/monkeyify
+ icon = 'icons/mob/mob.dmi'
+ icon_state = "h2monkey"
+ duration = 22
+
+/obj/effect/overlay/temp/monkeyify/humanify
+ icon_state = "monkey2h"
+
+/obj/effect/overlay/temp/borgflash
+ icon = 'icons/mob/mob.dmi'
+ icon_state = "blspell"
+ duration = 5
+
/obj/effect/overlay/temp/guardian
randomdir = 0
@@ -158,17 +216,12 @@
name = "blood sparks"
icon_state = "bloodsparkles"
-/obj/effect/overlay/temp/cult/phase
+/obj/effect/overlay/temp/dir_setting/cult/phase
name = "phase glow"
duration = 7
icon_state = "cultin"
-/obj/effect/overlay/temp/cult/phase/New(loc, set_dir)
- ..()
- if(set_dir)
- setDir(set_dir)
-
-/obj/effect/overlay/temp/cult/phase/out
+/obj/effect/overlay/temp/dir_setting/cult/phase/out
icon_state = "cultout"
/obj/effect/overlay/temp/cult/sac
diff --git a/code/modules/assembly/flash.dm b/code/modules/assembly/flash.dm
index aece047550c..27b859bd10c 100644
--- a/code/modules/assembly/flash.dm
+++ b/code/modules/assembly/flash.dm
@@ -173,26 +173,15 @@
/obj/item/device/assembly/flash/cyborg/attack(mob/living/M, mob/user)
..()
- cyborg_flash_animation(user)
+ PoolOrNew(/obj/effect/overlay/temp/borgflash, get_turf(src))
/obj/item/device/assembly/flash/cyborg/attack_self(mob/user)
..()
- cyborg_flash_animation(user)
+ PoolOrNew(/obj/effect/overlay/temp/borgflash, get_turf(src))
/obj/item/device/assembly/flash/cyborg/attackby(obj/item/weapon/W, mob/user, params)
return
-/obj/item/device/assembly/flash/cyborg/proc/cyborg_flash_animation(mob/living/user)
- var/atom/movable/overlay/animation = new(user.loc)
- animation.layer = user.layer + 1
- animation.icon_state = "blank"
- animation.icon = 'icons/mob/mob.dmi'
- animation.master = user
- flick("blspell", animation)
- sleep(5)
- qdel(animation)
-
-
/obj/item/device/assembly/flash/memorizer
name = "memorizer"
desc = "If you see this, you're not likely to remember it any time soon."
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm
index c3a657616f8..68adb12b3c0 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm
@@ -197,7 +197,7 @@ Difficulty: Hard
for(var/turf/J in getline(src,E))
if(!range)
break
- PoolOrNew(/obj/effect/overlay/temp/bloodsplatter, list(previousturf, get_dir(previousturf, J)))
+ PoolOrNew(/obj/effect/overlay/temp/dir_setting/bloodsplatter, list(previousturf, get_dir(previousturf, J)))
if(!previousturf.CanAtmosPass(J))
break
playsound(J,'sound/effects/splat.ogg', 100, 1, -1)
diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm
index 919e995bca8..a8ecf1a6bac 100644
--- a/code/modules/mob/mob_movement.dm
+++ b/code/modules/mob/mob_movement.dm
@@ -236,14 +236,12 @@
L.loc = locate(locx,locy,mobloc.z)
var/limit = 2//For only two trailing shadows.
for(var/turf/T in getline(mobloc, L.loc))
- spawn(0)
- anim(T,L,'icons/mob/mob.dmi',,"shadow",,L.dir)
+ PoolOrNew(/obj/effect/overlay/temp/dir_setting/ninja/shadow, list(T, L.dir))
limit--
if(limit<=0)
break
else
- spawn(0)
- anim(mobloc,mob,'icons/mob/mob.dmi',,"shadow",,L.dir)
+ PoolOrNew(/obj/effect/overlay/temp/dir_setting/ninja/shadow, list(mobloc, L.dir))
L.loc = get_step(L, direct)
L.setDir(direct)
if(3) //Incorporeal move, but blocked by holy-watered tiles and salt piles.
diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm
index fcae203a523..9ba2db5975b 100644
--- a/code/modules/mob/transform_procs.dm
+++ b/code/modules/mob/transform_procs.dm
@@ -41,14 +41,9 @@
cut_overlays()
invisibility = INVISIBILITY_MAXIMUM
- var/atom/movable/overlay/animation = new( loc )
- animation.icon_state = "blank"
- animation.icon = 'icons/mob/mob.dmi'
- animation.master = src
- flick("h2monkey", animation)
+ PoolOrNew(/obj/effect/overlay/temp/monkeyify, get_turf(src))
sleep(22)
var/mob/living/carbon/monkey/O = new /mob/living/carbon/monkey( loc )
- qdel(animation)
// hash the original name?
if(tr_flags & TR_HASHNAME)
@@ -188,16 +183,11 @@
icon = null
cut_overlays()
invisibility = INVISIBILITY_MAXIMUM
- var/atom/movable/overlay/animation = new( loc )
- animation.icon_state = "blank"
- animation.icon = 'icons/mob/mob.dmi'
- animation.master = src
- flick("monkey2h", animation)
+ PoolOrNew(/obj/effect/overlay/temp/monkeyify/humanify, get_turf(src))
sleep(22)
var/mob/living/carbon/human/O = new( loc )
for(var/obj/item/C in O.loc)
O.equip_to_appropriate_slot(C)
- qdel(animation)
dna.transfer_identity(O)
O.updateappearance(mutcolor_update=1)
diff --git a/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm b/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm
index 04c0c796f23..56457b02ba5 100644
--- a/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm
+++ b/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm
@@ -76,28 +76,23 @@ It is possible to destroy the net by the occupant or someone else.
continue
M.unEquip(W)
- spawn(0)
- playsound(M.loc, 'sound/effects/sparks4.ogg', 50, 1)
- anim(M.loc,M,'icons/mob/mob.dmi',,"phaseout",,M.dir)
+ playsound(M.loc, 'sound/effects/sparks4.ogg', 50, 1)
+ PoolOrNew(/obj/effect/overlay/temp/dir_setting/ninja/phase/out, list(get_turf(M), M.dir))
- M.loc = pick(holdingfacility)//Throw mob in to the holding facility.
+ visible_message("[M] suddenly vanishes!")
+ M.forceMove(pick(holdingfacility)) //Throw mob in to the holding facility.
M << "You appear in a strange place!"
- spawn(0)
- var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
- spark_system.set_up(5, 0, M.loc)
- spark_system.start()
- playsound(M.loc, 'sound/effects/phasein.ogg', 25, 1)
- playsound(M.loc, 'sound/effects/sparks2.ogg', 50, 1)
- anim(M.loc,M,'icons/mob/mob.dmi',,"phasein",,M.dir)
- qdel(src)//Wait for everything to finish, delete the net. Else it will stop everything once net is deleted, including the spawn(0).
-
- for(var/mob/O in viewers(src, 3))
- O.show_message("[M] vanishes!", 1, "You hear sparks flying!", 2)
-
if(!isnull(master))//As long as they still exist.
master << "SUCCESS: transport procedure of \the [affecting] complete."
M.notransform = 0
+ var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
+ spark_system.set_up(5, 0, M.loc)
+ spark_system.start()
+ playsound(M.loc, 'sound/effects/phasein.ogg', 25, 1)
+ playsound(M.loc, 'sound/effects/sparks2.ogg', 50, 1)
+ PoolOrNew(/obj/effect/overlay/temp/dir_setting/ninja/phase, list(get_turf(M), M.dir))
+ qdel(src)
else//And they are free.
M << "You are free of the net!"
diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_teleporting.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_teleporting.dm
index d8a8b642777..50fdd52b241 100644
--- a/code/modules/ninja/suit/n_suit_verbs/ninja_teleporting.dm
+++ b/code/modules/ninja/suit/n_suit_verbs/ninja_teleporting.dm
@@ -31,22 +31,19 @@ Contents:
var/turf/destination = get_teleport_loc(H.loc,H,9,1,3,1,0,1)
var/turf/mobloc = get_turf(H.loc)//Safety
- if(destination&&istype(mobloc, /turf))//So we don't teleport out of containers
- spawn(0)
- playsound(H.loc, "sparks", 50, 1)
- anim(mobloc,src,'icons/mob/mob.dmi',,"phaseout",,H.dir)
+ if(destination && isturf(mobloc))//So we don't teleport out of containers
+ playsound(H.loc, "sparks", 50, 1)
+ PoolOrNew(/obj/effect/overlay/temp/dir_setting/ninja/phase/out, list(get_turf(H), H.dir))
handle_teleport_grab(destination, H)
H.loc = destination
- spawn(0)
- spark_system.start()
- playsound(H.loc, 'sound/effects/phasein.ogg', 25, 1)
- playsound(H.loc, "sparks", 50, 1)
- anim(H.loc,H,'icons/mob/mob.dmi',,"phasein",,H.dir)
+ spark_system.start()
+ playsound(H.loc, 'sound/effects/phasein.ogg', 25, 1)
+ playsound(H.loc, "sparks", 50, 1)
+ PoolOrNew(/obj/effect/overlay/temp/dir_setting/ninja/phase, list(get_turf(H), H.dir))
- spawn(0)
- destination.phase_damage_creatures(20,H)//Paralyse and damage mobs and mechas on the turf
+ destination.phase_damage_creatures(20,H)//Paralyse and damage mobs and mechas on the turf
s_coold = 1
else
H << "The VOID-shift device is malfunctioning, teleportation failed."
@@ -63,22 +60,19 @@ Contents:
if(!ninjacost(200,N_STEALTH_CANCEL))
var/mob/living/carbon/human/H = affecting
var/turf/mobloc = get_turf(H.loc)//To make sure that certain things work properly below.
- if((!T.density)&&istype(mobloc, /turf))
- spawn(0)
- playsound(H.loc, 'sound/effects/sparks4.ogg', 50, 1)
- anim(mobloc,src,'icons/mob/mob.dmi',,"phaseout",,H.dir)
+ if(T.density && isturf(mobloc))
+ playsound(H.loc, "sparks", 50, 1)
+ PoolOrNew(/obj/effect/overlay/temp/dir_setting/ninja/phase/out, list(get_turf(H), H.dir))
handle_teleport_grab(T, H)
H.loc = T
- spawn(0)
- spark_system.start()
- playsound(H.loc, 'sound/effects/phasein.ogg', 25, 1)
- playsound(H.loc, 'sound/effects/sparks2.ogg', 50, 1)
- anim(H.loc,H,'icons/mob/mob.dmi',,"phasein",,H.dir)
+ spark_system.start()
+ playsound(H.loc, 'sound/effects/phasein.ogg', 25, 1)
+ playsound(H.loc, "sparks", 50, 1)
+ PoolOrNew(/obj/effect/overlay/temp/dir_setting/ninja/phase, list(get_turf(H), H.dir))
- spawn(0)//Any living mobs in teleport area are gibbed.
- T.phase_damage_creatures(20,H)//Paralyse and damage mobs and mechas on the turf
+ T.phase_damage_creatures(20,H)//Paralyse and damage mobs and mechas on the turf
s_coold = 1
else
H << "You cannot teleport into solid walls or from solid matter"
diff --git a/code/modules/spells/spell_types/construct_spells.dm b/code/modules/spells/spell_types/construct_spells.dm
index 0142489bc88..47aaa643c88 100644
--- a/code/modules/spells/spell_types/construct_spells.dm
+++ b/code/modules/spells/spell_types/construct_spells.dm
@@ -108,16 +108,9 @@
centcom_cancast = 0 //Stop people from getting to centcom
action_icon_state = "phaseshift"
action_background_icon_state = "bg_demon"
-
-/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift/jaunt_disappear(atom/movable/overlay/animation, mob/living/target)
- animation.icon_state = "phase_shift"
- animation.setDir(target.dir)
- flick("phase_shift",animation)
-
-/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift/jaunt_reappear(atom/movable/overlay/animation, mob/living/target)
- animation.icon_state = "phase_shift2"
- animation.setDir(target.dir)
- flick("phase_shift2",animation)
+ jaunt_in_time = 12
+ jaunt_in_type = /obj/effect/overlay/temp/dir_setting/wraith
+ jaunt_out_type = /obj/effect/overlay/temp/dir_setting/wraith/out
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift/jaunt_steam(mobloc)
return
diff --git a/code/modules/spells/spell_types/ethereal_jaunt.dm b/code/modules/spells/spell_types/ethereal_jaunt.dm
index 71b58883ddb..84cfcc108aa 100644
--- a/code/modules/spells/spell_types/ethereal_jaunt.dm
+++ b/code/modules/spells/spell_types/ethereal_jaunt.dm
@@ -13,70 +13,56 @@
centcom_cancast = 0 //Prevent people from getting to centcom
nonabstract_req = 1
var/jaunt_duration = 50 //in deciseconds
+ var/jaunt_in_time = 5
+ var/jaunt_in_type = /obj/effect/overlay/temp/wizard
+ var/jaunt_out_type = /obj/effect/overlay/temp/wizard/out
action_icon_state = "jaunt"
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/cast(list/targets,mob/user = usr) //magnets, so mostly hardcoded
playsound(get_turf(user), 'sound/magic/Ethereal_Enter.ogg', 50, 1, -1)
for(var/mob/living/target in targets)
- target.notransform = 1 //protects the mob from being transformed (replaced) midjaunt and getting stuck in bluespace
- spawn(0)
- var/turf/mobloc = get_turf(target.loc)
- var/obj/effect/dummy/spell_jaunt/holder = new /obj/effect/dummy/spell_jaunt( mobloc )
- var/atom/movable/overlay/animation = new /atom/movable/overlay( mobloc )
- animation.name = "water"
- animation.density = 0
- animation.anchored = 1
- animation.icon = 'icons/mob/mob.dmi'
- animation.layer = FLY_LAYER
- animation.master = holder
- target.ExtinguishMob()
- if(target.buckled)
- target.buckled.unbuckle_mob(target,force=1)
- if(target.pulledby)
- target.pulledby.stop_pulling()
- target.stop_pulling()
- if(target.has_buckled_mobs())
- target.unbuckle_all_mobs(force=1)
- jaunt_disappear(animation, target)
- target.loc = holder
- target.reset_perspective(holder)
- target.notransform=0 //mob is safely inside holder now, no need for protection.
- jaunt_steam(mobloc)
+ addtimer(src, "do_jaunt", 0, FALSE, target)
- sleep(jaunt_duration)
+/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/proc/do_jaunt(mob/living/target)
+ target.notransform = 1
+ var/turf/mobloc = get_turf(target)
+ var/obj/effect/dummy/spell_jaunt/holder = new /obj/effect/dummy/spell_jaunt(mobloc)
+ PoolOrNew(jaunt_out_type, list(mobloc, holder.dir))
+ target.ExtinguishMob()
+ if(target.buckled)
+ target.buckled.unbuckle_mob(target,force=1)
+ if(target.pulledby)
+ target.pulledby.stop_pulling()
+ target.stop_pulling()
+ if(target.has_buckled_mobs())
+ target.unbuckle_all_mobs(force=1)
+ target.loc = holder
+ target.reset_perspective(holder)
+ target.notransform=0 //mob is safely inside holder now, no need for protection.
+ jaunt_steam(mobloc)
- if(target.loc != holder) //mob warped out of the warp
- qdel(holder)
- return
- mobloc = get_turf(target.loc)
- animation.loc = mobloc
- jaunt_steam(mobloc)
- target.canmove = 0
- holder.reappearing = 1
- playsound(get_turf(user), 'sound/magic/Ethereal_Exit.ogg', 50, 1, -1)
- sleep(20)
- if(!qdeleted(target))
- jaunt_reappear(animation, target)
- sleep(5)
- qdel(animation)
- qdel(holder)
- if(!qdeleted(target))
- if(mobloc.density)
- for(var/direction in list(1,2,4,8,5,6,9,10))
- var/turf/T = get_step(mobloc, direction)
- if(T)
- if(target.Move(T))
- break
- target.canmove = 1
-
-/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/proc/jaunt_disappear(atom/movable/overlay/animation, mob/living/target)
- animation.icon_state = "liquify"
- flick("liquify",animation)
-
-
-/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/proc/jaunt_reappear(atom/movable/overlay/animation, mob/living/target)
- flick("reappear",animation)
+ sleep(jaunt_duration)
+ if(target.loc != holder) //mob warped out of the warp
+ qdel(holder)
+ return
+ mobloc = get_turf(target.loc)
+ jaunt_steam(mobloc)
+ target.canmove = 0
+ holder.reappearing = 1
+ playsound(get_turf(target), 'sound/magic/Ethereal_Exit.ogg', 50, 1, -1)
+ sleep(25 - jaunt_in_time)
+ PoolOrNew(jaunt_in_type, list(mobloc, holder.dir))
+ sleep(jaunt_in_time)
+ qdel(holder)
+ if(!qdeleted(target))
+ if(mobloc.density)
+ for(var/direction in alldirs)
+ var/turf/T = get_step(mobloc, direction)
+ if(T)
+ if(target.Move(T))
+ break
+ target.canmove = 1
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/proc/jaunt_steam(mobloc)
var/datum/effect_system/steam_spread/steam = new /datum/effect_system/steam_spread()
@@ -103,6 +89,7 @@
/obj/effect/dummy/spell_jaunt/relaymove(var/mob/user, direction)
if (!src.canmove || reappearing || !direction) return
var/turf/newLoc = get_step(src,direction)
+ setDir(direction)
if(!(newLoc.flags & NOJAUNT))
loc = newLoc
else
diff --git a/icons/mob/mob.dmi b/icons/mob/mob.dmi
index 413248185ef..486e4e7fb74 100644
Binary files a/icons/mob/mob.dmi and b/icons/mob/mob.dmi differ