Cyborg grabber QOL and fixes (#7201)

Tweaks:

    With the gripper, hitting the drop hotkey (Q) now drops the held item. If no item is held, the grabber is put away as normal.
    The scientific gripper can now hold slime steroids.
    The chemistry gripper can now hold paper.

Bugfixes:

    Using the drop hotkey (Q) to put away a module now correctly updates the module list interface. Fixes #4343.
    Modules relying on cyborg synthesizers (nanopaste, et al.) now cannot be used when their synthesizer charge is depleted. Fixes #1288.
    Injecting a monkey cube held in a gripper no longer places the monkey inside the gripper's internal contents. Fixes #1097.
    Cyborgs can now re-lock secured crates. Fixes #4833.
    Service borgs can no longer open a portal to infinite grass tiles. Fixes #3814.
    Clerical borgs can now browse through paper bundles held in their gripper, and can pick up taped paper. Fixes #4479. Fixes #6501.
This commit is contained in:
JohnWildkins
2019-11-02 19:41:07 +02:00
committed by Erki
parent 1dc01ea943
commit 61ec0991e3
11 changed files with 129 additions and 42 deletions
@@ -207,7 +207,8 @@
/obj/item/weapon/card/id,
/obj/item/weapon/book,
/obj/item/weapon/newspaper,
/obj/item/weapon/stamp
/obj/item/weapon/stamp,
/obj/item/weapon/ducttape
)
/obj/item/weapon/gripper/research //A general usage gripper, used for toxins/robotics/xenobio/etc
@@ -233,7 +234,9 @@
/obj/item/weapon/disk,
/obj/item/device/analyzer/plant_analyzer,//For farmbot construction
/obj/item/weapon/material/minihoe,//Farmbots and xenoflora
/obj/item/weapon/computer_hardware
/obj/item/weapon/computer_hardware,
/obj/item/weapon/slimesteroid,
/obj/item/weapon/slimesteroid2
)
/obj/item/weapon/gripper/chemistry //A gripper designed for chemistry, to allow borgs to work efficiently in the lab
@@ -249,6 +252,7 @@
/obj/item/weapon/reagent_containers/spray,
/obj/item/weapon/storage/pill_bottle,
/obj/item/weapon/hand_labeler,
/obj/item/weapon/paper,
/obj/item/stack/material/phoron
)
@@ -3,6 +3,7 @@
//Returns the thing in our active hand (whatever is in our active module-slot, in this case)
/mob/living/silicon/robot/get_active_hand()
// TODO: see if refactoring this to return the gripped object (should one exist) works - would make a lot of edge cases a lot simpler
return module_active
/*-------TODOOOOOOOOOO--------*/
@@ -11,7 +12,7 @@
/mob/living/silicon/robot/verb/cmd_unequip_module()
set name = "unequip-module"
set hidden = 1
uneq_active()
drop_item()
/mob/living/silicon/robot/verb/cmd_toggle_module(module as num)
set name = "toggle-module"
@@ -52,7 +53,9 @@
module_state_3:loc = module
module_state_3 = null
inv3.icon_state = "inv3"
updateicon()
hud_used.update_robot_modules_display()
/mob/living/silicon/robot/proc/uneq_all()
module_active = null
@@ -268,12 +271,14 @@
return 0
//If our active module is a gripper, drop the thing in it.
//Otherwise do nothing. We don't drop our modules
/mob/living/silicon/robot/drop_item(var/atom/target)
/mob/living/silicon/robot/drop_item()
if (istype(module_active, /obj/item/weapon/gripper))
var/obj/item/weapon/gripper/G = module_active
G.drop(target)
if (G.wrapped)
G.drop_item()
return
uneq_active()