diff --git a/code/modules/mob/living/silicon/robot/robot_simple_items.dm b/code/modules/mob/living/silicon/robot/robot_simple_items.dm index e9282ed2497..6888de5db1b 100644 --- a/code/modules/mob/living/silicon/robot/robot_simple_items.dm +++ b/code/modules/mob/living/silicon/robot/robot_simple_items.dm @@ -543,10 +543,13 @@ //This is used to check if the gripper is currently being used. //If it is, we don't allow any other actions to be performed. /obj/item/gripper/proc/is_in_use() - if(wrapped) + if(wrapped && !QDELETED(wrapped)) if(istype(wrapped.loc, /obj/item/storage/internal/gripper)) return FALSE //We are in a gripper storage or another gripper, so we are not in use. return TRUE + else if(QDELETED(wrapped)) //Failsafe. + wrapped = null + return FALSE //Default to 'we are not in use' //This is the code that updates our pockets and decides if they should have icons or not. //This should be called every time we use the gripper and our wrapped item is used up. diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index 9fa17721169..c56b2885a10 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -112,6 +112,13 @@ if(busy) to_chat(user, span_notice("\The [src] is busy. Please wait for completion of previous operation.")) return 1 + if(isrobot(user)) //snowflake gripper BS because it can't be done in get_active_hand without breaking everything + var/mob/living/silicon/robot/robot = user + if(istype(robot.module_active, /obj/item/gripper)) + var/obj/item/gripper/gripper = robot.module_active + O = gripper.get_current_pocket() + gripper.wrapped = null + gripper.current_pocket = pick(gripper.pockets) if(default_deconstruction_screwdriver(user, O)) if(linked_console) linked_console.linked_lathe = null @@ -123,8 +130,6 @@ return if(O.is_open_container()) return 1 - if(istype(O, /obj/item/gripper/no_use/loader)) - return 0 //Sheet loaders weren't finishing attack(), this prevents the message "You can't stuff that gripper into this" without preventing the rest of the attack sequence from finishing if(panel_open) to_chat(user, span_notice("You can't load \the [src] while it's opened.")) return 1