Revert "Ports Old Citcode Storage Reach" (#7184)

This commit is contained in:
Selis
2023-11-07 15:40:39 +01:00
committed by GitHub
parent c8ef96ff6f
commit e6932e98ba
4 changed files with 5 additions and 10 deletions

View File

@@ -100,7 +100,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((!isturf(A) && A == loc) || (sdepth <= MAX_STORAGE_REACH)) // CHOMPedit: Boxes can be interacted with inside of larger inventories.
if((!isturf(A) && A == loc) || (sdepth != -1 && sdepth <= 1))
if(W)
var/resolved = W.resolve_attackby(A, src, click_parameters = params)
if(!resolved && A && W)
@@ -132,7 +132,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 != -1 && sdepth <= 1))
if(A.Adjacent(src) || (W && W.attack_can_reach(src, A, W.reach)) ) // see adjacent.dm
if(W)
// Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example)
@@ -378,4 +378,4 @@
usr.face_atom(T)
return 1
T.Click(location, control, params)
return 1
return 1