[MIRROR] Makes new surgeries check for tool qualities (#5690)
* Makes new surgeries check for tool qualities (#35847) * Makes new surgeries check for tool qualities * Gives augments and autosurgeon some tool_act love * okay * Fix duplicate definition * Makes new surgeries check for tool qualities
This commit is contained in:
committed by
Poojawa
parent
b2ea3ea668
commit
26702fda91
@@ -25,7 +25,7 @@
|
||||
|
||||
/datum/surgery_step/brainwash
|
||||
name = "brainwash"
|
||||
implements = list(/obj/item/hemostat = 85, /obj/item/wirecutters = 50, /obj/item/stack/packageWrap = 35, /obj/item/stack/cable_coil = 15)
|
||||
implements = list(/obj/item/hemostat = 85, TOOL_WIRECUTTER = 50, /obj/item/stack/packageWrap = 35, /obj/item/stack/cable_coil = 15)
|
||||
time = 200
|
||||
var/objective
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
/datum/surgery_step/bionecrosis
|
||||
name = "start bionecrosis"
|
||||
implements = list(/obj/item/hemostat = 100, /obj/item/screwdriver = 35, /obj/item/pen = 15)
|
||||
implements = list(/obj/item/hemostat = 100, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15)
|
||||
time = 50
|
||||
|
||||
/datum/surgery_step/bionecrosis/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
/datum/surgery_step/pacify
|
||||
name = "rewire brain"
|
||||
implements = list(/obj/item/hemostat = 100, /obj/item/screwdriver = 35, /obj/item/pen = 15)
|
||||
implements = list(/obj/item/hemostat = 100, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15)
|
||||
time = 40
|
||||
|
||||
/datum/surgery_step/pacify/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
/datum/surgery_step/reconstruct
|
||||
name = "repair body"
|
||||
implements = list(/obj/item/hemostat = 100, /obj/item/screwdriver = 35, /obj/item/pen = 15)
|
||||
implements = list(/obj/item/hemostat = 100, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15)
|
||||
repeatable = TRUE
|
||||
time = 25
|
||||
|
||||
|
||||
@@ -23,29 +23,14 @@
|
||||
|
||||
/datum/surgery_step/viral_bond
|
||||
name = "viral bond"
|
||||
implements = list(/obj/item/cautery = 100, /obj/item/weldingtool = 50,
|
||||
/obj/item/lighter = 35, /obj/item/match = 30)
|
||||
implements = list(/obj/item/cautery = 100, TOOL_WELDER = 50, /obj/item = 30) // 30% success with any hot item.
|
||||
time = 100
|
||||
|
||||
/datum/surgery_step/viral_bond/tool_check(mob/user, obj/item/tool)
|
||||
if(istype(tool, /obj/item/cautery))
|
||||
return TRUE
|
||||
if(implement_type == TOOL_WELDER || implement_type == /obj/item)
|
||||
return tool.is_hot()
|
||||
|
||||
if(istype(tool, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = tool
|
||||
if(WT.isOn())
|
||||
return TRUE
|
||||
|
||||
else if(istype(tool, /obj/item/lighter))
|
||||
var/obj/item/lighter/L = tool
|
||||
if(L.lit)
|
||||
return TRUE
|
||||
|
||||
else if(istype(tool, /obj/item/match))
|
||||
var/obj/item/match/M = tool
|
||||
if(M.lit)
|
||||
return TRUE
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/surgery_step/viral_bond/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
user.visible_message("[user] starts heating [target]'s bone marrow with [tool]...", "<span class='notice'>You start heating [target]'s bone marrow with [tool]...</span>")
|
||||
|
||||
@@ -41,16 +41,15 @@
|
||||
..()
|
||||
to_chat(user, "<span class='info'>[src] is assembled in the [zone == "r_arm" ? "right" : "left"] arm configuration. You can use a screwdriver to reassemble it.</span>")
|
||||
|
||||
/obj/item/organ/cyberimp/arm/attackby(obj/item/W, mob/user, params)
|
||||
..()
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(zone == "r_arm")
|
||||
zone = "l_arm"
|
||||
else
|
||||
zone = "r_arm"
|
||||
SetSlotFromZone()
|
||||
to_chat(user, "<span class='notice'>You modify [src] to be installed on the [zone == "r_arm" ? "right" : "left"] arm.</span>")
|
||||
update_icon()
|
||||
/obj/item/organ/cyberimp/arm/screwdriver_act(mob/living/user, obj/item/I)
|
||||
I.play_tool_sound(src)
|
||||
if(zone == "r_arm")
|
||||
zone = "l_arm"
|
||||
else
|
||||
zone = "r_arm"
|
||||
SetSlotFromZone()
|
||||
to_chat(user, "<span class='notice'>You modify [src] to be installed on the [zone == "r_arm" ? "right" : "left"] arm.</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/organ/cyberimp/arm/Remove(mob/living/carbon/M, special = 0)
|
||||
Retract()
|
||||
|
||||
@@ -53,19 +53,26 @@
|
||||
return
|
||||
storedorgan = I
|
||||
to_chat(user, "<span class='notice'>You insert the [I] into [src].</span>")
|
||||
else if(istype(I, /obj/item/screwdriver))
|
||||
if(!storedorgan)
|
||||
to_chat(user, "<span class='notice'>There's no implant in [src] for you to remove.</span>")
|
||||
else
|
||||
var/turf/open/floorloc = get_turf(user)
|
||||
floorloc.contents += contents
|
||||
to_chat(user, "<span class='notice'>You remove the [storedorgan] from [src].</span>")
|
||||
I.play_tool_sound(src)
|
||||
storedorgan = null
|
||||
if(uses != INFINITE)
|
||||
uses--
|
||||
if(!uses)
|
||||
desc = "[initial(desc)] Looks like it's been used up."
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/device/autosurgeon/screwdriver_act(mob/living/user, obj/item/I)
|
||||
if(!storedorgan)
|
||||
to_chat(user, "<span class='notice'>There's no implant in [src] for you to remove.</span>")
|
||||
else
|
||||
var/atom/drop_loc = user.drop_location()
|
||||
for(var/J in src)
|
||||
var/atom/movable/AM = J
|
||||
AM.forceMove(drop_loc)
|
||||
|
||||
to_chat(user, "<span class='notice'>You remove the [storedorgan] from [src].</span>")
|
||||
I.play_tool_sound(src)
|
||||
storedorgan = null
|
||||
if(uses != INFINITE)
|
||||
uses--
|
||||
if(!uses)
|
||||
desc = "[initial(desc)] Looks like it's been used up."
|
||||
return TRUE
|
||||
|
||||
/obj/item/device/autosurgeon/cmo
|
||||
desc = "A single use autosurgeon that contains a medical heads-up display augment. A screwdriver can be used to remove it, but implants can't be placed back in."
|
||||
|
||||
Reference in New Issue
Block a user