From 132f1498575a80a4399cb2161df12051674b3bc3 Mon Sep 17 00:00:00 2001 From: Crazylemon Date: Mon, 21 Dec 2015 22:14:56 -0800 Subject: [PATCH] First test of a fix for the infinite tables bug --- code/modules/mob/living/silicon/robot/drone/drone_items.dm | 5 +++-- code/modules/mob/living/silicon/robot/inventory.dm | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm index 7b1810617b4..8e96af4ae1f 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -48,7 +48,7 @@ if(wrapped) wrapped.attack_self(user) -/obj/item/weapon/gripper/verb/drop_item() +/obj/item/weapon/gripper/verb/drop_item(var/silent = 0) set name = "Drop Item" set desc = "Release an item from your magnetic gripper." @@ -64,7 +64,8 @@ wrapped = null return - src.loc << "\red You drop \the [wrapped]." + if(!silent) + src.loc << "\red You drop \the [wrapped]." wrapped.loc = get_turf(src) wrapped = null //update_icon() diff --git a/code/modules/mob/living/silicon/robot/inventory.dm b/code/modules/mob/living/silicon/robot/inventory.dm index b5587a50e5d..c65d4ef028b 100644 --- a/code/modules/mob/living/silicon/robot/inventory.dm +++ b/code/modules/mob/living/silicon/robot/inventory.dm @@ -109,6 +109,13 @@ else return 0 +/mob/living/silicon/robot/drop_item() + var/obj/item/I = get_active_hand() + if(istype(I, /obj/item/weapon/gripper)) + var/obj/item/weapon/gripper/G = I + G.drop_item(silent = 1) + return + //Helper procs for cyborg modules on the UI. //These are hackish but they help clean up code elsewhere.