mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Fixes mech equipment being unremovable (#39161)
And probably other issues with objects in objects moving out
This commit is contained in:
committed by
yogstation13-bot
parent
c7431ee0e1
commit
aaf66aac78
@@ -152,18 +152,10 @@
|
||||
direct = get_dir(src, newloc)
|
||||
setDir(direct)
|
||||
|
||||
if(!loc.Exit(src))
|
||||
if(!loc.Exit(src, newloc))
|
||||
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(!newloc.Enter(src, src.loc))
|
||||
return
|
||||
|
||||
// Past this is the point of no return
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user