[MIRROR] Makes borg grippers able to grab things from storage (#12724)

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2026-05-01 11:57:03 -04:00
committed by GitHub
co-authored by Cameron Lennox
parent 3a447c5acd
commit 2b6ba9f5a8
2 changed files with 10 additions and 6 deletions
+2 -2
View File
@@ -102,8 +102,8 @@
if(!isturf(loc))
return
// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc && isturf(A.loc.loc))
if(isturf(A) || isturf(A.loc))
var/sdepth = A.storage_depth_turf()
if(isturf(A) || isturf(A.loc) || (sdepth <= MAX_STORAGE_REACH))
if(A.Adjacent(src) || (W && W.attack_can_reach(src, A, W.reach))) // see adjacent.dm, allows robots to use ranged melee weapons
SEND_SIGNAL(src, COMSIG_ROBOT_ITEM_ATTACK, W, src, params) //This is we ATTEMPTED to attack someone.
var/resolved = W.resolve_attackby(A, src, click_parameters = params)
@@ -209,9 +209,6 @@
var/obj/item/I = target
if(!isturf(I.loc))
return FALSE
if(I.anchored)
to_chat(user, span_notice("You are unable to lift \the [I]."))
return FALSE
@@ -225,8 +222,15 @@
to_chat(user, span_danger("Your gripper cannot hold \the [I]."))
return FALSE
if(istype(target.loc, /obj/item/storage)) //Updates the HUD and all that.
var/obj/item/storage/S = I.loc
if(!S.remove_from_storage(I, selected_pocket))
to_chat(user, "Something prevents you from taking \the [I] out of \the [S].")
return
else
I.loc = selected_pocket
to_chat(user, "You collect \the [I].")
I.loc = selected_pocket
current_pocket = selected_pocket
update_ref(WEAKREF(I))
return TRUE