Adds the ability to use storage in storage (#17142)

* Adds the ability to use storage in storage

- Also adds a description to the evidence bag giving detail on how to use it.

* Update vorestation.dme

* destroys chompstation
This commit is contained in:
Cameron Lennox
2025-02-16 04:29:10 -05:00
committed by GitHub
parent f8c24bcbe0
commit 65db3fe9f3
4 changed files with 8 additions and 5 deletions
@@ -23,3 +23,6 @@
#define INVENTORY_STANDARD_SPACE ITEMSIZE_COST_NORMAL * 7 // 28
#define INVENTORY_DUFFLEBAG_SPACE ITEMSIZE_COST_NORMAL * 9 // 36
#define INVENTORY_BOX_SPACE ITEMSIZE_COST_SMALL * 7 // 14
//this all needs a refactor to tg storage but for now...
#define MAX_STORAGE_REACH 2 //maximum you can reach down to grab things from storage.
+2 -2
View File
@@ -105,7 +105,7 @@
//Atoms on your person
// A is your location but is not a turf; or is on you (backpack); or is on something on you (box in backpack); sdepth is needed here because contents depth does not equate inventory storage depth.
var/sdepth = A.storage_depth(src)
if(!currently_restrained && ((!isturf(A) && A == loc) || (sdepth != -1 && sdepth <= 1)))
if(!currently_restrained && ((!isturf(A) && A == loc) || (sdepth <= MAX_STORAGE_REACH)))
if(W)
var/resolved = W.resolve_attackby(A, src, click_parameters = params)
if(!resolved && A && W)
@@ -137,7 +137,7 @@
//Atoms on turfs (not on your person)
// A is a turf or is on a turf, or in something on a turf (pen in a box); but not something in something on a turf (pen in a box in a backpack)
sdepth = A.storage_depth_turf()
if(isturf(A) || isturf(A.loc) || (sdepth != -1 && sdepth <= 1))
if(isturf(A) || isturf(A.loc) || (sdepth <= MAX_STORAGE_REACH))
if(currently_restrained)
if(ismob(A) && A.Adjacent(src)) //We are RESTRAINED (handcuffed or otherwise) and ADJACENT
setClickCooldown(get_attack_speed())
@@ -2,7 +2,7 @@
/obj/item/evidencebag
name = "evidence bag"
desc = "An empty evidence bag."
desc = "An empty evidence bag. Use by clicking on the bag and dragging it to the item you want to bag."
icon = 'icons/obj/storage.dmi'
icon_state = "evidenceobj"
item_state = null
@@ -27,7 +27,7 @@
//If it isn't on the floor. Do some checks to see if it's in our hands or a box. Otherwise give up.
if(istype(I.loc,/obj/item/storage)) //in a container.
var/sdepth = I.storage_depth(user)
if (sdepth == -1 || sdepth > 1)
if (sdepth > MAX_STORAGE_REACH)
return //too deeply nested to access
var/obj/item/storage/U = I.loc