Skip to content

Commit

Permalink
thanks tmt i fixeded the bug
Browse files Browse the repository at this point in the history
  • Loading branch information
GenericDM committed Sep 25, 2023
1 parent 16d4f73 commit c624a42
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions code/game/objects/structures/crateshelf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,22 @@
/obj/structure/crate_shelf/Initialize()
. = ..()
shelf_contents = new/list(capacity)
var/stack_layer = BELOW_OBJ_LAYER
var/stack_layer
var/stack_offset
for(var/i=1,i<capacity,i++)
stack_layer += (0.02 * i) - 0.01
for(var/i in 1 to (capacity - 1))
stack_layer = BELOW_OBJ_LAYER + (0.02 * i) - 0.01
stack_offset = i * 10
overlays += image(icon = 'icons/obj/objects.dmi', icon_state = "shelf_stack", layer = stack_layer, pixel_y = stack_offset)
return

/obj/structure/crate_shelf/MouseDrop_T(obj/structure/closet/crate/crate, mob/user)
if(!src.Adjacent(user, mover = crate))
if(!src.Adjacent(crate))
return
if(!isliving(user))
return
if(!crate.close())
return
if(crate.opened)
if(!crate.close())
return
var/next_free = shelf_contents.Find(null)
if(next_free)
if(do_after(user, useDelay, target = crate))
Expand Down

0 comments on commit c624a42

Please sign in to comment.