this is totally not laggy
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
continue
|
||||
if(S.lying_required && !(M.lying))
|
||||
continue
|
||||
if(!S.can_start(user, M))
|
||||
if(!S.can_start(user, M, I))
|
||||
continue
|
||||
for(var/path in S.target_mobtypes)
|
||||
if(istype(M, path))
|
||||
@@ -64,7 +64,7 @@
|
||||
return
|
||||
if(S.lying_required && !(M.lying))
|
||||
return
|
||||
if(!S.can_start(user, M))
|
||||
if(!S.can_start(user, M, I))
|
||||
return
|
||||
|
||||
if(S.ignore_clothes || get_location_accessible(M, selected_zone))
|
||||
|
||||
@@ -55,27 +55,26 @@
|
||||
if(requires_tech)
|
||||
. = FALSE
|
||||
|
||||
var/list/advanced_surgeries = list()
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
var/obj/item/surgical_processor/SP = locate() in R.module.modules
|
||||
if(SP)
|
||||
if (replaced_by in SP.advanced_surgeries)
|
||||
return .
|
||||
if(type in SP.advanced_surgeries)
|
||||
return TRUE
|
||||
|
||||
advanced_surgeries |= SP.advanced_surgeries
|
||||
|
||||
var/turf/T = get_turf(patient)
|
||||
var/obj/structure/table/optable/table = locate(/obj/structure/table/optable, T)
|
||||
if(table)
|
||||
if(!table.computer)
|
||||
return .
|
||||
if(table.computer.stat & (NOPOWER|BROKEN))
|
||||
return .
|
||||
if(replaced_by in table.computer.advanced_surgeries)
|
||||
return FALSE
|
||||
if(type in table.computer.advanced_surgeries)
|
||||
return TRUE
|
||||
if(table?.computer && !CHECK_BITFIELD(table.computer.stat, NOPOWER|BROKEN))
|
||||
advanced_surgeries |= table.computer.advanced_surgeries
|
||||
|
||||
if(istype(tool, /obj/item/surgical_drapes/advanced))
|
||||
var/obj/item/surgical_drapes/advanced/A = tool
|
||||
advanced_surgeries |= A.get_advanced_surgeries()
|
||||
|
||||
if(replaced_by in advanced_surgeries)
|
||||
return FALSE
|
||||
if(type in advanced_surgeries)
|
||||
return TRUE
|
||||
|
||||
/datum/surgery/proc/next_step(mob/user, intent)
|
||||
if(step_in_progress)
|
||||
|
||||
@@ -287,6 +287,26 @@
|
||||
if(!attempt_initiate_surgery(src, M, user))
|
||||
..()
|
||||
|
||||
/obj/item/surgical_drapes/advanced
|
||||
name = "smart surgical drapes"
|
||||
desc = "A quite quirky set of drapes with wireless synchronization to the station's research networks, with an integrated display allowing users to execute advanced surgeries without the aid of an operating computer."
|
||||
var/datum/techweb/linked_techweb
|
||||
|
||||
/obj/item/surgical_drapes/advanced/Initialize(mapload)
|
||||
. = ..()
|
||||
linked_techweb = SSresearch.science_tech
|
||||
|
||||
/obj/item/surgical_drapes/advanced/proc/get_advanced_surgeries()
|
||||
. = list()
|
||||
if(!linked_techweb)
|
||||
return
|
||||
for(var/subtype in subtypesof(/datum/design/surgery))
|
||||
var/datum/design/surgery/prototype = subtype
|
||||
var/id = initial(prototype.id)
|
||||
if(id in linked_techweb.researched_designs)
|
||||
prototype = SSresearch.techweb_design_by_id(id)
|
||||
. |= prototype.surgery
|
||||
|
||||
/obj/item/organ_storage //allows medical cyborgs to manipulate organs without hands
|
||||
name = "organ storage bag"
|
||||
desc = "A container for holding body parts."
|
||||
|
||||
Reference in New Issue
Block a user