mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 06:58:30 +01:00
Removes redundant surgery for brain and eye repair, now covered by organ repair in general.
Attempted to limit regular surgery to non-robotic limbs and added surgical steps for robotic limbs. Readded checks for smoking reagent transfer. Fixes, oversights, tweaks with IPC. Added some reagent bypassing for NO_BLOOD and some checks to various affect_touch() calls for NO_SCAN/IPC. Added prosthetic-scanning functionality to cyborg analyzer. Added prosthetic analysis to the robot analyzer. Allowed people with internal cells to charge in robot chargers (IPCs).
This commit is contained in:
@@ -92,4 +92,4 @@
|
||||
desc = "A tightly furled roll of paper, covered with indecipherable runes."
|
||||
robotic = 2
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "scroll"
|
||||
icon_state = "scroll"
|
||||
|
||||
@@ -1224,16 +1224,26 @@
|
||||
else
|
||||
target_zone = user.zone_sel.selecting
|
||||
|
||||
switch(target_zone)
|
||||
if("head")
|
||||
if(head && head.flags & THICKMATERIAL)
|
||||
. = 0
|
||||
else
|
||||
if(wear_suit && wear_suit.flags & THICKMATERIAL)
|
||||
. = 0
|
||||
var/obj/item/organ/external/affecting = get_organ(target_zone)
|
||||
var/fail_msg
|
||||
if(!affecting)
|
||||
. = 0
|
||||
fail_msg = "They are missing that limb."
|
||||
else if (affecting.status & ORGAN_ROBOT)
|
||||
. = 0
|
||||
fail_msg = "That limb is robotic."
|
||||
else
|
||||
switch(target_zone)
|
||||
if("head")
|
||||
if(head && head.flags & THICKMATERIAL)
|
||||
. = 0
|
||||
else
|
||||
if(wear_suit && wear_suit.flags & THICKMATERIAL)
|
||||
. = 0
|
||||
if(!. && error_msg && user)
|
||||
// Might need re-wording.
|
||||
user << "<span class='alert'>There is no exposed flesh or thin material [target_zone == "head" ? "on their head" : "on their body"] to inject into.</span>"
|
||||
if(!fail_msg)
|
||||
fail_msg = "There is no exposed flesh or thin material [target_zone == "head" ? "on their head" : "on their body"] to inject into."
|
||||
user << "<span class='alert'>[fail_msg]</span>"
|
||||
|
||||
/mob/living/carbon/human/print_flavor_text(var/shrink = 1)
|
||||
var/list/equipment = list(src.head,src.wear_mask,src.glasses,src.w_uniform,src.wear_suit,src.gloves,src.shoes)
|
||||
|
||||
@@ -48,6 +48,12 @@
|
||||
switch(M.a_intent)
|
||||
if(I_HELP)
|
||||
if(istype(H) && health < config.health_threshold_crit && health > config.health_threshold_dead)
|
||||
if(!H.check_has_mouth())
|
||||
H << "<span class='danger'>You don't have a mouth, you cannot perform CPR!</span>"
|
||||
return
|
||||
if(!check_has_mouth())
|
||||
H << "<span class='danger'>They don't have a mouth, you cannot perform CPR!</span>"
|
||||
return
|
||||
if((H.head && (H.head.flags & HEADCOVERSMOUTH)) || (H.wear_mask && (H.wear_mask.flags & MASKCOVERSMOUTH)))
|
||||
H << "<span class='notice'>Remove your mask!</span>"
|
||||
return 0
|
||||
|
||||
@@ -855,8 +855,6 @@
|
||||
|
||||
proc/handle_chemicals_in_body()
|
||||
|
||||
// TODO: stomach and bloodstream organ.
|
||||
|
||||
if(reagents)
|
||||
chem_effects.Cut()
|
||||
analgesic = 0
|
||||
@@ -864,8 +862,9 @@
|
||||
if(species && species.reagent_tag)
|
||||
alien = species.reagent_tag
|
||||
touching.metabolize(alien, CHEM_TOUCH)
|
||||
ingested.metabolize(alien, CHEM_INGEST)
|
||||
reagents.metabolize(alien, CHEM_BLOOD)
|
||||
if(!(species.flags & NO_BLOOD))
|
||||
ingested.metabolize(alien, CHEM_INGEST)
|
||||
reagents.metabolize(alien, CHEM_BLOOD)
|
||||
if(CE_PAINKILLER in chem_effects)
|
||||
analgesic = chem_effects[CE_PAINKILLER]
|
||||
|
||||
@@ -1504,7 +1503,8 @@
|
||||
|
||||
if(life_tick % 5) return pulse //update pulse every 5 life ticks (~1 tick/sec, depending on server load)
|
||||
|
||||
if(species && species.flags & NO_BLOOD) return PULSE_NONE //No blood, no pulse.
|
||||
if(species && species.flags & NO_BLOOD)
|
||||
return PULSE_NONE //No blood, no pulse.
|
||||
|
||||
if(stat == DEAD)
|
||||
return PULSE_NONE //that's it, you're dead, nothing can influence your pulse
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
language = "Sol Common" //todo?
|
||||
unarmed_types = list(/datum/unarmed_attack/slime_glomp)
|
||||
flags = IS_RESTRICTED | NO_BLOOD | NO_SCAN | NO_SLIP | NO_BREATHE
|
||||
flags = IS_RESTRICTED | NO_SCAN | NO_SLIP | NO_BREATHE
|
||||
siemens_coefficient = 3
|
||||
darksight = 3
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
else
|
||||
qdel(D)
|
||||
|
||||
H.visible_message("\red[H] splits apart with a wet slithering noise!")
|
||||
H.visible_message("<span class='danger'>[H] splits apart with a wet slithering noise!</span>")
|
||||
|
||||
/datum/species/machine
|
||||
name = "Machine"
|
||||
@@ -266,7 +266,10 @@
|
||||
virus_immune = 1
|
||||
reagent_tag = IS_MACHINE
|
||||
|
||||
has_organ = list() //TODO: Positronic brain.
|
||||
has_organ = list(
|
||||
"brain" = /obj/item/organ/mmi_holder/posibrain,
|
||||
"cell" = /obj/item/organ/cell
|
||||
)
|
||||
|
||||
has_limbs = list(
|
||||
"chest" = list("path" = /obj/item/organ/external/chest/ipc),
|
||||
|
||||
@@ -26,38 +26,70 @@
|
||||
user.show_message("\blue Key: Suffocation/Toxin/Burns/Brute", 1)
|
||||
user.show_message("\blue Body Temperature: ???", 1)
|
||||
return
|
||||
if(!istype(M, /mob/living/silicon/robot)) //todo add limb analysis
|
||||
|
||||
var/scan_type
|
||||
if(istype(M, /mob/living/silicon/robot))
|
||||
scan_type = "robot"
|
||||
else if(istype(M, /mob/living/carbon/human))
|
||||
scan_type = "prosthetics"
|
||||
else
|
||||
user << "\red You can't analyze non-robotic things!"
|
||||
return
|
||||
|
||||
user.visible_message("<span class='notice'> [user] has analyzed [M]'s components.","<span class='notice'> You have analyzed [M]'s components.")
|
||||
var/BU = M.getFireLoss() > 50 ? "<b>[M.getFireLoss()]</b>" : M.getFireLoss()
|
||||
var/BR = M.getBruteLoss() > 50 ? "<b>[M.getBruteLoss()]</b>" : M.getBruteLoss()
|
||||
user.show_message("\blue Analyzing Results for [M]:\n\t Overall Status: [M.stat > 1 ? "fully disabled" : "[M.health - M.halloss]% functional"]")
|
||||
user.show_message("\t Key: <font color='#FFA500'>Electronics</font>/<font color='red'>Brute</font>", 1)
|
||||
user.show_message("\t Damage Specifics: <font color='#FFA500'>[BU]</font> - <font color='red'>[BR]</font>")
|
||||
if(M.tod && M.stat == DEAD)
|
||||
user.show_message("\blue Time of Disable: [M.tod]")
|
||||
user.visible_message("<span class='notice'>\The [user] has analyzed [M]'s components.","<span class='notice'>You have analyzed [M]'s components.")
|
||||
switch(scan_type)
|
||||
if("robot")
|
||||
var/BU = M.getFireLoss() > 50 ? "<b>[M.getFireLoss()]</b>" : M.getFireLoss()
|
||||
var/BR = M.getBruteLoss() > 50 ? "<b>[M.getBruteLoss()]</b>" : M.getBruteLoss()
|
||||
user.show_message("\blue Analyzing Results for [M]:\n\t Overall Status: [M.stat > 1 ? "fully disabled" : "[M.health - M.halloss]% functional"]")
|
||||
user.show_message("\t Key: <font color='#FFA500'>Electronics</font>/<font color='red'>Brute</font>", 1)
|
||||
user.show_message("\t Damage Specifics: <font color='#FFA500'>[BU]</font> - <font color='red'>[BR]</font>")
|
||||
if(M.tod && M.stat == DEAD)
|
||||
user.show_message("\blue Time of Disable: [M.tod]")
|
||||
var/mob/living/silicon/robot/H = M
|
||||
var/list/damaged = H.get_damaged_components(1,1,1)
|
||||
user.show_message("\blue Localized Damage:",1)
|
||||
if(length(damaged)>0)
|
||||
for(var/datum/robot_component/org in damaged)
|
||||
user.show_message(text("\blue \t []: [][] - [] - [] - []", \
|
||||
capitalize(org.name), \
|
||||
(org.installed == -1) ? "<font color='red'><b>DESTROYED</b></font> " :"",\
|
||||
(org.electronics_damage > 0) ? "<font color='#FFA500'>[org.electronics_damage]</font>" :0, \
|
||||
(org.brute_damage > 0) ? "<font color='red'>[org.brute_damage]</font>" :0, \
|
||||
(org.toggled) ? "Toggled ON" : "<font color='red'>Toggled OFF</font>",\
|
||||
(org.powered) ? "Power ON" : "<font color='red'>Power OFF</font>"),1)
|
||||
else
|
||||
user.show_message("\blue \t Components are OK.",1)
|
||||
if(H.emagged && prob(5))
|
||||
user.show_message("\red \t ERROR: INTERNAL SYSTEMS COMPROMISED",1)
|
||||
user.show_message("\blue Operating Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)", 1)
|
||||
|
||||
if (istype(M, /mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/H = M
|
||||
var/list/damaged = H.get_damaged_components(1,1,1)
|
||||
user.show_message("\blue Localized Damage:",1)
|
||||
if(length(damaged)>0)
|
||||
for(var/datum/robot_component/org in damaged)
|
||||
user.show_message(text("\blue \t []: [][] - [] - [] - []", \
|
||||
capitalize(org.name), \
|
||||
(org.installed == -1) ? "<font color='red'><b>DESTROYED</b></font> " :"",\
|
||||
(org.electronics_damage > 0) ? "<font color='#FFA500'>[org.electronics_damage]</font>" :0, \
|
||||
(org.brute_damage > 0) ? "<font color='red'>[org.brute_damage]</font>" :0, \
|
||||
(org.toggled) ? "Toggled ON" : "<font color='red'>Toggled OFF</font>",\
|
||||
(org.powered) ? "Power ON" : "<font color='red'>Power OFF</font>"),1)
|
||||
else
|
||||
user.show_message("\blue \t Components are OK.",1)
|
||||
if(H.emagged && prob(5))
|
||||
user.show_message("\red \t ERROR: INTERNAL SYSTEMS COMPROMISED",1)
|
||||
if("prosthetics")
|
||||
var/mob/living/carbon/human/H = M
|
||||
user << "<span class='notice'>Analyzing Results for \the [H]:</span>"
|
||||
user << "Key: <font color='#FFA500'>Electronics</font>/<font color='red'>Brute</font>"
|
||||
|
||||
user.show_message("\blue Operating Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)", 1)
|
||||
user << "<span class='notice'>External prosthetics:</span>"
|
||||
var/organ_found
|
||||
if(H.internal_organs.len)
|
||||
for(var/obj/item/organ/external/E in H.organs)
|
||||
if(!(E.status & ORGAN_ROBOT))
|
||||
continue
|
||||
organ_found = 1
|
||||
user << "[E.name]: <font color='red'>[E.brute_dam]</font> <font color='#FFA500'>[E.burn_dam]</font>"
|
||||
if(!organ_found)
|
||||
user << "No prosthetics located."
|
||||
user << "<hr>"
|
||||
user << "<span class='notice'>Internal prosthetics:</span>"
|
||||
organ_found = null
|
||||
if(H.internal_organs.len)
|
||||
for(var/obj/item/organ/O in H.internal_organs)
|
||||
if(!(O.status & ORGAN_ROBOT))
|
||||
continue
|
||||
organ_found = 1
|
||||
user << "[O.name]: <font color='red'>[O.damage]</font>"
|
||||
if(!organ_found)
|
||||
user << "No prosthetics located."
|
||||
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
@@ -214,7 +214,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
//Transfers blood from reagents to vessel, respecting blood types compatability.
|
||||
/mob/living/carbon/human/inject_blood(var/datum/reagent/blood/injected, var/amount)
|
||||
|
||||
if(species && species.flags & NO_BLOOD)
|
||||
if(species.flags & NO_BLOOD)
|
||||
reagents.add_reagent("blood", amount, injected.data)
|
||||
reagents.update_total()
|
||||
return
|
||||
|
||||
@@ -349,7 +349,7 @@ This function completely restores a damaged organ to perfect condition.
|
||||
|
||||
//Determines if we even need to process this organ.
|
||||
/obj/item/organ/external/proc/need_process()
|
||||
if(status && status != ORGAN_ROBOT) // If it's robotic, that's fine it will have a status.
|
||||
if(status & (ORGAN_CUT_AWAY|ORGAN_GAUZED|ORGAN_BLEEDING|ORGAN_BROKEN|ORGAN_DESTROYED|ORGAN_SPLINTED|ORGAN_DEAD|ORGAN_MUTATED))
|
||||
return 1
|
||||
if(brute_dam || burn_dam)
|
||||
return 1
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
// IPC limbs.
|
||||
/obj/item/organ/external/head/ipc
|
||||
dislocated = -1
|
||||
can_intake_reagents = 0
|
||||
encased = null
|
||||
/obj/item/organ/external/head/ipc/New()
|
||||
robotize("Morpheus Cyberkinetics")
|
||||
..()
|
||||
|
||||
/obj/item/organ/external/chest/ipc
|
||||
dislocated = -1
|
||||
encased = null
|
||||
/obj/item/organ/external/chest/ipc/New()
|
||||
robotize("Morpheus Cyberkinetics")
|
||||
..()
|
||||
@@ -59,9 +68,74 @@
|
||||
robotize("Morpheus Cyberkinetics")
|
||||
..()
|
||||
|
||||
/obj/item/organ/external/head/ipc
|
||||
dislocated = -1
|
||||
can_intake_reagents = 0
|
||||
/obj/item/organ/external/head/ipc/New()
|
||||
robotize("Morpheus Cyberkinetics")
|
||||
/obj/item/organ/cell
|
||||
name = "microbattery"
|
||||
desc = "A small, powerful cell for use in fully prosthetic bodies."
|
||||
icon = 'icons/obj/power.dmi'
|
||||
icon_state = "scell"
|
||||
organ_tag = "cell"
|
||||
parent_organ = "chest"
|
||||
vital = 1
|
||||
|
||||
/obj/item/organ/cell/New()
|
||||
robotize()
|
||||
..()
|
||||
|
||||
/obj/item/organ/cell/replaced()
|
||||
..()
|
||||
// This is very ghetto way of rebooting an IPC. TODO better way.
|
||||
if(owner && owner.stat == DEAD)
|
||||
owner.stat = 0
|
||||
owner.visible_message("<span class='danger'>\The [owner] twitches visibly!</span>")
|
||||
|
||||
// Used for an MMI or posibrain being installed into a human.
|
||||
/obj/item/organ/mmi_holder
|
||||
name = "brain"
|
||||
organ_tag = "brain"
|
||||
parent_organ = "head"
|
||||
vital = 1
|
||||
var/obj/item/device/mmi/stored_mmi
|
||||
|
||||
/obj/item/organ/mmi_holder/proc/update_from_mmi()
|
||||
if(!stored_mmi)
|
||||
return
|
||||
name = stored_mmi.name
|
||||
desc = stored_mmi.desc
|
||||
icon = stored_mmi.icon
|
||||
icon_state = stored_mmi.icon_state
|
||||
|
||||
/obj/item/organ/mmi_holder/removed(var/mob/living/user)
|
||||
|
||||
if(stored_mmi)
|
||||
stored_mmi.loc = get_turf(src)
|
||||
if(owner.mind)
|
||||
owner.mind.transfer_to(stored_mmi.brainmob)
|
||||
..()
|
||||
|
||||
var/mob/living/holder_mob = loc
|
||||
if(istype(holder_mob))
|
||||
holder_mob.drop_from_inventory(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/organ/mmi_holder/New()
|
||||
..()
|
||||
// This is very ghetto way of rebooting an IPC. TODO better way.
|
||||
spawn(1)
|
||||
if(owner && owner.stat == DEAD)
|
||||
owner.stat = 0
|
||||
owner.visible_message("<span class='danger'>\The [owner] twitches visibly!</span>")
|
||||
|
||||
/obj/item/organ/mmi_holder/posibrain/New()
|
||||
robotize()
|
||||
stored_mmi = new /obj/item/device/mmi/digital/posibrain(src)
|
||||
..()
|
||||
spawn(1)
|
||||
if(owner)
|
||||
stored_mmi.name = "positronic brain ([owner.name])"
|
||||
stored_mmi.brainmob.real_name = owner.name
|
||||
stored_mmi.brainmob.name = stored_mmi.brainmob.real_name
|
||||
stored_mmi.icon_state = "posibrain-occupied"
|
||||
update_from_mmi()
|
||||
else
|
||||
stored_mmi.loc = get_turf(src)
|
||||
qdel(src)
|
||||
@@ -520,8 +520,11 @@ obj/structure/cable/proc/cableColor(var/colorC)
|
||||
return ..()
|
||||
|
||||
if(S.burn_dam > 0 && use(1))
|
||||
S.heal_damage(0,15,0,1)
|
||||
user.visible_message("\red \The [user] repairs some burn damage on \the [M]'s [S.name] with \the [src].")
|
||||
if(S.burn_dam < ROBOLIMB_SELF_REPAIR_CAP)
|
||||
S.heal_damage(0,15,0,1)
|
||||
user.visible_message("\red \The [user] repairs some burn damage on \the [M]'s [S.name] with \the [src].")
|
||||
else
|
||||
user << "\red The damage is far too severe to patch over externally."
|
||||
return
|
||||
else
|
||||
user << "Nothing to fix!"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/datum/reagent
|
||||
var/name = "Reagent"
|
||||
var/id = "reagent"
|
||||
var/description = "A non-descript chemical."
|
||||
var/description = "A non-descript chemical."
|
||||
var/datum/reagents/holder = null
|
||||
var/reagent_state = SOLID
|
||||
var/list/data = null
|
||||
var/volume = 0
|
||||
var/volume = 0
|
||||
var/metabolism = REM // This would be 0.2 normally
|
||||
var/ingest_met = 0
|
||||
var/touch_met = 0
|
||||
@@ -13,11 +13,11 @@
|
||||
var/max_dose = 0
|
||||
var/overdose = 0
|
||||
var/scannable = 0 // Shows up on health analyzers.
|
||||
var/affects_dead = 0
|
||||
var/affects_dead = 0
|
||||
var/glass_icon_state = null
|
||||
var/glass_name = null
|
||||
var/glass_desc = null
|
||||
var/glass_center_of_mass = null
|
||||
var/glass_center_of_mass = null
|
||||
var/color = "#000000"
|
||||
var/color_weight = 1
|
||||
|
||||
@@ -86,11 +86,11 @@
|
||||
return data.Copy()
|
||||
else if(data)
|
||||
return data
|
||||
return null
|
||||
return null
|
||||
|
||||
/datum/reagent/Destroy() // This should only be called by the holder, so it's already handled clearing its references
|
||||
..()
|
||||
holder = null
|
||||
holder = null
|
||||
|
||||
/* DEPRECATED - TODO: REMOVE EVERYWHERE */
|
||||
|
||||
@@ -108,4 +108,4 @@
|
||||
id = "woodpulp"
|
||||
description = "A mass of wood fibers."
|
||||
reagent_state = LIQUID
|
||||
color = "#B97A57"
|
||||
color = "#B97A57"
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
M.adjustToxLoss(removed)
|
||||
|
||||
/datum/reagent/blood/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(alien == IS_MACHINE)
|
||||
return
|
||||
if(data && data["viruses"])
|
||||
for(var/datum/disease/D in data["viruses"])
|
||||
if(D.spread_type == SPECIAL || D.spread_type == NON_CONTAGIOUS)
|
||||
|
||||
@@ -305,8 +305,6 @@
|
||||
return
|
||||
|
||||
/datum/reagent/condensedcapsaicin/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(alien == IS_DIONA || alien == IS_MACHINE)
|
||||
return
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species && (H.species.flags & (NO_PAIN)))
|
||||
|
||||
@@ -229,6 +229,9 @@
|
||||
affect_blood(M, alien, removed)
|
||||
|
||||
/datum/reagent/mutagen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H) && (H.species.flags & NO_SCAN))
|
||||
return
|
||||
if(M.dna)
|
||||
if(prob(removed * 0.1)) // Approx. one mutation per 10 injected/20 ingested/30 touching units
|
||||
randmuti(M)
|
||||
|
||||
@@ -65,6 +65,16 @@
|
||||
if (!istype(M))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H))
|
||||
var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting)
|
||||
if(!affected)
|
||||
user << "<span class='danger'>\The [H] is missing that limb!</span>"
|
||||
return
|
||||
else if(affected.status & ORGAN_ROBOT)
|
||||
user << "<span class='danger'>You cannot inject a robotic limb.</span>"
|
||||
return
|
||||
|
||||
if (R.total_volume && M.can_inject(user, 1))
|
||||
user << "<span class='notice'>You inject [M] with the injector.</span>"
|
||||
M << "<span class='notice'>You feel a tiny prick!</span>"
|
||||
|
||||
@@ -25,6 +25,17 @@
|
||||
return
|
||||
if (!istype(M))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H))
|
||||
var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting)
|
||||
if(!affected)
|
||||
user << "<span class='danger'>\The [H] is missing that limb!</span>"
|
||||
return
|
||||
else if(affected.status & ORGAN_ROBOT)
|
||||
user << "<span class='danger'>You cannot inject a robotic limb.</span>"
|
||||
return
|
||||
|
||||
user << "<span class='notice'>You inject [M] with [src].</span>"
|
||||
M << "<span class='notice'>You feel a tiny prick!</span>"
|
||||
|
||||
|
||||
@@ -142,13 +142,21 @@
|
||||
user << "<span class='notice'>[target] is full.</span>"
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(istype(H))
|
||||
var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting)
|
||||
if(!affected)
|
||||
user << "<span class='danger'>\The [H] is missing that limb!</span>"
|
||||
return
|
||||
else if(affected.status & ORGAN_ROBOT)
|
||||
user << "<span class='danger'>You cannot inject a robotic limb.</span>"
|
||||
return
|
||||
|
||||
if(ismob(target) && target != user)
|
||||
|
||||
var/injtime = time //Injecting through a hardsuit takes longer due to needing to find a port.
|
||||
|
||||
if(istype(target, /mob/living/carbon/human))
|
||||
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(istype(H))
|
||||
if(H.wear_suit)
|
||||
if(istype(H.wear_suit, /obj/item/clothing/suit/space))
|
||||
injtime = injtime * 2
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
/obj/machinery/power/supermatter/proc/announce_warning()
|
||||
var/integrity = get_integrity()
|
||||
var/alert_msg = " Integrity at [integrity]%"
|
||||
|
||||
|
||||
if(damage > emergency_point)
|
||||
alert_msg = emergency_alert + alert_msg
|
||||
lastwarning = world.timeofday - WARNING_DELAY * 4
|
||||
@@ -153,7 +153,7 @@
|
||||
else if(safe_warned && public_alert)
|
||||
radio.autosay(alert_msg, "Supermatter Monitor")
|
||||
public_alert = 0
|
||||
|
||||
|
||||
|
||||
/obj/machinery/power/supermatter/process()
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.open >= 2 && affected.stage == 0
|
||||
return affected && !(affected.status & ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 0
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -52,7 +52,7 @@
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.name != "head" && affected.open >= 2 && affected.stage == 1
|
||||
return affected && affected.name != "head" && !(affected.status & ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 1
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -91,7 +91,7 @@
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.name == "head" && affected.open >= 2 && affected.stage == 1
|
||||
return affected && affected.name == "head" && !(affected.status & ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 1
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] is beginning to piece together [target]'s skull with \the [tool]." , \
|
||||
@@ -127,7 +127,7 @@
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.open >= 2 && affected.stage == 2
|
||||
return affected && affected.open >= 2 && !(affected.status & ORGAN_ROBOT) && affected.stage == 2
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// BRAIN DAMAGE FIXING //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/brain/bone_chips
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/hemostat = 100, \
|
||||
/obj/item/weapon/wirecutters = 75, \
|
||||
/obj/item/weapon/material/kitchen/utensil/fork = 20
|
||||
)
|
||||
|
||||
priority = 3
|
||||
min_duration = 80
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(!affected) return
|
||||
var/obj/item/organ/brain/sponge = target.internal_organs_by_name["brain"]
|
||||
return (sponge && sponge.damage > 0 && sponge.damage <= 20) && affected.open == 3
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts taking bone chips out of [target]'s brain with \the [tool].", \
|
||||
"You start taking bone chips out of [target]'s brain with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] takes out all the bone chips in [target]'s brain with \the [tool].", \
|
||||
"\blue You take out all the bone chips in [target]'s brain with \the [tool].")
|
||||
var/obj/item/organ/brain/sponge = target.internal_organs_by_name["brain"]
|
||||
if (sponge)
|
||||
sponge.damage = 0
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, jabbing \the [tool] in [target]'s brain!", \
|
||||
"\red Your hand slips, jabbing \the [tool] in [target]'s brain!")
|
||||
target.apply_damage(30, BRUTE, "head", 1, sharp=1)
|
||||
|
||||
/datum/surgery_step/brain/hematoma
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/FixOVein = 100, \
|
||||
/obj/item/stack/cable_coil = 75
|
||||
)
|
||||
|
||||
priority = 3
|
||||
min_duration = 90
|
||||
max_duration = 110
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(!affected) return
|
||||
var/obj/item/organ/brain/sponge = target.internal_organs_by_name["brain"]
|
||||
return (sponge && sponge.damage > 20) && affected.open == 3
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts mending hematoma in [target]'s brain with \the [tool].", \
|
||||
"You start mending hematoma in [target]'s brain with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] mends hematoma in [target]'s brain with \the [tool].", \
|
||||
"\blue You mend hematoma in [target]'s brain with \the [tool].")
|
||||
var/obj/item/organ/brain/sponge = target.internal_organs_by_name["brain"]
|
||||
if (sponge)
|
||||
sponge.damage = 20
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, bruising [target]'s brain with \the [tool]!", \
|
||||
"\red Your hand slips, bruising [target]'s brain with \the [tool]!")
|
||||
target.apply_damage(20, BRUTE, "head", 1, sharp=1)
|
||||
@@ -12,7 +12,7 @@
|
||||
return 0
|
||||
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.encased && affected.open >= 2
|
||||
return affected && !(affected.status & ORGAN_ROBOT) && affected.encased && affected.open >= 2
|
||||
|
||||
|
||||
/datum/surgery_step/open_encased/saw
|
||||
|
||||
@@ -1,147 +0,0 @@
|
||||
//Procedures in this file: Eye mending surgery
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// EYE SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/eye
|
||||
priority = 2
|
||||
can_infect = 1
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if (!affected)
|
||||
return 0
|
||||
|
||||
var/obj/item/organ/eyes = target.internal_organs_by_name["eyes"]
|
||||
|
||||
return target_zone == "eyes" && eyes
|
||||
|
||||
/datum/surgery_step/eye/cut_open
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/scalpel = 100, \
|
||||
/obj/item/weapon/material/knife = 75, \
|
||||
/obj/item/weapon/material/shard = 50, \
|
||||
)
|
||||
|
||||
min_duration = 90
|
||||
max_duration = 110
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..()
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts to separate the corneas on [target]'s eyes with \the [tool].", \
|
||||
"You start to separate the corneas on [target]'s eyes with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] has separated the corneas on [target]'s eyes with \the [tool]." , \
|
||||
"\blue You have separated the corneas on [target]'s eyes with \the [tool].",)
|
||||
target.op_stage.eyes = 1
|
||||
target.blinded += 1.5
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/eyes/eyes = target.internal_organs_by_name["eyes"]
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, slicing [target]'s eyes wth \the [tool]!" , \
|
||||
"\red Your hand slips, slicing [target]'s eyes wth \the [tool]!" )
|
||||
affected.createwound(CUT, 10)
|
||||
eyes.take_damage(5, 0)
|
||||
|
||||
/datum/surgery_step/eye/lift_eyes
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/retractor = 100, \
|
||||
/obj/item/weapon/material/kitchen/utensil/fork = 50
|
||||
)
|
||||
|
||||
min_duration = 30
|
||||
max_duration = 40
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.op_stage.eyes == 1
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts lifting corneas from [target]'s eyes with \the [tool].", \
|
||||
"You start lifting corneas from [target]'s eyes with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] has lifted the corneas from [target]'s eyes from with \the [tool]." , \
|
||||
"\blue You has lifted the corneas from [target]'s eyes from with \the [tool]." )
|
||||
target.op_stage.eyes = 2
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/eyes/eyes = target.internal_organs_by_name["eyes"]
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, damaging [target]'s eyes with \the [tool]!", \
|
||||
"\red Your hand slips, damaging [target]'s eyes with \the [tool]!")
|
||||
target.apply_damage(10, BRUTE, affected)
|
||||
eyes.take_damage(5, 0)
|
||||
|
||||
/datum/surgery_step/eye/mend_eyes
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/hemostat = 100, \
|
||||
/obj/item/stack/cable_coil = 75, \
|
||||
/obj/item/device/assembly/mousetrap = 10 //I don't know. Don't ask me. But I'm leaving it because hilarity.
|
||||
)
|
||||
|
||||
min_duration = 80
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.op_stage.eyes == 2
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts mending the nerves and lenses in [target]'s eyes with \the [tool].", \
|
||||
"You start mending the nerves and lenses in [target]'s eyes with the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] mends the nerves and lenses in [target]'s with \the [tool]." , \
|
||||
"\blue You mend the nerves and lenses in [target]'s with \the [tool].")
|
||||
target.op_stage.eyes = 3
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/eyes/eyes = target.internal_organs_by_name["eyes"]
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, stabbing \the [tool] into [target]'s eye!", \
|
||||
"\red Your hand slips, stabbing \the [tool] into [target]'s eye!")
|
||||
target.apply_damage(10, BRUTE, affected, sharp=1)
|
||||
eyes.take_damage(5, 0)
|
||||
|
||||
/datum/surgery_step/eye/cauterize
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/cautery = 100, \
|
||||
/obj/item/clothing/mask/smokable/cigarette = 75, \
|
||||
/obj/item/weapon/flame/lighter = 50, \
|
||||
/obj/item/weapon/weldingtool = 25
|
||||
)
|
||||
|
||||
min_duration = 70
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..()
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] is beginning to cauterize the incision around [target]'s eyes with \the [tool]." , \
|
||||
"You are beginning to cauterize the incision around [target]'s eyes with \the [tool].")
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/eyes/eyes = target.internal_organs_by_name["eyes"]
|
||||
user.visible_message("\blue [user] cauterizes the incision around [target]'s eyes with \the [tool].", \
|
||||
"\blue You cauterize the incision around [target]'s eyes with \the [tool].")
|
||||
if (target.op_stage.eyes == 3)
|
||||
target.disabilities &= ~NEARSIGHTED
|
||||
target.sdisabilities &= ~BLIND
|
||||
eyes.damage = 0
|
||||
target.op_stage.eyes = 0
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/eyes/eyes = target.internal_organs_by_name["eyes"]
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, searing [target]'s eyes with \the [tool]!", \
|
||||
"\red Your hand slips, searing [target]'s eyes with \the [tool]!")
|
||||
target.apply_damage(5, BURN, affected)
|
||||
eyes.take_damage(5, 0)
|
||||
@@ -10,7 +10,7 @@
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if (!affected)
|
||||
if (!affected || (affected.status & ORGAN_ROBOT))
|
||||
return 0
|
||||
return target_zone == "mouth"
|
||||
|
||||
|
||||
@@ -32,6 +32,12 @@
|
||||
return "abdominal"
|
||||
return ""
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, scraping around inside [target]'s [affected.name] with \the [tool]!", \
|
||||
"\red Your hand slips, scraping around inside [target]'s [affected.name] with \the [tool]!")
|
||||
affected.createwound(CUT, 20)
|
||||
|
||||
/datum/surgery_step/cavity/make_space
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/surgicaldrill = 100, \
|
||||
@@ -60,12 +66,6 @@
|
||||
user.visible_message("\blue [user] makes some space inside [target]'s [get_cavity(affected)] cavity with \the [tool].", \
|
||||
"\blue You make some space inside [target]'s [get_cavity(affected)] cavity with \the [tool]." )
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.name] with \the [tool]!", \
|
||||
"\red Your hand slips, scraping tissue inside [target]'s [affected.name] with \the [tool]!")
|
||||
affected.createwound(CUT, 20)
|
||||
|
||||
/datum/surgery_step/cavity/close_space
|
||||
priority = 2
|
||||
allowed_tools = list(
|
||||
@@ -96,12 +96,6 @@
|
||||
user.visible_message("\blue [user] mends [target]'s [get_cavity(affected)] cavity walls with \the [tool].", \
|
||||
"\blue You mend [target]'s [get_cavity(affected)] cavity walls with \the [tool]." )
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.name] with \the [tool]!", \
|
||||
"\red Your hand slips, scraping tissue inside [target]'s [affected.name] with \the [tool]!")
|
||||
affected.createwound(CUT, 20)
|
||||
|
||||
/datum/surgery_step/cavity/place_item
|
||||
priority = 0
|
||||
allowed_tools = list(/obj/item = 100)
|
||||
@@ -126,7 +120,7 @@
|
||||
|
||||
user.visible_message("\blue [user] puts \the [tool] inside [target]'s [get_cavity(affected)] cavity.", \
|
||||
"\blue You put \the [tool] inside [target]'s [get_cavity(affected)] cavity." )
|
||||
if (tool.w_class > get_max_wclass(affected)/2 && prob(50))
|
||||
if (tool.w_class > get_max_wclass(affected)/2 && prob(50) && !(affected.status & ORGAN_ROBOT))
|
||||
user << "\red You tear some blood vessels trying to fit such a big object in this cavity."
|
||||
var/datum/wound/internal_bleeding/I = new (10)
|
||||
affected.wounds += I
|
||||
@@ -136,12 +130,6 @@
|
||||
tool.loc = target
|
||||
affected.cavity = 0
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.name] with \the [tool]!", \
|
||||
"\red Your hand slips, scraping tissue inside [target]'s [affected.name] with \the [tool]!")
|
||||
affected.createwound(CUT, 20)
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// IMPLANT/ITEM REMOVAL SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
@@ -162,9 +150,9 @@
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts poking around inside the incision on [target]'s [affected.name] with \the [tool].", \
|
||||
"You start poking around inside the incision on [target]'s [affected.name] with \the [tool]" )
|
||||
target.custom_pain("The pain in your chest is living hell!",1)
|
||||
user.visible_message("[user] starts poking around inside [target]'s [affected.name] with \the [tool].", \
|
||||
"You start poking around inside [target]'s [affected.name] with \the [tool]" )
|
||||
target.custom_pain("The pain in your [affected.name] is living hell!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
@@ -209,8 +197,8 @@
|
||||
user.visible_message("\blue [user] removes \the [tool] from [target]'s [affected.name].", \
|
||||
"\blue There's something inside [target]'s [affected.name], but you just missed it this time." )
|
||||
else if (affected.hidden)
|
||||
user.visible_message("\blue [user] takes something out of incision on [target]'s [affected.name] with \the [tool].", \
|
||||
"\blue You take something out of incision on [target]'s [affected.name]s with \the [tool]." )
|
||||
user.visible_message("\blue [user] takes something out of [target]'s [affected.name] with \the [tool].", \
|
||||
"\blue You take something out of [target]'s [affected.name]s with \the [tool]." )
|
||||
affected.hidden.loc = get_turf(target)
|
||||
if(!affected.hidden.blood_DNA)
|
||||
affected.hidden.blood_DNA = list()
|
||||
@@ -223,10 +211,8 @@
|
||||
"\blue You could not find anything inside [target]'s [affected.name]." )
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
..()
|
||||
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.name] with \the [tool]!", \
|
||||
"\red Your hand slips, scraping tissue inside [target]'s [affected.name] with \the [tool]!")
|
||||
affected.createwound(CUT, 20)
|
||||
if (affected.implants.len)
|
||||
var/fail_prob = 10
|
||||
fail_prob += 100 - tool_quality(tool)
|
||||
|
||||
@@ -138,75 +138,6 @@
|
||||
if(I && I.damage > 0)
|
||||
I.take_damage(dam_amt,0)
|
||||
|
||||
/datum/surgery_step/internal/fix_organ_robotic //For artificial organs
|
||||
allowed_tools = list(
|
||||
/obj/item/stack/nanopaste = 100, \
|
||||
/obj/item/weapon/bonegel = 30, \
|
||||
/obj/item/weapon/screwdriver = 70, \
|
||||
)
|
||||
|
||||
min_duration = 70
|
||||
max_duration = 90
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(!affected) return
|
||||
var/is_organ_damaged = 0
|
||||
for(var/obj/item/organ/I in affected.internal_organs)
|
||||
if(I.damage > 0 && I.robotic >= 2)
|
||||
is_organ_damaged = 1
|
||||
break
|
||||
return ..() && is_organ_damaged
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
for(var/obj/item/organ/I in affected.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
if(I.robotic >= 2)
|
||||
user.visible_message("[user] starts mending the damage to [target]'s [I.name]'s mechanisms.", \
|
||||
"You start mending the damage to [target]'s [I.name]'s mechanisms." )
|
||||
|
||||
target.custom_pain("The pain in your [affected.name] is living hell!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
for(var/obj/item/organ/I in affected.internal_organs)
|
||||
|
||||
if(I && I.damage > 0)
|
||||
if(I.robotic >= 2)
|
||||
user.visible_message("\blue [user] repairs [target]'s [I.name] with [tool].", \
|
||||
"\blue You repair [target]'s [I.name] with [tool]." )
|
||||
I.damage = 0
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
user.visible_message("\red [user]'s hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!", \
|
||||
"\red Your hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!")
|
||||
|
||||
target.adjustToxLoss(5)
|
||||
affected.createwound(CUT, 5)
|
||||
|
||||
for(var/obj/item/organ/I in affected.internal_organs)
|
||||
if(I)
|
||||
I.take_damage(rand(3,5),0)
|
||||
|
||||
|
||||
/datum/surgery_step/internal/detatch_organ
|
||||
|
||||
allowed_tools = list(
|
||||
@@ -223,12 +154,17 @@
|
||||
if (!..())
|
||||
return 0
|
||||
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
if(!(affected && !(affected.status & ORGAN_ROBOT)))
|
||||
return 0
|
||||
|
||||
target.op_stage.current_organ = null
|
||||
|
||||
var/list/attached_organs = list()
|
||||
for(var/organ in target.internal_organs_by_name)
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[organ]
|
||||
if(I && !I.status && I.parent_organ == target_zone)
|
||||
if(I && !(I.status & ORGAN_CUT_AWAY) && I.parent_organ == target_zone)
|
||||
attached_organs |= organ
|
||||
|
||||
var/organ_to_remove = input(user, "Which organ do you want to prepare for removal?") as null|anything in attached_organs
|
||||
@@ -283,7 +219,7 @@
|
||||
var/list/removable_organs = list()
|
||||
for(var/organ in target.internal_organs_by_name)
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[organ]
|
||||
if(I.status & ORGAN_CUT_AWAY && I.parent_organ == target_zone)
|
||||
if((I.status & ORGAN_CUT_AWAY) && I.parent_organ == target_zone)
|
||||
removable_organs |= organ
|
||||
|
||||
var/organ_to_remove = input(user, "Which organ do you want to remove?") as null|anything in removable_organs
|
||||
@@ -312,8 +248,8 @@
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!", \
|
||||
"\red Your hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!")
|
||||
user.visible_message("\red [user]'s hand slips, damaging [target]'s [affected.name] with \the [tool]!", \
|
||||
"\red Your hand slips, damaging [target]'s [affected.name] with \the [tool]!")
|
||||
affected.createwound(BRUISE, 20)
|
||||
|
||||
/datum/surgery_step/internal/replace_organ
|
||||
@@ -335,6 +271,10 @@
|
||||
if(!istype(O))
|
||||
return 0
|
||||
|
||||
if((affected.status & ORGAN_ROBOT) && !(O.status & ORGAN_ROBOT))
|
||||
user << "<span class='danger'>You cannot install a naked organ into a robotic body.</span>"
|
||||
return 2
|
||||
|
||||
if(!target.species)
|
||||
user << "\red You have no idea what species this person is. Report this on the bug tracker."
|
||||
return 2
|
||||
@@ -410,7 +350,7 @@
|
||||
var/list/removable_organs = list()
|
||||
for(var/organ in target.internal_organs_by_name)
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[organ]
|
||||
if(I && I.status & ORGAN_CUT_AWAY && I.parent_organ == target_zone)
|
||||
if(I && (I.status & ORGAN_CUT_AWAY) && !(I.status & ORGAN_ROBOT) && I.parent_organ == target_zone)
|
||||
removable_organs |= organ
|
||||
|
||||
var/organ_to_replace = input(user, "Which organ do you want to reattach?") as null|anything in removable_organs
|
||||
|
||||
@@ -0,0 +1,417 @@
|
||||
//Procedures in this file: Gneric surgery steps
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// COMMON STEPS //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/robotics/
|
||||
can_infect = 0
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (isslime(target))
|
||||
return 0
|
||||
if (target_zone == "eyes") //there are specific steps for eye surgery
|
||||
return 0
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if (affected == null)
|
||||
return 0
|
||||
if (affected.status & ORGAN_DESTROYED)
|
||||
return 0
|
||||
if (!(affected.status & ORGAN_ROBOT))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/surgery_step/robotics/unscrew_hatch
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/screwdriver = 100,
|
||||
/obj/item/weapon/coin = 50,
|
||||
/obj/item/weapon/material/kitchen/utensil/knife = 50
|
||||
)
|
||||
|
||||
min_duration = 90
|
||||
max_duration = 110
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.open == 0 && target_zone != "mouth"
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts to unscrew the maintenance hatch on [target]'s [affected.name] with \the [tool].", \
|
||||
"You start to unscrew the maintenance hatch on [target]'s [affected.name] with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\blue [user] has opened the maintenance hatch on [target]'s [affected.name] with \the [tool].", \
|
||||
"\blue You have opened the maintenance hatch on [target]'s [affected.name] with \the [tool].",)
|
||||
affected.open = 1
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s [tool.name] slips, failing to unscrew [target]'s [affected.name].", \
|
||||
"\red Your [tool] slips, failing to unscrew [target]'s [affected.name].")
|
||||
|
||||
/datum/surgery_step/robotics/open_hatch
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/retractor = 100,
|
||||
/obj/item/weapon/crowbar = 100,
|
||||
/obj/item/weapon/material/kitchen/utensil = 50
|
||||
)
|
||||
|
||||
min_duration = 30
|
||||
max_duration = 40
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.open == 1
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts to pry open the maintenance hatch on [target]'s [affected.name] with \the [tool].",
|
||||
"You start to pry open the maintenance hatch on [target]'s [affected.name] with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\blue [user] open the maintenance hatch on [target]'s [affected.name] with \the [tool].", \
|
||||
"\blue You open the maintenance hatch on [target]'s [affected.name] with \the [tool]." )
|
||||
affected.open = 2
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s [tool.name] slips, failing to open the hatch on [target]'s [affected.name].",
|
||||
"\red Your [tool] slips, failing to open the hatch on [target]'s [affected.name].")
|
||||
|
||||
/datum/surgery_step/robotics/close_hatch
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/retractor = 100,
|
||||
/obj/item/weapon/crowbar = 100,
|
||||
/obj/item/weapon/material/kitchen/utensil = 50
|
||||
)
|
||||
|
||||
min_duration = 70
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.open && target_zone != "mouth"
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] begins to close and secure the hatch on [target]'s [affected.name] with \the [tool]." , \
|
||||
"You begin to close and secure the hatch on [target]'s [affected.name] with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\blue [user] closes and secures the hatch on [target]'s [affected.name] with \the [tool].", \
|
||||
"\blue You close and secure the hatch on [target]'s [affected.name] with \the [tool].")
|
||||
affected.open = 0
|
||||
affected.germ_level = 0
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s [tool.name] slips, failing to close the hatch on [target]'s [affected.name].",
|
||||
"\red Your [tool.name] slips, failing to close the hatch on [target]'s [affected.name].")
|
||||
|
||||
/datum/surgery_step/robotics/repair_brute
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/weldingtool = 100,
|
||||
/obj/item/weapon/pickaxe/plasmacutter = 50
|
||||
)
|
||||
|
||||
min_duration = 50
|
||||
max_duration = 60
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.open && affected.brute_dam > 0 && target_zone != "mouth"
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] begins to patch damage to [target]'s [affected.name]'s support structure with \the [tool]." , \
|
||||
"You begin to patch damage to [target]'s [affected.name]'s support structure with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\blue [user] finishes patching damage to [target]'s [affected.name] with \the [tool].", \
|
||||
"\blue You finish patching damage to [target]'s [affected.name] with \the [tool].")
|
||||
affected.heal_damage(rand(30,50),0)
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s [tool.name] slips, damaging the internal structure of [target]'s [affected.name].",
|
||||
"\red Your [tool.name] slips, damaging the internal structure of [target]'s [affected.name].")
|
||||
target.apply_damage(rand(5,10), BURN, affected)
|
||||
|
||||
/datum/surgery_step/robotics/repair_burn
|
||||
allowed_tools = list(
|
||||
/obj/item/stack/cable_coil = 100
|
||||
)
|
||||
|
||||
min_duration = 50
|
||||
max_duration = 60
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.open && affected.burn_dam > 0 && target_zone != "mouth"
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] begins to splice new cabling into [target]'s [affected.name]." , \
|
||||
"You begin to splice new cabling into [target]'s [affected.name].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\blue [user] finishes splicing cable into [target]'s [affected.name].", \
|
||||
"\blue You finishes splicing new cable into [target]'s [affected.name].")
|
||||
affected.heal_damage(0,rand(30,50))
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user] causes a short circuit in [target]'s [affected.name]!",
|
||||
"\red You cause a short circuit in [target]'s [affected.name]!")
|
||||
target.apply_damage(rand(5,10), BURN, affected)
|
||||
|
||||
/datum/surgery_step/robotics/fix_organ_robotic //For artificial organs
|
||||
allowed_tools = list(
|
||||
/obj/item/stack/nanopaste = 100, \
|
||||
/obj/item/weapon/bonegel = 30, \
|
||||
/obj/item/weapon/screwdriver = 70, \
|
||||
)
|
||||
|
||||
min_duration = 70
|
||||
max_duration = 90
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(!affected) return
|
||||
var/is_organ_damaged = 0
|
||||
for(var/obj/item/organ/I in affected.internal_organs)
|
||||
if(I.damage > 0 && I.robotic >= 2)
|
||||
is_organ_damaged = 1
|
||||
break
|
||||
return affected.open == 2 && is_organ_damaged
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
for(var/obj/item/organ/I in affected.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
if(I.robotic >= 2)
|
||||
user.visible_message("[user] starts mending the damage to [target]'s [I.name]'s mechanisms.", \
|
||||
"You start mending the damage to [target]'s [I.name]'s mechanisms." )
|
||||
|
||||
target.custom_pain("The pain in your [affected.name] is living hell!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
for(var/obj/item/organ/I in affected.internal_organs)
|
||||
|
||||
if(I && I.damage > 0)
|
||||
if(I.robotic >= 2)
|
||||
user.visible_message("\blue [user] repairs [target]'s [I.name] with [tool].", \
|
||||
"\blue You repair [target]'s [I.name] with [tool]." )
|
||||
I.damage = 0
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
user.visible_message("\red [user]'s hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!", \
|
||||
"\red Your hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!")
|
||||
|
||||
target.adjustToxLoss(5)
|
||||
affected.createwound(CUT, 5)
|
||||
|
||||
for(var/obj/item/organ/I in affected.internal_organs)
|
||||
if(I)
|
||||
I.take_damage(rand(3,5),0)
|
||||
|
||||
/datum/surgery_step/robotics/detatch_organ_robotic
|
||||
|
||||
allowed_tools = list(
|
||||
/obj/item/device/multitool = 100
|
||||
)
|
||||
|
||||
min_duration = 90
|
||||
max_duration = 110
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(!(affected && (affected.status & ORGAN_ROBOT)))
|
||||
return 0
|
||||
if(affected.open != 2)
|
||||
return 0
|
||||
|
||||
target.op_stage.current_organ = null
|
||||
|
||||
var/list/attached_organs = list()
|
||||
for(var/organ in target.internal_organs_by_name)
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[organ]
|
||||
if(I && !(I.status & ORGAN_CUT_AWAY) && I.parent_organ == target_zone)
|
||||
attached_organs |= organ
|
||||
|
||||
var/organ_to_remove = input(user, "Which organ do you want to prepare for removal?") as null|anything in attached_organs
|
||||
if(!organ_to_remove)
|
||||
return 0
|
||||
|
||||
target.op_stage.current_organ = organ_to_remove
|
||||
|
||||
return ..() && organ_to_remove
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts to decouple [target]'s [target.op_stage.current_organ] with \the [tool].", \
|
||||
"You start to decouple [target]'s [target.op_stage.current_organ] with \the [tool]." )
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] has decoupled [target]'s [target.op_stage.current_organ] with \the [tool]." , \
|
||||
"\blue You have decoupled [target]'s [target.op_stage.current_organ] with \the [tool].")
|
||||
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
if(I && istype(I))
|
||||
I.status |= ORGAN_CUT_AWAY
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, disconnecting \the [tool].", \
|
||||
"\red Your hand slips, disconnecting \the [tool].")
|
||||
|
||||
/datum/surgery_step/robotics/attach_organ_robotic
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/screwdriver = 100,
|
||||
)
|
||||
|
||||
min_duration = 100
|
||||
max_duration = 120
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(!(affected && (affected.status & ORGAN_ROBOT)))
|
||||
return 0
|
||||
if(affected.open != 2)
|
||||
return 0
|
||||
|
||||
target.op_stage.current_organ = null
|
||||
|
||||
var/list/removable_organs = list()
|
||||
for(var/organ in target.internal_organs_by_name)
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[organ]
|
||||
if(I && (I.status & ORGAN_CUT_AWAY) && (I.status & ORGAN_ROBOT) && I.parent_organ == target_zone)
|
||||
removable_organs |= organ
|
||||
|
||||
var/organ_to_replace = input(user, "Which organ do you want to reattach?") as null|anything in removable_organs
|
||||
if(!organ_to_replace)
|
||||
return 0
|
||||
|
||||
target.op_stage.current_organ = organ_to_replace
|
||||
return ..()
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] begins reattaching [target]'s [target.op_stage.current_organ] with \the [tool].", \
|
||||
"You start reattaching [target]'s [target.op_stage.current_organ] with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] has reattached [target]'s [target.op_stage.current_organ] with \the [tool]." , \
|
||||
"\blue You have reattached [target]'s [target.op_stage.current_organ] with \the [tool].")
|
||||
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
if(I && istype(I))
|
||||
I.status &= ~ORGAN_CUT_AWAY
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, disconnecting \the [tool].", \
|
||||
"\red Your hand slips, disconnecting \the [tool].")
|
||||
|
||||
/datum/surgery_step/robotics/install_mmi
|
||||
allowed_tools = list(
|
||||
/obj/item/device/mmi = 100
|
||||
)
|
||||
|
||||
min_duration = 60
|
||||
max_duration = 80
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if(target_zone != "head")
|
||||
return
|
||||
|
||||
var/obj/item/device/mmi/M = tool
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(!(affected && affected.open == 2))
|
||||
return 0
|
||||
|
||||
if(!istype(M))
|
||||
return 0
|
||||
|
||||
if(!M.brainmob || !M.brainmob.client || !M.brainmob.ckey || M.brainmob.stat >= DEAD)
|
||||
user << "<span class='danger'>That brain is not usable.</span>"
|
||||
return 2
|
||||
|
||||
if(!(affected.status & ORGAN_ROBOT))
|
||||
user << "<span class='danger'>You cannot install a computer brain into a meat skull.</span>"
|
||||
return 2
|
||||
|
||||
if(!target.species)
|
||||
user << "<span class='danger'>You have no idea what species this person is. Report this on the bug tracker.</span>"
|
||||
return 2
|
||||
|
||||
if(!target.species.has_organ["brain"])
|
||||
user << "<span class='danger'>You're pretty sure [target.species.name_plural] don't normally have a brain.</span>"
|
||||
return 2
|
||||
|
||||
if(!isnull(target.internal_organs["brain"]))
|
||||
user << "<span class='danger'>Your subject already has a brain.</span>"
|
||||
return 2
|
||||
|
||||
return 1
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts installing \the [tool] into [target]'s [affected.name].", \
|
||||
"You start installing \the [tool] into [target]'s [affected.name].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\blue [user] has installed \the [tool] into [target]'s [affected.name].", \
|
||||
"\blue You have installed \the [tool] into [target]'s [affected.name].")
|
||||
|
||||
var/obj/item/device/mmi/M = tool
|
||||
var/obj/item/organ/mmi_holder/holder = new(target, 1)
|
||||
target.internal_organs_by_name["brain"] = holder
|
||||
user.drop_from_inventory(tool)
|
||||
tool.loc = holder
|
||||
holder.stored_mmi = tool
|
||||
holder.update_from_mmi()
|
||||
|
||||
if(M.brainmob && M.brainmob.mind)
|
||||
M.brainmob.mind.transfer_to(target)
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips.", \
|
||||
"\red Your hand slips.")
|
||||
@@ -16,7 +16,7 @@
|
||||
var/mob/living/carbon/C = M
|
||||
if (istype(C,/mob/living/carbon/human/))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(H.species && H.species.flags & NO_BLOOD)
|
||||
if(H.species.flags & NO_BLOOD)
|
||||
report("Scan aborted: The target does not have blood.", user)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user