Fixes mech equipment being unremovable (#39161)

And probably other issues with objects in objects moving out
This commit is contained in:
Emmett Gaines
2018-07-17 03:35:05 -04:00
committed by yogstation13-bot
parent c7431ee0e1
commit aaf66aac78
2 changed files with 18 additions and 13 deletions

View File

@@ -151,19 +151,11 @@
if(!direct)
direct = get_dir(src, newloc)
setDir(direct)
if(!loc.Exit(src))
return
for(var/i in loc)
if(i == src)
continue
var/atom/movable/thing = i
if(!thing.Uncross(src, newloc))
if(thing.flags_1 & ON_BORDER_1)
Bump(thing)
return
if(!newloc.Enter(src))
if(!loc.Exit(src, newloc))
return
if(!newloc.Enter(src, src.loc))
return
// Past this is the point of no return

View File

@@ -149,7 +149,7 @@
firstbump = src
else
for(var/i in contents)
if(i == mover) // Multi tile objects
if(i == mover || i == mover.loc) // Multi tile objects and moving out of other objects
continue
var/atom/movable/thing = i
if(thing.Cross(mover))
@@ -161,6 +161,19 @@
return FALSE
return TRUE
/turf/Exit(atom/movable/mover, atom/newloc)
. = ..()
if(!.)
return FALSE
for(var/i in contents)
if(i == mover)
continue
var/atom/movable/thing = i
if(!thing.Uncross(mover, newloc))
if(thing.flags_1 & ON_BORDER_1)
mover.Bump(thing)
return FALSE
/turf/Entered(atom/movable/AM)
..()
if(explosion_level && AM.ex_check(explosion_id))