Skip to content

Commit

Permalink
Medical Cyborg Gripper Upgrade (#20113)
Browse files Browse the repository at this point in the history
* laws, module, etc

* cmag functionality

* playsound whoopies

* judges my flavortext creative skills

* stun time

* should revert all of this stuff

* final

* dont need these spaces

* fixes conflicts

* for real fixes conflicts

* i hate webedits
  • Loading branch information
Runian authored Sep 2, 2023
1 parent c722846 commit 69f699e
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 1 deletion.
10 changes: 10 additions & 0 deletions code/game/objects/items/robot/robot_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,7 @@
. = ..()
if(wrapped)
var/mutable_appearance/wrapped_appearance = mutable_appearance(wrapped.icon, wrapped.icon_state)
wrapped_appearance.overlays = wrapped.overlays.Copy()
// Shrinking it to 0.8 makes it a bit ugly, but this makes it obvious it is a held item.
wrapped_appearance.transform = matrix(0.8,0,0,0,0.8,0)
. += wrapped_appearance
Expand Down Expand Up @@ -896,6 +897,15 @@
/obj/item/stack/conveyor
)

/obj/item/borg/gripper/medical
name = "medical gripper"
desc = "A simple grasping tool for interacting with various medical related items."
can_hold = list(
/obj/item/reagent_containers/glass/bottle, // Bottles & Vials
/obj/item/reagent_containers/glass/beaker,
/obj/item/reagent_containers/blood // Blood Bags.
)

/obj/item/borg/gripper/service
name = "service gripper"
desc = "A simple grasping tool for interacting with various service related items and food."
Expand Down
30 changes: 30 additions & 0 deletions code/game/objects/items/robot/robot_upgrades.dm
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,36 @@
for(var/obj/item/reagent_containers/borghypo/H in R.module.emag_modules)
H.bypass_protection = initial(H.bypass_protection)

/// Gives medical cyborgs a gripper to use. Enables medical cyborgs to do all remaining aspects of medical (chemistry & blood giving) without the help of a human.
/obj/item/borg/upgrade/medigripper
name = "medical cyborg gripper"
desc = "An upgrade for medical cyborgs which grants them a gripper to hold and interact with medical related items."
icon_state = "cyborg_upgrade3"
require_module = TRUE
module_types = list(/obj/item/robot_module/medical)
module_flags = BORG_MODULE_MEDICAL

/obj/item/borg/upgrade/medigripper/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(!.)
return FALSE
var/obj/item/borg/gripper/medical/gripper = locate() in R.module.modules
if(gripper)
to_chat(user, span_warning("This cyborg is already equipped with a medical gripper!"))
return FALSE

gripper = new(R.module)
R.module.basic_modules += gripper
R.module.add_module(gripper, FALSE, TRUE)

/obj/item/borg/upgrade/medigripper/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if(!.)
return FALSE

for(var/obj/item/borg/gripper/medical/gripper in R.module.modules)
R.module.remove_module(gripper, TRUE)

/obj/item/borg/upgrade/defib
name = "medical cyborg defibrillator"
desc = "An upgrade to the Medical module, installing a built-in \
Expand Down
10 changes: 10 additions & 0 deletions code/modules/research/designs/mechfabricator_designs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,16 @@
construction_time = 80
category = list("Cyborg Upgrade Modules")

/datum/design/borg_upgrade_medigripper
name = "Cyborg Upgrade (Medical Gripper)"
id = "borg_upgrade_medigripper"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/medigripper
/// Arbitary price. Took the price of Plasma Cutter Upgrade, replaced plasma with gold, and replaced gold with silver.
materials = list(/datum/material/iron = 3000, /datum/material/glass = 1000, /datum/material/gold = 2000, /datum/material/silver = 500)
construction_time = 8 SECONDS
category = list("Cyborg Upgrade Modules")

/datum/design/borg_upgrade_defibrillator
name = "Cyborg Upgrade (Defibrillator)"
id = "borg_upgrade_defibrillator"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/research/techweb/all_nodes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@
display_name = "Cyborg Upgrades: Medical"
description = "Medical upgrades for cyborgs."
prereq_ids = list("adv_biotech")
design_ids = list("borg_upgrade_defibrillator", "borg_upgrade_piercinghypospray", "borg_upgrade_expandedsynthesiser")
design_ids = list("borg_upgrade_defibrillator", "borg_upgrade_piercinghypospray", "borg_upgrade_expandedsynthesiser", "borg_upgrade_medigripper")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2000)

/datum/techweb_node/cyborg_upg_surgkit
Expand Down

0 comments on commit 69f699e

Please sign in to comment.