mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 02:24:11 +01:00
Fixes safe being unable to pick up spawner/random/ (#26891)
* Safe fixing * Update code/game/objects/structures/safe.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: kyunkyunkyun <120701975+kyunkyunkyun@users.noreply.github.com> --------- Signed-off-by: kyunkyunkyun <120701975+kyunkyunkyun@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user