Skip to content

Commit

Permalink
Fixes safe being unable to pick up spawner/random/ (#26891)
Browse files Browse the repository at this point in the history
* Safe fixing

* Update code/game/objects/structures/safe.dm

Co-authored-by: Luc <[email protected]>
Signed-off-by: kyunkyunkyun <[email protected]>

---------

Signed-off-by: kyunkyunkyun <[email protected]>
Co-authored-by: Luc <[email protected]>
  • Loading branch information
kyunkyunkyun and lewcc authored Sep 29, 2024
1 parent c6f9a5e commit 882b1e4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion code/game/objects/structures/safe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,16 @@ GLOBAL_LIST_EMPTY(safes)
// Combination generation
for(var/i in 1 to number_of_tumblers)
tumblers.Add(rand(0, 99))
if(mapload)
addtimer(CALLBACK(src, PROC_REF(take_contents)), 0)

/obj/structure/safe/proc/take_contents()
// Put as many items on our turf inside as possible
for(var/obj/item/I in loc)
if(I.density || I.anchored)
continue
if(space >= maxspace)
return
break
if(I.w_class + space <= maxspace)
space += I.w_class
I.forceMove(src)
Expand Down

0 comments on commit 882b1e4

Please sign in to comment.