Skip to content

Commit

Permalink
Add alt-click open container
Browse files Browse the repository at this point in the history
  • Loading branch information
WeNeedMorePhoron committed May 25, 2023
1 parent f11f5eb commit 32e440a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions code/game/objects/items/weapons/storage/storage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
w_class = ITEM_SIZE_NORMAL
item_flags = DRAG_AND_DROP_UNEQUIP|EQUIP_SOUNDS
spawn_tags = SPAWN_TAG_STORAGE
description_info = "Drag and drop onto yourself, alt-click or left-click to open the container. You cannot take items out of a container inside another container" // Occulus Edit Desc
bad_type = /obj/item/storage
var/list/can_hold = new/list() //List of objects which this item can store (if set, it can't store anything else)
var/list/can_hold_extra = list() //List of objects which this item can additionally store not defined by the parent.
Expand Down Expand Up @@ -206,6 +207,11 @@
close_all()
. = ..()

// Occulus Edit: AltClick QOL
/obj/item/storage/AltClick(mob/user)
if(ishuman(usr) && !usr.incapacitated() && Adjacent(usr))
src.open(user)

/obj/item/storage/MouseDrop(obj/over_object)
if(ishuman(usr) && usr == over_object && !usr.incapacitated() && Adjacent(usr))
return src.open(usr)
Expand Down

0 comments on commit 32e440a

Please sign in to comment.