Protolathe and qdeleted failsafe (#17984)

This commit is contained in:
Cameron Lennox
2025-07-09 22:47:26 -07:00
committed by GitHub
parent 58a50c544f
commit eeb07a837d
2 changed files with 11 additions and 3 deletions
@@ -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.