mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Add the medical cyborg surgical processor upgrade (#39646)
Adds the Surgical Processor upgrade for medical cyborgs, available from exosuit fabricators after 'Cyborg Utilities: Medical' is researched. This upgrade allows medical cyborgs to scan surgery disks, or copy procedures from an operating computer. The cyborg can then initiate scanned procedures. Cyborgs can also now perform surgery steps that have no instrument requirement. Medical cyborgs were generally unable to perform any advanced surgeries outside of some specific circumstances. This update allows cyborgs to make use of the advanced surgeries. Some advanced surgeries have steps that require a hand without any tools; this update allows cyborgs to perform these steps as well. Note that surgeries must be obtained through research or a disk somehow before the cyborgs can scan them.
This commit is contained in:
committed by
yogstation13-bot
parent
57c49d17a7
commit
3f6574c2b2
@@ -479,6 +479,28 @@
|
||||
var/obj/item/twohanded/shockpaddles/cyborg/S = locate() in R.module
|
||||
R.module.remove_module(S, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/processor
|
||||
name = "medical cyborg surgical processor"
|
||||
desc = "An upgrade to the Medical module, installing a processor \
|
||||
capable of scanning surgery disks and carrying \
|
||||
out procedures"
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
module_type = /obj/item/robot_module/medical
|
||||
|
||||
/obj/item/borg/upgrade/processor/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/obj/item/surgical_processor/SP = new(R.module)
|
||||
R.module.basic_modules += SP
|
||||
R.module.add_module(SP, FALSE, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/processor/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if (.)
|
||||
var/obj/item/surgical_processor/SP = locate() in R.module
|
||||
R.module.remove_module(SP, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/ai
|
||||
name = "B.O.R.I.S. module"
|
||||
desc = "Bluespace Optimized Remote Intelligence Synchronization. An uplink device which takes the place of an MMI in cyborg endoskeletons, creating a robotic shell controlled by an AI."
|
||||
|
||||
@@ -705,6 +705,15 @@
|
||||
construction_time = 120
|
||||
category = list("Cyborg Upgrade Modules")
|
||||
|
||||
/datum/design/borg_upgrade_surgicalprocessor
|
||||
name = "Cyborg Upgrade (Surgical Processor)"
|
||||
id = "borg_upgrade_surgicalprocessor"
|
||||
build_type = MECHFAB
|
||||
build_path = /obj/item/borg/upgrade/processor
|
||||
materials = list(MAT_METAL=15000, MAT_GLASS=15000, MAT_SILVER=10000)
|
||||
construction_time = 120
|
||||
category = list("Cyborg Upgrade Modules")
|
||||
|
||||
/datum/design/borg_upgrade_trashofholding
|
||||
name = "Cyborg Upgrade (Trash Bag of Holding)"
|
||||
id = "borg_upgrade_trashofholding"
|
||||
|
||||
@@ -273,7 +273,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_highstrengthsynthesiser", "borg_upgrade_expandedsynthesiser", "borg_upgrade_pinpointer")
|
||||
design_ids = list("borg_upgrade_defibrillator", "borg_upgrade_piercinghypospray", "borg_upgrade_highstrengthsynthesiser", "borg_upgrade_expandedsynthesiser", "borg_upgrade_pinpointer", "borg_upgrade_surgicalprocessor")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2000)
|
||||
export_price = 5000
|
||||
|
||||
|
||||
@@ -94,6 +94,14 @@
|
||||
if(S.scientist)
|
||||
return TRUE
|
||||
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
var/obj/item/surgical_processor/SP = locate() in R.module.modules
|
||||
if(!SP)
|
||||
return FALSE
|
||||
if(type in SP.advanced_surgeries)
|
||||
return TRUE
|
||||
|
||||
var/turf/T = get_turf(target)
|
||||
var/obj/structure/table/optable/table = locate(/obj/structure/table/optable, T)
|
||||
if(!table || !table.computer)
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
if(accept_hand)
|
||||
if(!tool)
|
||||
success = TRUE
|
||||
if(iscyborg(user))
|
||||
success = TRUE
|
||||
|
||||
if(accept_any_item)
|
||||
if(tool && tool_check(user, tool))
|
||||
|
||||
@@ -235,3 +235,29 @@
|
||||
else
|
||||
to_chat(user, "[src] is empty.")
|
||||
return
|
||||
|
||||
/obj/item/surgical_processor //allows medical cyborgs to scan and initiate advanced surgeries
|
||||
name = "\improper Surgical Processor"
|
||||
desc = "A device for scanning and initiating surgeries from a disk or operating computer."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "spectrometer"
|
||||
item_flags = NOBLUDGEON
|
||||
var/list/advanced_surgeries = list()
|
||||
|
||||
/obj/item/surgical_processor/afterattack(obj/item/O, mob/user, proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return
|
||||
if(istype(O, /obj/item/disk/surgery))
|
||||
to_chat(user, "<span class='notice'>You load the surgery protocol from [O] into [src].</span>")
|
||||
var/obj/item/disk/surgery/D = O
|
||||
if(do_after(user, 10, target = O))
|
||||
advanced_surgeries |= D.surgeries
|
||||
return TRUE
|
||||
if(istype(O, /obj/machinery/computer/operating))
|
||||
to_chat(user, "<span class='notice'>You copy surgery protocols from [O] into [src].</span>")
|
||||
var/obj/machinery/computer/operating/OC = O
|
||||
if(do_after(user, 10, target = O))
|
||||
advanced_surgeries |= OC.advanced_surgeries
|
||||
return TRUE
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user