From 769721300f6e939c68128fc8a3cb7c3a5b1bebca Mon Sep 17 00:00:00 2001
From: Tename <37943518+Tename@users.noreply.github.com>
Date: Tue, 29 Dec 2020 22:12:38 -0800
Subject: [PATCH 1/2] boggers
---
code/game/objects/items/robot/robot_items.dm | 118 ++++++++++++------
.../objects/items/robot/robot_upgrades.dm | 29 +----
.../mob/living/silicon/robot/robot_modules.dm | 1 +
.../designs/mechfabricator_designs.dm | 9 --
.../mob/living/silicon/robot/robot_modules.dm | 11 ++
5 files changed, 96 insertions(+), 72 deletions(-)
diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm
index 5d8ccc02..a2be7aea 100644
--- a/code/game/objects/items/robot/robot_items.dm
+++ b/code/game/objects/items/robot/robot_items.dm
@@ -900,46 +900,90 @@
RegisterSignal(stored, COMSIG_ATOM_UPDATE_ICON, /atom/.proc/update_iconb)
update_icon()
-////////////////////
-//engi part holder//
-////////////////////
+/**********************************************************************
+ Grippers oh god oh fuck
+***********************************************************************/
-/obj/item/borg/apparatus/circuit
- name = "circuit manipulation apparatus"
- desc = "A special apparatus for carrying and manipulating circuit boards. Alt-Z or right-click to drop the stored object."
- icon_state = "borg_hardware_apparatus"
- storable = list(/obj/item/circuitboard,
- /obj/item/electronics)
+/obj/item/weapon/gripper
+ name = "engineering gripper"
+ desc = "A simple grasping tool for interacting with various engineering related items, such as circuits, gas tanks, conveyer belts and more. Alt click to drop instead of use."
+ icon = 'icons/obj/device.dmi'
+ icon_state = "gripper"
-/obj/item/borg/apparatus/circuit/Initialize()
- . = ..()
- update_icon()
+ item_flags = NOBLUDGEON
-/obj/item/borg/apparatus/circuit/update_icon()
- cut_overlays()
- if(stored)
- COMPILE_OVERLAYS(stored)
- stored.pixel_x = -3
- stored.pixel_y = 0
- var/image/arm
- if(istype(stored, /obj/item/circuitboard))
- arm = image("icon"="borg_hardware_apparatus_arm1", "layer"=FLOAT_LAYER)
+ //Has a list of items that it can hold.
+ var/list/can_hold = list(
+ /obj/item/circuitboard,
+ /obj/item/light,
+ /obj/item/electronics,
+ /obj/item/tank,
+ /obj/item/wallframe,
+ /obj/item/vending_refill,
+ /obj/item/stack/sheet,
+ /obj/item/stack/tile,
+ /obj/item/stack/rods,
+ /obj/item/stock_parts
+ )
+ //Basically a blacklist for any subtypes above we dont want
+ var/list/cannot_hold = list(
+ /obj/item/stack/sheet/mineral/plasma,
+ /obj/item/stack/sheet/plasteel
+ )
+
+ var/obj/item/wrapped = null // Item currently being held.
+
+//Used to interact with UI's of held items, such as gas tanks and airlock electronics.
+/obj/item/weapon/gripper/AltClick(mob/user)
+ if(wrapped)
+ wrapped.forceMove(get_turf(wrapped))
+ to_chat(user, "You drop the [wrapped].")
+ wrapped = null
+ return ..()
+
+/obj/item/weapon/gripper/pre_attack(var/atom/target, var/mob/living/silicon/robot/user, proximity, params)
+
+ if(!proximity)
+ return
+
+ if(!wrapped)
+ for(var/obj/item/thing in src.contents)
+ wrapped = thing
+ break
+
+ if(wrapped) //Already have an item.
+ //Temporary put wrapped into user so target's attackby() checks pass.
+ wrapped.loc = user
+
+ //Pass the attack on to the target. This might delete/relocate wrapped.
+ var/resolved = target.attackby(wrapped,user)
+ if(!resolved && wrapped && target)
+ wrapped.afterattack(target,user,1)
+ //If wrapped was neither deleted nor put into target, put it back into the gripper.
+ if(wrapped && user && (wrapped.loc == user))
+ wrapped.loc = src
else
- arm = image("icon"="borg_hardware_apparatus_arm2", "layer"=FLOAT_LAYER)
- var/image/img = image("icon"=stored, "layer"=FLOAT_LAYER)
- img.plane = FLOAT_PLANE
- add_overlay(arm)
- add_overlay(img)
- else
- var/image/arm = image("icon"="borg_hardware_apparatus_arm1", "layer"=FLOAT_LAYER)
- add_overlay(arm)
+ wrapped = null
+ return
-/obj/item/borg/apparatus/circuit/examine()
- . = ..()
- if(stored)
- . += "The apparatus currently has [stored] secured."
+ else if(istype(target,/obj/item))
+ var/obj/item/I = target
+ var/grab = 0
-/obj/item/borg/apparatus/circuit/pre_attack(atom/A, mob/living/user, params)
- . = ..()
- if(istype(A, /obj/item/aiModule) && !stored) //If an admin wants a borg to upload laws, who am I to stop them? Otherwise, we can hint that it fails
- to_chat(user, "This circuit board doesn't seem to have standard robot apparatus pin holes. You're unable to pick it up.")
+ for(var/typepath in can_hold)
+ if(istype(I,typepath))
+ grab = 1
+ for(var/badpath in cannot_hold)
+ if(istype(I,badpath))
+ if(!user.emagged)
+ grab = 0
+ continue
+
+ //We can grab the item, finally.
+ if(grab)
+ to_chat(user, "You collect \the [I].")
+ I.loc = src
+ wrapped = I
+ return
+ else
+ to_chat(user, "Your gripper cannot hold \the [target].")
diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm
index 5e7081c1..a2f0d6f4 100644
--- a/code/game/objects/items/robot/robot_upgrades.dm
+++ b/code/game/objects/items/robot/robot_upgrades.dm
@@ -489,7 +489,9 @@
out procedures"
icon_state = "cyborg_upgrade3"
require_module = 1
- module_type = /obj/item/robot_module/medical
+ module_type = list(
+ /obj/item/robot_module/medical,
+ /obj/item/robot_module/medihound)
/obj/item/borg/upgrade/processor/action(mob/living/silicon/robot/R, user = usr)
. = ..()
@@ -620,31 +622,6 @@
if (RPED)
R.module.remove_module(RPED, TRUE)
-/obj/item/borg/upgrade/circuit_app
- name = "circuit manipulation apparatus"
- desc = "An engineering cyborg upgrade allowing for manipulation of circuit boards."
- icon_state = "cyborg_upgrade3"
- require_module = TRUE
- module_type = list(/obj/item/robot_module/engineering)
-
-/obj/item/borg/upgrade/circuit_app/action(mob/living/silicon/robot/R, user = usr)
- . = ..()
- if(.)
- var/obj/item/borg/apparatus/circuit/C = locate() in R.module.modules
- if(C)
- to_chat(user, "This unit is already equipped with a circuit apparatus!")
- return FALSE
-
- C = new(R.module)
- R.module.basic_modules += C
- R.module.add_module(C, FALSE, TRUE)
-
-/obj/item/borg/upgrade/circuit_app/deactivate(mob/living/silicon/robot/R, user = usr)
- . = ..()
- if (.)
- var/obj/item/borg/apparatus/circuit/C = locate() in R.module.modules
- if (C)
- R.module.remove_module(C, TRUE)
/obj/item/borg/upgrade/pinpointer
name = "medical cyborg crew pinpointer"
diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm
index 9c98417a..f3ee17a4 100644
--- a/code/modules/mob/living/silicon/robot/robot_modules.dm
+++ b/code/modules/mob/living/silicon/robot/robot_modules.dm
@@ -329,6 +329,7 @@
/obj/item/stack/sheet/rglass/cyborg,
/obj/item/stack/rods/cyborg,
/obj/item/stack/tile/plasteel/cyborg,
+ /obj/item/weapon/gripper,
/obj/item/stack/cable_coil/cyborg)
emag_modules = list(/obj/item/borg/stun)
ratvar_modules = list(
diff --git a/code/modules/research/designs/mechfabricator_designs.dm b/code/modules/research/designs/mechfabricator_designs.dm
index 4659d322..902dc62d 100644
--- a/code/modules/research/designs/mechfabricator_designs.dm
+++ b/code/modules/research/designs/mechfabricator_designs.dm
@@ -768,15 +768,6 @@
construction_time = 120
category = list("Cyborg Upgrade Modules")
-/datum/design/borg_upgrade_circuit_app
- name = "Cyborg Upgrade (Circuit Manipulator)"
- id = "borg_upgrade_circuitapp"
- build_type = MECHFAB
- build_path = /obj/item/borg/upgrade/circuit_app
- materials = list(MAT_METAL=2000, MAT_TITANIUM=500)
- construction_time = 120
- category = list("Cyborg Upgrade Modules")
-
/datum/design/borg_upgrade_pinpointer
name = "Cyborg Upgrade (Crew pinpointer)"
id = "borg_upgrade_pinpointer"
diff --git a/modular_citadel/code/modules/mob/living/silicon/robot/robot_modules.dm b/modular_citadel/code/modules/mob/living/silicon/robot/robot_modules.dm
index a466c152..a2ce17a3 100644
--- a/modular_citadel/code/modules/mob/living/silicon/robot/robot_modules.dm
+++ b/modular_citadel/code/modules/mob/living/silicon/robot/robot_modules.dm
@@ -43,6 +43,7 @@
/obj/item/robot_module/k9
name = "Security K-9 Unit"
basic_modules = list(
+ /obj/item/assembly/flash/cyborg,
/obj/item/restraints/handcuffs/cable/zipties,
/obj/item/storage/bag/borgdelivery,
/obj/item/dogborg/jaws/big,
@@ -106,6 +107,7 @@
/obj/item/robot_module/medihound
name = "MediHound"
basic_modules = list(
+ /obj/item/assembly/flash/cyborg,
/obj/item/dogborg/jaws/small,
/obj/item/storage/bag/borgdelivery,
/obj/item/analyzer/nose,
@@ -116,6 +118,13 @@
/obj/item/roller/robo,
/obj/item/crowbar/cyborg,
/obj/item/borg/apparatus/beaker,
+ /obj/item/surgical_drapes,
+ /obj/item/retractor,
+ /obj/item/hemostat,
+ /obj/item/cautery,
+ /obj/item/surgicaldrill,
+ /obj/item/scalpel,
+ /obj/item/circular_saw,
/obj/item/reagent_containers/borghypo,
/obj/item/twohanded/shockpaddles/cyborg/hound,
/obj/item/stack/medical/gauze/cyborg,
@@ -172,6 +181,7 @@
/obj/item/robot_module/scrubpup
name = "Scrub Pup"
basic_modules = list(
+ /obj/item/assembly/flash/cyborg,
/obj/item/dogborg/jaws/small,
/obj/item/analyzer/nose,
/obj/item/crowbar/cyborg,
@@ -225,6 +235,7 @@
/obj/item/robot_module/borgi
name = "Borgi"
basic_modules = list(
+ /obj/item/assembly/flash/cyborg,
/obj/item/dogborg/jaws/small,
/obj/item/storage/bag/borgdelivery,
/obj/item/analyzer/nose,
From a30508ed3febbfd4e13a5f324dbf04e4d6aa1d3a Mon Sep 17 00:00:00 2001
From: Tename <37943518+Tename@users.noreply.github.com>
Date: Tue, 29 Dec 2020 22:29:20 -0800
Subject: [PATCH 2/2] burgers
---
code/game/objects/items/robot/robot_upgrades.dm | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm
index a2f0d6f4..7b35f5a4 100644
--- a/code/game/objects/items/robot/robot_upgrades.dm
+++ b/code/game/objects/items/robot/robot_upgrades.dm
@@ -489,9 +489,7 @@
out procedures"
icon_state = "cyborg_upgrade3"
require_module = 1
- module_type = list(
- /obj/item/robot_module/medical,
- /obj/item/robot_module/medihound)
+ module_type = /obj/item/robot_module/medical
/obj/item/borg/upgrade/processor/action(mob/living/silicon/robot/R, user = usr)
. = ..()