Skip to content

Commit

Permalink
adds alt-click action to open storage
Browse files Browse the repository at this point in the history
bump
  • Loading branch information
quardbreak committed Apr 26, 2022
1 parent 6e0b67a commit 3a3f544
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
17 changes: 16 additions & 1 deletion code/game/objects/items/weapons/storage/storage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
. = (loc == user && istype(over, /obj/screen)) || ..()

/obj/item/storage/handle_mouse_drop(var/atom/over, var/mob/user)
if(canremove && (ishuman(user) || isrobot(user)))
if(canremove && (ishuman(user) || isrobot(user) || isanimal(user)) && !user.incapacitated(INCAPACITATION_DISRUPTED))
if(over == user)
open(user)
return TRUE
Expand All @@ -50,6 +50,21 @@
return TRUE
. = ..()

/obj/item/storage/AltClick(mob/user)
if(!canremove)
return

if(!Adjacent(user))
return

if(!(ishuman(user) || isrobot(user) || issmall(user)))
return

if(user.incapacitated(INCAPACITATION_DISRUPTED))
return

open(user)

/obj/item/storage/proc/return_inv()

var/list/L = list( )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@
storage_start.overlays += stored_continue
storage_start.overlays += stored_end

O.reset_offsets()
O.screen_loc = "LEFT+3:[round((startpoint+endpoint)/2)+2-O.pixel_x],BOTTOM+1.7:[16-O.pixel_y]"
O.maptext = ""
O.hud_layerise()
Expand Down

0 comments on commit 3a3f544

Please sign in to comment.