mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 03:27:46 +01:00
Merge pull request #10115 from PsiOmegaDelta/150712-SolidJaunting
Wizards can no longer de-jaunt in turfs with dense objects.
This commit is contained in:
@@ -119,10 +119,8 @@
|
||||
H << "<span class='warning'>You cannot use your teleporter on this Z-level.</span>"
|
||||
return 0
|
||||
|
||||
for(var/atom/A in T)
|
||||
if(A.density && !(A.flags & ON_BORDER))
|
||||
H << "<span class='warning'>You cannot teleport to a location with solid objects.</span>"
|
||||
return 0
|
||||
if(T.contains_dense_objects())
|
||||
H << "<span class='warning'>You cannot teleport to a location with solid objects.</span>"
|
||||
|
||||
phase_out(H,get_turf(H))
|
||||
H.loc = T
|
||||
|
||||
@@ -189,7 +189,11 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
|
||||
if(silenced > 0)
|
||||
return
|
||||
|
||||
if(user.z == 2 && spell_flags & Z2NOCAST) //Certain spells are not allowed on the centcomm zlevel
|
||||
var/turf/Turf = get_turf(user)
|
||||
if(!Turf)
|
||||
user << "<span class='warning'>You cannot cast spells in null space!</span>"
|
||||
|
||||
if(spell_flags & Z2NOCAST && (Turf.z in config.admin_levels)) //Certain spells are not allowed on the centcomm zlevel
|
||||
return 0
|
||||
|
||||
if(spell_flags & CONSTRUCT_CHECK)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
target.monkeyizing=0 //mob is safely inside holder now, no need for protection.
|
||||
jaunt_steam(mobloc)
|
||||
sleep(duration)
|
||||
mobloc = get_turf(target.loc)
|
||||
mobloc = holder.last_valid_turf
|
||||
animation.loc = mobloc
|
||||
jaunt_steam(mobloc)
|
||||
target.canmove = 0
|
||||
@@ -75,6 +75,11 @@
|
||||
var/reappearing = 0
|
||||
density = 0
|
||||
anchored = 1
|
||||
var/turf/last_valid_turf
|
||||
|
||||
/obj/effect/dummy/spell_jaunt/New(var/location)
|
||||
..()
|
||||
last_valid_turf = get_turf(location)
|
||||
|
||||
/obj/effect/dummy/spell_jaunt/Destroy()
|
||||
// Eject contents if deleted somehow
|
||||
@@ -87,6 +92,9 @@
|
||||
var/turf/newLoc = get_step(src,direction)
|
||||
if(!(newLoc.flags & NOJAUNT))
|
||||
loc = newLoc
|
||||
var/turf/T = get_turf(loc)
|
||||
if(!T.contains_dense_objects())
|
||||
last_valid_turf = T
|
||||
else
|
||||
user << "<span class='warning'>Some strange aura is blocking the way!</span>"
|
||||
src.canmove = 0
|
||||
|
||||
Reference in New Issue
Block a user