Fixes phased/jaunting mobs falling into chasms (#40316)

This commit is contained in:
ShizCalev
2018-09-18 11:14:33 -04:00
committed by Joan Lung
parent 2b75e693d1
commit 6e1b3deb76
11 changed files with 40 additions and 37 deletions
@@ -257,7 +257,7 @@
/obj/item/antag_spawner/slaughter_demon/spawn_antag(client/C, turf/T, kind = "", datum/mind/user)
var/obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter(T)
var/obj/effect/dummy/phased_mob/slaughter/holder = new /obj/effect/dummy/phased_mob/slaughter(T)
var/mob/living/simple_animal/slaughter/S = new demon_type(holder)
S.holder = holder
S.key = C.key
+3 -3
View File
@@ -219,7 +219,7 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master",
H.set_species(/datum/species/human, 1)
H.regenerate_icons()
give_appropriate_spells()
if(istype(owner.current.loc, /obj/effect/dummy/slaughter/))
if(istype(owner.current.loc, /obj/effect/dummy/phased_mob/slaughter/))
owner.current.forceMove(get_turf(owner.current))//Fixes dying while jaunted leaving you permajaunted.
form = BASIC_DEVIL
@@ -304,7 +304,7 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master",
sound_to_playing_players('sound/hallucinations/veryfar_noise.ogg')
give_appropriate_spells()
D.convert_to_archdevil()
if(istype(D.loc, /obj/effect/dummy/slaughter/))
if(istype(D.loc, /obj/effect/dummy/phased_mob/slaughter/))
D.forceMove(get_turf(D))//Fixes dying while jaunted leaving you permajaunted.
var/area/A = get_area(owner.current)
if(A)
@@ -430,7 +430,7 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master",
update_hud()
if(body)
body.revive(TRUE, TRUE) //Adminrevive also recovers organs, preventing someone from resurrecting without a heart.
if(istype(body.loc, /obj/effect/dummy/slaughter/))
if(istype(body.loc, /obj/effect/dummy/phased_mob/slaughter/))
body.forceMove(get_turf(body))//Fixes dying while jaunted leaving you permajaunted.
if(istype(body, /mob/living/carbon/true_devil))
var/mob/living/carbon/true_devil/D = body
@@ -51,8 +51,8 @@
..()
var/obj/effect/proc_holder/spell/bloodcrawl/bloodspell = new
AddSpell(bloodspell)
if(istype(loc, /obj/effect/dummy/slaughter))
bloodspell.phased = 1
if(istype(loc, /obj/effect/dummy/phased_mob/slaughter))
bloodspell.phased = TRUE
/mob/living/simple_animal/slaughter/Life()
..()
@@ -31,7 +31,7 @@
message_admins("No valid spawn locations found, aborting...")
return MAP_ERROR
var/obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter((pick(spawn_locs)))
var/obj/effect/dummy/phased_mob/slaughter/holder = new /obj/effect/dummy/phased_mob/slaughter((pick(spawn_locs)))
var/mob/living/simple_animal/slaughter/S = new (holder)
S.holder = holder
player_mind.transfer_to(S)
+2
View File
@@ -1096,6 +1096,8 @@ GLOBAL_LIST_INIT(hallucination_list, list(
/obj/effect/hallucination/danger/chasm/Crossed(atom/movable/AM)
if(AM == target)
if(istype(target, /obj/effect/dummy/phased_mob))
return
to_chat(target, "<span class='userdanger'>You fall into the chasm!</span>")
target.Knockdown(40)
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, target, "<span class='notice'>It's surprisingly shallow.</span>"), 15)
+6 -6
View File
@@ -1,4 +1,4 @@
/obj/effect/dummy/slaughter //Can't use the wizard one, blocked by jaunt/slow
/obj/effect/dummy/phased_mob/slaughter //Can't use the wizard one, blocked by jaunt/slow
name = "water"
icon = 'icons/effects/effects.dmi'
icon_state = "nothing"
@@ -8,15 +8,15 @@
invisibility = 60
resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
/obj/effect/dummy/slaughter/relaymove(mob/user, direction)
/obj/effect/dummy/phased_mob/slaughter/relaymove(mob/user, direction)
forceMove(get_step(src,direction))
/obj/effect/dummy/slaughter/ex_act()
/obj/effect/dummy/phased_mob/slaughter/ex_act()
return
/obj/effect/dummy/slaughter/bullet_act()
/obj/effect/dummy/phased_mob/slaughter/bullet_act()
return
/obj/effect/dummy/slaughter/singularity_act()
/obj/effect/dummy/phased_mob/slaughter/singularity_act()
return
@@ -50,7 +50,7 @@
playsound(get_turf(src), 'sound/magic/enter_blood.ogg', 100, 1, -1)
// Extinguish, unbuckle, stop being pulled, set our location into the
// dummy object
var/obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter(mobloc)
var/obj/effect/dummy/phased_mob/slaughter/holder = new /obj/effect/dummy/phased_mob/slaughter(mobloc)
src.ExtinguishMob()
// Keep a reference to whatever we're pulling, because forceMove()
@@ -91,8 +91,8 @@ Difficulty: Hard
return INITIALIZE_HINT_QDEL //There can be only one
var/obj/effect/proc_holder/spell/bloodcrawl/bloodspell = new
AddSpell(bloodspell)
if(istype(loc, /obj/effect/dummy/slaughter))
bloodspell.phased = 1
if(istype(loc, /obj/effect/dummy/phased_mob/slaughter))
bloodspell.phased = TRUE
internal = new/obj/item/gps/internal/bubblegum(src)
/mob/living/simple_animal/hostile/megafauna/bubblegum/grant_achievement(medaltype,scoretype)
+2 -2
View File
@@ -104,7 +104,7 @@
/obj/effect/proc_holder/spell/targeted/infernal_jaunt/cast(list/targets, mob/living/user = usr)
if(istype(user))
if(istype(user.loc, /obj/effect/dummy/slaughter/))
if(istype(user.loc, /obj/effect/dummy/phased_mob/slaughter/))
if(valid_location(user))
to_chat(user, "<span class='warning'>You are now phasing in.</span>")
if(do_mob(user,user,150))
@@ -145,7 +145,7 @@
spawn_dust()
visible_message("<span class='warning'>[src] disappears in a flashfire!</span>")
playsound(get_turf(src), 'sound/magic/enter_blood.ogg', 100, 1, -1)
var/obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter(loc)
var/obj/effect/dummy/phased_mob/slaughter/holder = new /obj/effect/dummy/phased_mob/slaughter(loc)
ExtinguishMob()
forceMove(holder)
holder = holder
@@ -25,7 +25,7 @@
/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)
var/obj/effect/dummy/phased_mob/spell_jaunt/holder = new /obj/effect/dummy/phased_mob/spell_jaunt(mobloc)
new jaunt_out_type(mobloc, target.dir)
target.ExtinguishMob()
target.forceMove(holder)
@@ -62,7 +62,7 @@
steam.set_up(10, 0, mobloc)
steam.start()
/obj/effect/dummy/spell_jaunt
/obj/effect/dummy/phased_mob/spell_jaunt
name = "water"
icon = 'icons/effects/effects.dmi'
icon_state = "nothing"
@@ -74,13 +74,13 @@
invisibility = 60
resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
/obj/effect/dummy/spell_jaunt/Destroy()
/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/spell_jaunt/relaymove(var/mob/user, direction)
/obj/effect/dummy/phased_mob/spell_jaunt/relaymove(var/mob/user, direction)
if ((movedelay > world.time) || reappearing || !direction)
return
var/turf/newLoc = get_step(src,direction)
@@ -97,7 +97,7 @@
forceMove(newLoc)
/obj/effect/dummy/spell_jaunt/ex_act(blah)
/obj/effect/dummy/phased_mob/spell_jaunt/ex_act(blah)
return
/obj/effect/dummy/spell_jaunt/bullet_act(blah)
/obj/effect/dummy/phased_mob/spell_jaunt/bullet_act(blah)
return
+13 -13
View File
@@ -15,8 +15,8 @@
/obj/effect/proc_holder/spell/targeted/shadowwalk/cast(list/targets,mob/living/user = usr)
var/L = user.loc
if(istype(user.loc, /obj/effect/dummy/shadow))
var/obj/effect/dummy/shadow/S = L
if(istype(user.loc, /obj/effect/dummy/phased_mob/shadow))
var/obj/effect/dummy/phased_mob/shadow/S = L
S.end_jaunt(FALSE)
return
else
@@ -28,13 +28,13 @@
user.SetStun(0, FALSE)
user.SetKnockdown(0, FALSE)
user.setStaminaLoss(0, 0)
var/obj/effect/dummy/shadow/S2 = new(get_turf(user.loc))
var/obj/effect/dummy/phased_mob/shadow/S2 = new(get_turf(user.loc))
user.forceMove(S2)
S2.jaunter = user
else
to_chat(user, "<span class='warning'>It isn't dark enough here!</span>")
/obj/effect/dummy/shadow
/obj/effect/dummy/phased_mob/shadow
name = "darkness"
icon = 'icons/effects/effects.dmi'
icon_state = "nothing"
@@ -45,7 +45,7 @@
invisibility = 60
resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
/obj/effect/dummy/shadow/relaymove(mob/user, direction)
/obj/effect/dummy/phased_mob/shadow/relaymove(mob/user, direction)
var/turf/newLoc = get_step(src,direction)
if(isspaceturf(newLoc))
to_chat(user, "<span class='warning'>It really would not be wise to go into space.</span>")
@@ -53,7 +53,7 @@
forceMove(newLoc)
check_light_level()
/obj/effect/dummy/shadow/proc/check_light_level()
/obj/effect/dummy/phased_mob/shadow/proc/check_light_level()
var/turf/T = get_turf(src)
var/light_amount = T.get_lumcount()
if(light_amount > 0.2) // jaunt ends
@@ -61,7 +61,7 @@
else if (light_amount < 0.2 && (!QDELETED(jaunter))) //heal in the dark
jaunter.heal_overall_damage(1,1)
/obj/effect/dummy/shadow/proc/end_jaunt(forced = FALSE)
/obj/effect/dummy/phased_mob/shadow/proc/end_jaunt(forced = FALSE)
if(jaunter)
if(forced)
visible_message("<span class='boldwarning'>[jaunter] is revealed by the light!</span>")
@@ -72,27 +72,27 @@
jaunter = null
qdel(src)
/obj/effect/dummy/shadow/Initialize(mapload)
/obj/effect/dummy/phased_mob/shadow/Initialize(mapload)
. = ..()
START_PROCESSING(SSobj, src)
/obj/effect/dummy/shadow/Destroy()
/obj/effect/dummy/phased_mob/shadow/Destroy()
STOP_PROCESSING(SSobj, src)
. = ..()
/obj/effect/dummy/shadow/process()
/obj/effect/dummy/phased_mob/shadow/process()
if(!jaunter)
qdel(src)
if(jaunter.loc != src)
qdel(src)
check_light_level()
/obj/effect/dummy/shadow/ex_act()
/obj/effect/dummy/phased_mob/shadow/ex_act()
return
/obj/effect/dummy/shadow/bullet_act()
/obj/effect/dummy/phased_mob/shadow/bullet_act()
return
/obj/effect/dummy/shadow/singularity_act()
/obj/effect/dummy/phased_mob/shadow/singularity_act()
return