From 51c64edfc5af02f3548114c2876e9a7379d4dbc4 Mon Sep 17 00:00:00 2001 From: Adrer Date: Mon, 23 Sep 2024 01:01:23 +0200 Subject: [PATCH] You can no longer put the cyborg gripper in a display case (#26848) Co-authored-by: adrermail@gmail.com --- code/game/objects/items/robot/cyborg_gripper.dm | 4 +++- code/modules/mob/living/silicon/robot/robot_inventory.dm | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) 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.