diff --git a/code/game/objects/items/robot/cyborg_gripper.dm b/code/game/objects/items/robot/cyborg_gripper.dm index ac58fc2fe3c..ed07f4c4a92 100644 --- a/code/game/objects/items/robot/cyborg_gripper.dm +++ b/code/game/objects/items/robot/cyborg_gripper.dm @@ -15,6 +15,7 @@ icon = 'icons/obj/device.dmi' icon_state = "gripper" actions_types = list(/datum/action/item_action/drop_gripped_item) + flags = ABSTRACT /// Set to TRUE to removal of cells/lights from machine objects containing them. var/engineering_machine_interaction = FALSE /// Defines what items the gripper can carry. @@ -50,11 +51,12 @@ /obj/item/gripper/proc/drop_gripped_item(mob/user, silent = FALSE) if(!gripped_item) to_chat(user, "[src] is empty.") - return + return FALSE if(!silent) to_chat(user, "You drop [gripped_item].") gripped_item.forceMove(get_turf(src)) gripped_item = null + return TRUE /obj/item/gripper/attack_self(mob/user) if(!gripped_item) diff --git a/code/modules/mob/living/silicon/robot/robot_inventory.dm b/code/modules/mob/living/silicon/robot/robot_inventory.dm index 78bf0e04a6d..e3201740d5a 100644 --- a/code/modules/mob/living/silicon/robot/robot_inventory.dm +++ b/code/modules/mob/living/silicon/robot/robot_inventory.dm @@ -119,9 +119,8 @@ /mob/living/silicon/robot/drop_item() var/obj/item/gripper/G = get_active_hand() - if(istype(G)) - G.drop_gripped_item(silent = TRUE) - return TRUE // The gripper is special because it has a normal item inside that we can drop. + if(istype(G)) // The gripper is special because it has a normal item inside that we can drop. + return G.drop_gripped_item(silent = TRUE) // This only returns true if there's actually an item to drop so we don't drop the gripper accidentaly. return FALSE // All robot inventory items have NODROP, so they should return FALSE. //Helper procs for cyborg modules on the UI.