From 571d64ad08b16d75a0cc8f111249962c7872f21f Mon Sep 17 00:00:00 2001 From: lbnesquik Date: Sun, 9 Aug 2020 14:15:01 +0200 Subject: [PATCH] Manipulators now also drop items with alt click. Also break the drop item verb into a proc and seperate verb. --- .../mob/living/silicon/robot/drone/drone_items.dm | 11 +++++++++-- 1 file changed, 9 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 b689753365..474fa202c3 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -38,6 +38,10 @@ drop_item() return +/obj/item/weapon/gripper/AltClick(mob/user) + drop_item() + return + /obj/item/weapon/gripper/omni name = "omni gripper" desc = "A strange grasping tool that can hold anything a human can, but still maintains the limitations of application its more limited cousins have." @@ -251,12 +255,15 @@ return resolved return ..() -/obj/item/weapon/gripper/verb/drop_item() +/obj/item/weapon/gripper/verb/drop_gripper_item() set name = "Drop Item" set desc = "Release an item from your magnetic gripper." set category = "Robot Commands" + drop_item() + +obj/item/weapon/gripper/proc/drop_item() if(!wrapped) //There's some weirdness with items being lost inside the arm. Trying to fix all cases. ~Z for(var/obj/item/thing in src.contents) @@ -267,7 +274,7 @@ wrapped = null return - to_chat(src.loc, "You drop \the [wrapped].") + to_chat(src.loc, "You drop \the [wrapped].") wrapped.loc = get_turf(src) wrapped = null //update_icon()