Skip to content

Commit

Permalink
Merge pull request tgstation#30025 from tgstation/Cyberboss-patch-2
Browse files Browse the repository at this point in the history
Fixes closets
  • Loading branch information
lzimann authored Aug 19, 2017
2 parents d148c3a + 34b0924 commit 79ce9a6
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions code/game/objects/structures/crates_lockers/closets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -110,25 +110,17 @@
return 1

/obj/structure/closet/proc/dump_contents()
var/atom/L = loc
if(!L)
for(var/I in src)
qdel(I)
return
var/turf/T = L.drop_location()
var/atom/L = drop_location()
for(var/atom/movable/AM in src)
AM.forceMove(T)
AM.forceMove(L)
if(throwing) // you keep some momentum when getting out of a thrown closet
step(AM, dir)
if(throwing)
throwing.finalize(FALSE)

/obj/structure/closet/proc/take_contents()
var/atom/L = loc
if(!L)
return
var/turf/T = L.drop_location()
for(var/atom/movable/AM in T)
var/atom/L = drop_location()
for(var/atom/movable/AM in L)
if(AM != src && insert(AM) == -1) // limit reached
break

Expand Down

0 comments on commit 79ce9a6

Please sign in to comment.