mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
[MIRROR] Adds the ability to use storage in storage (#10187)
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
committed by
GitHub
parent
12e267e221
commit
0400795c1e
@@ -24,7 +24,5 @@
|
||||
#define INVENTORY_DUFFLEBAG_SPACE ITEMSIZE_COST_NORMAL * 9 // 36
|
||||
#define INVENTORY_BOX_SPACE ITEMSIZE_COST_SMALL * 7 // 14
|
||||
|
||||
// CHOMPedit start.
|
||||
//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.
|
||||
// CHOMPedit end.
|
||||
|
||||
@@ -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 <= MAX_STORAGE_REACH))) // CHOMPedit: Boxes can be interacted with inside of larger inventories.
|
||||
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 <= MAX_STORAGE_REACH)) // CHOMPedit: Storage reach depth.
|
||||
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. Use by clicking on the bag and dragging it to the item you want to bag." //CHOMPstation edit-"Actually clarifies how to use the item in game"
|
||||
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 > MAX_STORAGE_REACH) // CHOMPedit: Storage reach depth.
|
||||
if (sdepth > MAX_STORAGE_REACH)
|
||||
return //too deeply nested to access
|
||||
|
||||
var/obj/item/storage/U = I.loc
|
||||
|
||||
Reference in New Issue
Block a user