[MIRROR] Removed effect/dummy/phased_mob copypasta. Fixed squeak component triggering from abstract effects & co. (#1784)

* Removed effect/dummy/phased_mob copypasta. Fixed squeak component triggering from abstract effects & co. (#54783)

* Removed effect/dummy/phased_mob copypasta. Fixed squeak component triggering from abstract effects & co.

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
SkyratBot
2020-11-23 18:29:54 +00:00
committed by GitHub
co-authored by Ghom
parent de54ebf14c
commit 3f22ac0cee
11 changed files with 91 additions and 166 deletions
@@ -70,42 +70,15 @@
playsound(get_turf(target), 'sound/magic/ethereal_exit.ogg', 50, TRUE, -1)
/obj/effect/dummy/phased_mob/spell_jaunt
name = "water"
icon = 'icons/effects/effects.dmi'
icon_state = "nothing"
movespeed = 2 //quite slow.
var/reappearing = FALSE
var/movedelay = 0
var/movespeed = 2
density = FALSE
anchored = TRUE
invisibility = 60
resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
/obj/effect/dummy/phased_mob/spell_jaunt/Destroy()
// Eject contents if deleted somehow
for(var/atom/movable/AM in src)
AM.forceMove(get_turf(src))
return ..()
/obj/effect/dummy/phased_mob/spell_jaunt/relaymove(mob/living/user, direction)
if ((movedelay > world.time) || reappearing || !direction)
/obj/effect/dummy/phased_mob/spell_jaunt/phased_check(mob/living/user, direction)
if(reappearing)
return
var/turf/newLoc = get_step(src,direction)
setDir(direction)
movedelay = world.time + movespeed
if(newLoc.flags_1 & NOJAUNT_1)
to_chat(user, "<span class='warning'>Some strange aura is blocking the way.</span>")
. = ..()
if(!.)
return
if (locate(/obj/effect/blessing, newLoc))
if (locate(/obj/effect/blessing, .))
to_chat(user, "<span class='warning'>Holy energies block your path!</span>")
return
forceMove(newLoc)
/obj/effect/dummy/phased_mob/spell_jaunt/ex_act(blah)
return
/obj/effect/dummy/phased_mob/spell_jaunt/bullet_act(blah)
return BULLET_ACT_FORCE_PIERCE
return null
+23 -41
View File
@@ -35,23 +35,32 @@
to_chat(user, "<span class='warning'>It isn't dark enough here!</span>")
/obj/effect/dummy/phased_mob/shadow
name = "darkness"
icon = 'icons/effects/effects.dmi'
icon_state = "nothing"
var/canmove = TRUE
var/mob/living/jaunter
density = FALSE
anchored = TRUE
invisibility = 60
resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
/obj/effect/dummy/phased_mob/shadow/Initialize(mapload)
. = ..()
START_PROCESSING(SSobj, src)
/obj/effect/dummy/phased_mob/shadow/Destroy()
STOP_PROCESSING(SSobj, src)
. = ..()
/obj/effect/dummy/phased_mob/shadow/process()
if(!jaunter || jaunter.loc != src)
qdel(src)
check_light_level()
/obj/effect/dummy/phased_mob/shadow/relaymove(mob/living/user, direction)
var/turf/newLoc = get_step(src,direction)
if(isspaceturf(newLoc))
var/turf/oldloc = loc
. = ..()
if(loc != oldloc)
check_light_level()
/obj/effect/dummy/phased_mob/shadow/phased_check(mob/living/user, direction)
. = ..()
if(. && isspaceturf(.))
to_chat(user, "<span class='warning'>It really would not be wise to go into space.</span>")
return
forceMove(newLoc)
check_light_level()
return FALSE
/obj/effect/dummy/phased_mob/shadow/proc/check_light_level()
var/turf/T = get_turf(src)
@@ -67,32 +76,5 @@
visible_message("<span class='boldwarning'>[jaunter] is revealed by the light!</span>")
else
visible_message("<span class='boldwarning'>[jaunter] emerges from the darkness!</span>")
jaunter.forceMove(get_turf(src))
playsound(get_turf(jaunter), 'sound/magic/ethereal_exit.ogg', 50, TRUE, -1)
jaunter = null
playsound(loc, 'sound/magic/ethereal_exit.ogg', 50, TRUE, -1)
qdel(src)
/obj/effect/dummy/phased_mob/shadow/Initialize(mapload)
. = ..()
START_PROCESSING(SSobj, src)
/obj/effect/dummy/phased_mob/shadow/Destroy()
STOP_PROCESSING(SSobj, src)
. = ..()
/obj/effect/dummy/phased_mob/shadow/process()
if(!jaunter)
qdel(src)
if(jaunter.loc != src)
qdel(src)
check_light_level()
/obj/effect/dummy/phased_mob/shadow/ex_act()
return
/obj/effect/dummy/phased_mob/shadow/bullet_act()
return BULLET_ACT_FORCE_PIERCE
/obj/effect/dummy/phased_mob/shadow/singularity_act()
return