mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
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:
@@ -282,6 +282,7 @@
|
||||
continue
|
||||
NG.attackby(G, user)
|
||||
to_chat(user, "You add the newly-formed grass to the stack. It now contains [G.amount] tiles.")
|
||||
user.drop_from_inventory(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -136,40 +136,49 @@
|
||||
|
||||
/obj/item/weapon/paper_bundle/Topic(href, href_list)
|
||||
..()
|
||||
var/obj/item/weapon/in_hand = null
|
||||
if((src in usr.contents) || (istype(src.loc, /obj/item/weapon/folder) && (src.loc in usr.contents)))
|
||||
usr.set_machine(src)
|
||||
var/obj/item/weapon/in_hand = usr.get_active_hand()
|
||||
if(href_list["next_page"])
|
||||
if(in_hand && (istype(in_hand, /obj/item/weapon/paper) || istype(in_hand, /obj/item/weapon/photo)))
|
||||
insert_sheet_at(usr, page+1, in_hand)
|
||||
else if(page != pages.len)
|
||||
page++
|
||||
playsound(src.loc, "pageturn", 50, 1)
|
||||
if(href_list["prev_page"])
|
||||
if(in_hand && (istype(in_hand, /obj/item/weapon/paper) || istype(in_hand, /obj/item/weapon/photo)))
|
||||
insert_sheet_at(usr, page, in_hand)
|
||||
else if(page > 1)
|
||||
page--
|
||||
playsound(src.loc, "pageturn", 50, 1)
|
||||
if(href_list["remove"])
|
||||
var/obj/item/weapon/W = pages[page]
|
||||
usr.put_in_hands(W)
|
||||
pages.Remove(pages[page])
|
||||
|
||||
to_chat(usr, "<span class='notice'>You remove the [W.name] from the bundle.</span>")
|
||||
|
||||
if(pages.len <= 1)
|
||||
var/obj/item/weapon/paper/P = src[1]
|
||||
usr.put_in_hands(P)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(page > pages.len)
|
||||
page = pages.len
|
||||
|
||||
update_icon()
|
||||
in_hand = usr.get_active_hand()
|
||||
else if(isrobot(usr) && istype(usr.get_active_hand(), /obj/item/weapon/gripper/paperwork))
|
||||
var/obj/item/weapon/gripper/paperwork/PW = usr.get_active_hand()
|
||||
if(!(src in PW.contents) && !(istype(src.loc, /obj/item/weapon/folder) || !(src.loc in PW.contents)))
|
||||
return // paper bundle isn't in the gripper
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You need to hold it in hands!</span>")
|
||||
return
|
||||
|
||||
usr.set_machine(src)
|
||||
|
||||
if(href_list["next_page"])
|
||||
if(in_hand && (istype(in_hand, /obj/item/weapon/paper) || istype(in_hand, /obj/item/weapon/photo)))
|
||||
insert_sheet_at(usr, page+1, in_hand)
|
||||
else if(page != pages.len)
|
||||
page++
|
||||
playsound(src.loc, "pageturn", 50, 1)
|
||||
if(href_list["prev_page"])
|
||||
if(in_hand && (istype(in_hand, /obj/item/weapon/paper) || istype(in_hand, /obj/item/weapon/photo)))
|
||||
insert_sheet_at(usr, page, in_hand)
|
||||
else if(page > 1)
|
||||
page--
|
||||
playsound(src.loc, "pageturn", 50, 1)
|
||||
if(href_list["remove"])
|
||||
var/obj/item/weapon/W = pages[page]
|
||||
usr.put_in_hands(W)
|
||||
pages.Remove(pages[page])
|
||||
|
||||
to_chat(usr, "<span class='notice'>You remove the [W.name] from the bundle.</span>")
|
||||
|
||||
if(pages.len <= 1)
|
||||
var/obj/item/weapon/paper/P = src[1]
|
||||
usr.put_in_hands(P)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(page > pages.len)
|
||||
page = pages.len
|
||||
|
||||
update_icon()
|
||||
|
||||
if (istype(src.loc, /mob) ||istype(src.loc.loc, /mob))
|
||||
src.attack_self(usr)
|
||||
updateUsrDialog()
|
||||
|
||||
@@ -1973,6 +1973,9 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/monkeycube/proc/Expand()
|
||||
src.visible_message("<span class='notice'>\The [src] expands!</span>")
|
||||
if(istype(loc, /obj/item/weapon/gripper)) // fixes ghost cube when using syringe
|
||||
var/obj/item/weapon/gripper/G = loc
|
||||
G.drop_item()
|
||||
var/mob/living/carbon/human/H = new(src.loc)
|
||||
H.set_species(monkey_type)
|
||||
H.real_name = H.species.get_random_name()
|
||||
|
||||
Reference in New Issue
Block a user