diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index e66e49e95e..89cf62f4ef 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -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) diff --git a/code/modules/mob/living/silicon/robot/robot_gripper_handling.dm b/code/modules/mob/living/silicon/robot/robot_gripper_handling.dm index c0d7b6746f..1484e8b8e3 100644 --- a/code/modules/mob/living/silicon/robot/robot_gripper_handling.dm +++ b/code/modules/mob/living/silicon/robot/robot_gripper_handling.dm @@ -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