mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 12:13:06 +00:00
@@ -1154,10 +1154,19 @@
|
|||||||
#include "code\modules\scripting\Scanner\Tokens.dm"
|
#include "code\modules\scripting\Scanner\Tokens.dm"
|
||||||
#include "code\modules\security levels\keycard authentication.dm"
|
#include "code\modules\security levels\keycard authentication.dm"
|
||||||
#include "code\modules\security levels\security levels.dm"
|
#include "code\modules\security levels\security levels.dm"
|
||||||
|
#include "code\modules\surgery\appendix.dm"
|
||||||
|
#include "code\modules\surgery\bones.dm"
|
||||||
|
#include "code\modules\surgery\braincore.dm"
|
||||||
|
#include "code\modules\surgery\eye.dm"
|
||||||
|
#include "code\modules\surgery\face.dm"
|
||||||
|
#include "code\modules\surgery\generic.dm"
|
||||||
|
#include "code\modules\surgery\other.dm"
|
||||||
|
#include "code\modules\surgery\ribcage.dm"
|
||||||
|
#include "code\modules\surgery\robolimbs.dm"
|
||||||
|
#include "code\modules\surgery\surgery.dm"
|
||||||
#include "code\WorkInProgress\autopsy.dm"
|
#include "code\WorkInProgress\autopsy.dm"
|
||||||
#include "code\WorkInProgress\buildmode.dm"
|
#include "code\WorkInProgress\buildmode.dm"
|
||||||
#include "code\WorkInProgress\explosion_particles.dm"
|
#include "code\WorkInProgress\explosion_particles.dm"
|
||||||
#include "code\WorkInProgress\surgery.dm"
|
|
||||||
#include "code\WorkInProgress\Cael_Aislinn\energy_field.dm"
|
#include "code\WorkInProgress\Cael_Aislinn\energy_field.dm"
|
||||||
#include "code\WorkInProgress\Cael_Aislinn\external_shield_gen.dm"
|
#include "code\WorkInProgress\Cael_Aislinn\external_shield_gen.dm"
|
||||||
#include "code\WorkInProgress\Cael_Aislinn\meteor_battery.dm"
|
#include "code\WorkInProgress\Cael_Aislinn\meteor_battery.dm"
|
||||||
|
|||||||
@@ -2,10 +2,18 @@
|
|||||||
//moved these here from code/defines/obj/weapon.dm
|
//moved these here from code/defines/obj/weapon.dm
|
||||||
//please preference put stuff where it's easy to find - C
|
//please preference put stuff where it's easy to find - C
|
||||||
|
|
||||||
/obj/item/weapon/autopsy_scanner/var/list/datum/autopsy_data_scanner/wdata = list()
|
/obj/item/weapon/autopsy_scanner
|
||||||
/obj/item/weapon/autopsy_scanner/var/list/datum/autopsy_data_scanner/chemtraces = list()
|
name = "autopsy scanner"
|
||||||
/obj/item/weapon/autopsy_scanner/var/target_name = null
|
desc = "Extracts information on wounds."
|
||||||
/obj/item/weapon/autopsy_scanner/var/timeofdeath = null
|
icon = 'icons/obj/autopsy_scanner.dmi'
|
||||||
|
icon_state = ""
|
||||||
|
flags = FPRINT | TABLEPASS | CONDUCT
|
||||||
|
w_class = 1.0
|
||||||
|
origin_tech = "materials=1;biotech=1"
|
||||||
|
var/list/datum/autopsy_data_scanner/wdata = list()
|
||||||
|
var/list/datum/autopsy_data_scanner/chemtraces = list()
|
||||||
|
var/target_name = null
|
||||||
|
var/timeofdeath = null
|
||||||
|
|
||||||
/datum/autopsy_data_scanner
|
/datum/autopsy_data_scanner
|
||||||
var/weapon = null // this is the DEFINITE weapon type that was used
|
var/weapon = null // this is the DEFINITE weapon type that was used
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -148,7 +148,7 @@ proc/Airflow(zone/A, zone/B)
|
|||||||
|
|
||||||
//Check for knocking people over
|
//Check for knocking people over
|
||||||
if(ismob(M) && n > vsc.airflow_stun_pressure)
|
if(ismob(M) && n > vsc.airflow_stun_pressure)
|
||||||
if(M:nodamage) continue
|
if(M:status_flags & GODMODE) continue
|
||||||
M:airflow_stun()
|
M:airflow_stun()
|
||||||
|
|
||||||
if(M.check_airflow_movable(n))
|
if(M.check_airflow_movable(n))
|
||||||
@@ -242,7 +242,7 @@ atom/movable
|
|||||||
if(airflow_dest == loc)
|
if(airflow_dest == loc)
|
||||||
step_away(src,loc)
|
step_away(src,loc)
|
||||||
if(ismob(src))
|
if(ismob(src))
|
||||||
if(src:nodamage)
|
if(src:status_flags & GODMODE)
|
||||||
return
|
return
|
||||||
if(istype(src, /mob/living/carbon/human))
|
if(istype(src, /mob/living/carbon/human))
|
||||||
if(src:buckled)
|
if(src:buckled)
|
||||||
@@ -307,7 +307,7 @@ atom/movable
|
|||||||
if(airflow_dest == loc)
|
if(airflow_dest == loc)
|
||||||
step_away(src,loc)
|
step_away(src,loc)
|
||||||
if(ismob(src))
|
if(ismob(src))
|
||||||
if(src:nodamage)
|
if(src:status_flags & GODMODE)
|
||||||
return
|
return
|
||||||
if(istype(src, /mob/living/carbon/human))
|
if(istype(src, /mob/living/carbon/human))
|
||||||
if(src:buckled)
|
if(src:buckled)
|
||||||
|
|||||||
@@ -224,6 +224,7 @@
|
|||||||
|
|
||||||
proc/clamp()
|
proc/clamp()
|
||||||
var/rval = 0
|
var/rval = 0
|
||||||
|
src.status &= ~ORGAN_BLEEDING
|
||||||
for(var/datum/wound/W in wounds)
|
for(var/datum/wound/W in wounds)
|
||||||
if(W.internal) continue
|
if(W.internal) continue
|
||||||
rval |= !W.clamped
|
rval |= !W.clamped
|
||||||
@@ -610,6 +611,7 @@
|
|||||||
|
|
||||||
take_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list())
|
take_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list())
|
||||||
..(brute, burn, sharp, used_weapon, forbidden_limbs)
|
..(brute, burn, sharp, used_weapon, forbidden_limbs)
|
||||||
|
if (!disfigured)
|
||||||
if (brute_dam > 40)
|
if (brute_dam > 40)
|
||||||
if (prob(50))
|
if (prob(50))
|
||||||
disfigure("brute")
|
disfigure("brute")
|
||||||
|
|||||||
@@ -123,7 +123,7 @@
|
|||||||
else
|
else
|
||||||
spawn(0)
|
spawn(0)
|
||||||
close()
|
close()
|
||||||
|
return
|
||||||
var/access_granted = 0
|
var/access_granted = 0
|
||||||
var/users_name
|
var/users_name
|
||||||
if(!istype(C, /obj)) //If someone hit it with their hand. We need to see if they are allowed.
|
if(!istype(C, /obj)) //If someone hit it with their hand. We need to see if they are allowed.
|
||||||
|
|||||||
@@ -210,19 +210,8 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
if (can_operate(M)) //Checks if mob is lying down on table for surgery
|
if (can_operate(M)) //Checks if mob is lying down on table for surgery
|
||||||
if(istype(M,/mob/living/carbon))
|
if (do_surgery(M,user,src))
|
||||||
if (user.a_intent != "harm") //check for Hippocratic Oath
|
return
|
||||||
if(surgery_steps.len == 0) build_surgery_steps_list()
|
|
||||||
for(var/datum/surgery_step/S in surgery_steps)
|
|
||||||
if( S.isright(src) || S.isacceptable(src) ) //check if tool is right or close enough
|
|
||||||
if(S.can_use(user, M, user.zone_sel.selecting, src)) //and if this step is possible
|
|
||||||
S.begin_step(user, M, user.zone_sel.selecting, src) //start on it
|
|
||||||
if(do_mob(user, M, rand(S.min_duration, S.max_duration))) //if user did nto move or changed hands
|
|
||||||
S.end_step(user, M, user.zone_sel.selecting, src) //finish successfully
|
|
||||||
else //or
|
|
||||||
S.fail_step(user, M, user.zone_sel.selecting, src) //malpractice~
|
|
||||||
return //don't want to do weapony things after surgery
|
|
||||||
|
|
||||||
|
|
||||||
var/messagesource = M
|
var/messagesource = M
|
||||||
|
|
||||||
|
|||||||
@@ -2,12 +2,6 @@
|
|||||||
gender = MALE
|
gender = MALE
|
||||||
var/list/stomach_contents = list()
|
var/list/stomach_contents = list()
|
||||||
var/brain_op_stage = 0.0
|
var/brain_op_stage = 0.0
|
||||||
var/ribcage_op_stage = 0
|
|
||||||
var/alien_op_stage = 0.0
|
|
||||||
/*
|
|
||||||
var/eye_op_stage = 0.0
|
|
||||||
var/appendix_op_stage = 0.0
|
|
||||||
*/
|
|
||||||
var/datum/disease2/disease/virus2 = null
|
var/datum/disease2/disease/virus2 = null
|
||||||
var/list/datum/disease2/disease/resistances2 = list()
|
var/list/datum/disease2/disease/resistances2 = list()
|
||||||
var/antibodies = 0
|
var/antibodies = 0
|
||||||
@@ -22,3 +16,5 @@
|
|||||||
var/number_wounds = 0
|
var/number_wounds = 0
|
||||||
var/obj/item/handcuffed = null //Whether or not the mob is handcuffed
|
var/obj/item/handcuffed = null //Whether or not the mob is handcuffed
|
||||||
var/obj/item/legcuffed = null //Same as handcuffs but for legs. Bear traps use this.
|
var/obj/item/legcuffed = null //Same as handcuffs but for legs. Bear traps use this.
|
||||||
|
//Surgery info
|
||||||
|
var/datum/surgery_status/op_stage = new/datum/surgery_status
|
||||||
|
|||||||
80
code/modules/surgery/appendix.dm
Normal file
80
code/modules/surgery/appendix.dm
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
//Procedures in this file: Appendectomy
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
// APPENDECTOMY //
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/datum/surgery_step/appendectomy/
|
||||||
|
can_infect = 1
|
||||||
|
blood_level = 1
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
if (target_zone != "groin")
|
||||||
|
return 0
|
||||||
|
var/datum/organ/external/groin = target.get_organ("groin")
|
||||||
|
if (!groin)
|
||||||
|
return 0
|
||||||
|
if (groin.open < 2)
|
||||||
|
return 0
|
||||||
|
return 1
|
||||||
|
|
||||||
|
/datum/surgery_step/appendectomy/cut_appendix
|
||||||
|
required_tool = /obj/item/weapon/scalpel
|
||||||
|
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
|
||||||
|
|
||||||
|
min_duration = 70
|
||||||
|
max_duration = 90
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
return ..() && target.op_stage.appendix == 0
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("[user] starts to separating [target]'s appendix from the abdominal wall with \the [tool].", \
|
||||||
|
"You start to separating [target]'s appendix from the abdominal wall with \the [tool]." )
|
||||||
|
target.custom_pain("The pain in your abdomen is living hell!",1)
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("\blue [user] has separated [target]'s appendix with \the [tool]." , \
|
||||||
|
"\blue You have separated [target]'s appendix with \the [tool].")
|
||||||
|
target.op_stage.appendix = 1
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/groin = target.get_organ("groin")
|
||||||
|
user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s abdomen with \the [tool]!", \
|
||||||
|
"\red Your hand slips, slicing an artery inside [target]'s abdomen with \the [tool]!")
|
||||||
|
groin.createwound(CUT, 50, 1)
|
||||||
|
|
||||||
|
/datum/surgery_step/appendectomy/remove_appendix
|
||||||
|
required_tool = /obj/item/weapon/hemostat
|
||||||
|
allowed_tools = list(/obj/item/weapon/wirecutters)
|
||||||
|
|
||||||
|
min_duration = 60
|
||||||
|
max_duration = 80
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
return ..() && target.op_stage.appendix == 1
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("[user] starts removing [target]'s appendix with \the [tool].", \
|
||||||
|
"You start removing [target]'s appendix with \the [tool].")
|
||||||
|
target.custom_pain("Someone's ripping out your bowels!",1)
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("\blue [user] has removed [target]'s appendix with \the [tool].", \
|
||||||
|
"\blue You have removed [target]'s appendix with \the [tool].")
|
||||||
|
var/app = 0
|
||||||
|
for(var/datum/disease/appendicitis/appendicitis in target.viruses)
|
||||||
|
app = 1
|
||||||
|
appendicitis.cure()
|
||||||
|
target.resistances += appendicitis
|
||||||
|
if (app)
|
||||||
|
new /obj/item/weapon/reagent_containers/food/snacks/appendix/inflamed(get_turf(target))
|
||||||
|
else
|
||||||
|
new /obj/item/weapon/reagent_containers/food/snacks/appendix(get_turf(target))
|
||||||
|
target.op_stage.appendix = 2
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\red [user]'s hand slips, nicking internal organs in [target]'s abdomen with \the [tool]!", \
|
||||||
|
"\red Your hand slips, nicking internal organs in [target]'s abdomen with \the [tool]!")
|
||||||
|
affected.createwound(BRUISE, 20)
|
||||||
134
code/modules/surgery/bones.dm
Normal file
134
code/modules/surgery/bones.dm
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
//Procedures in this file: Fracture repair surgery
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
// BONE SURGERY //
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/datum/surgery_step/glue_bone
|
||||||
|
required_tool = /obj/item/weapon/bonegel
|
||||||
|
allowed_tools = list(/obj/item/weapon/screwdriver)
|
||||||
|
can_infect = 1
|
||||||
|
blood_level = 1
|
||||||
|
|
||||||
|
min_duration = 50
|
||||||
|
max_duration = 60
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
return affected.open == 2 && affected.stage == 0
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
if (affected.stage == 0)
|
||||||
|
user.visible_message("[user] starts applying medication to the damaged bones in [target]'s [affected.display_name] with \the [tool]." , \
|
||||||
|
"You start applying medication to the damaged bones in [target]'s [affected.display_name] with \the [tool].")
|
||||||
|
target.custom_pain("Something in your [affected.display_name] is causing you a lot of pain!",1)
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\blue [user] applies some [tool] to [target]'s bone in [affected.display_name]", \
|
||||||
|
"\blue You apply some [tool] to [target]'s bone in [affected.display_name] with \the [tool].")
|
||||||
|
affected.stage = 1
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!" , \
|
||||||
|
"\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!")
|
||||||
|
|
||||||
|
/datum/surgery_step/set_bone
|
||||||
|
required_tool = /obj/item/weapon/bonesetter
|
||||||
|
allowed_tools = list(/obj/item/weapon/wrench)
|
||||||
|
|
||||||
|
min_duration = 60
|
||||||
|
max_duration = 70
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
return affected.name != "head" && affected.open == 2 && affected.stage == 1
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("[user] is beginning to set the bone in [target]'s [affected.display_name] in place with \the [tool]." , \
|
||||||
|
"You are beginning to set the bone in [target]'s [affected.display_name] in place with \the [tool].")
|
||||||
|
target.custom_pain("The pain in your [affected.display_name] is going to make you pass out!",1)
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
if (affected.status & ORGAN_BROKEN)
|
||||||
|
user.visible_message("\blue [user] sets the bone in [target]'s [affected.display_name] in place with \the [tool].", \
|
||||||
|
"\blue You set the bone in [target]'s [affected.display_name] in place with \the [tool].")
|
||||||
|
affected.stage = 2
|
||||||
|
else
|
||||||
|
user.visible_message("\blue [user] sets the bone in [target]'s [affected.display_name]\red in the WRONG place with \the [tool].", \
|
||||||
|
"\blue You set the bone in [target]'s [affected.display_name]\red in the WRONG place with \the [tool].")
|
||||||
|
affected.fracture()
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\red [user]'s hand slips, damaging the bone in [target]'s [affected.display_name] with \the [tool]!" , \
|
||||||
|
"\red Your hand slips, damaging the bone in [target]'s [affected.display_name] with \the [tool]!")
|
||||||
|
affected.createwound(BRUISE, 5)
|
||||||
|
|
||||||
|
/datum/surgery_step/mend_skull
|
||||||
|
required_tool = /obj/item/weapon/bonesetter
|
||||||
|
allowed_tools = list(/obj/item/weapon/wrench)
|
||||||
|
|
||||||
|
min_duration = 60
|
||||||
|
max_duration = 70
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
return affected.name == "head" && 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 piece together [target]'s skull with \the [tool]." , \
|
||||||
|
"You are beginning piece together [target]'s skull with \the [tool].")
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\blue [user] sets [target]'s skull with \the [tool]." , \
|
||||||
|
"\blue You set [target]'s skull with \the [tool].")
|
||||||
|
affected.stage = 2
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\red [user]'s hand slips, damaging [target]'s face with \the [tool]!" , \
|
||||||
|
"\red Your hand slips, damaging [target]'s face with \the [tool]!")
|
||||||
|
var/datum/organ/external/head/h = affected
|
||||||
|
h.createwound(BRUISE, 10)
|
||||||
|
h.disfigured = 1
|
||||||
|
|
||||||
|
/datum/surgery_step/finish_bone
|
||||||
|
required_tool = /obj/item/weapon/bonegel
|
||||||
|
allowed_tools = list(/obj/item/weapon/screwdriver)
|
||||||
|
can_infect = 1
|
||||||
|
blood_level = 1
|
||||||
|
|
||||||
|
min_duration = 50
|
||||||
|
max_duration = 60
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
return affected.open == 2 && affected.stage == 2
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("[user] starts to finish mending the damaged bones in [target]'s [affected.display_name] with \the [tool].", \
|
||||||
|
"You start to finish mending the damaged bones in [target]'s [affected.display_name] with \the [tool].")
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\blue [user] has mended the damaged bones in [target]'s [affected.display_name] with \the [tool]." , \
|
||||||
|
"\blue You have mended the damaged bones in [target]'s [affected.display_name] with \the [tool]." )
|
||||||
|
affected.status &= ~ORGAN_BROKEN
|
||||||
|
affected.status &= ~ORGAN_SPLINTED
|
||||||
|
affected.stage = 0
|
||||||
|
affected.perma_injury = 0
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!" , \
|
||||||
|
"\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!")
|
||||||
180
code/modules/surgery/braincore.dm
Normal file
180
code/modules/surgery/braincore.dm
Normal file
@@ -0,0 +1,180 @@
|
|||||||
|
//Procedures in this file: Brain extraction. slime Core extraction.
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
// BRAIN SURGERY //
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/datum/surgery_step/brain/
|
||||||
|
blood_level = 1
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
return target_zone == "head" && hasorgans(target)
|
||||||
|
|
||||||
|
/datum/surgery_step/brain/saw_skull
|
||||||
|
required_tool = /obj/item/weapon/circular_saw
|
||||||
|
|
||||||
|
min_duration = 50
|
||||||
|
max_duration = 70
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
return ..() && target_zone == "head" && target.brain_op_stage == 1
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("[user] begins to cut through [target]'s skull with \the [tool].", \
|
||||||
|
"You begin to cut through [target]'s skull with \the [tool].")
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("\blue [user] has cut through [target]'s skull open with \the [tool].", \
|
||||||
|
"\blue You have cut through [target]'s skull open with \the [tool].")
|
||||||
|
target.brain_op_stage = 2
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("\red [user]'s hand slips, cracking [target]'s skull with \the [tool]!" , \
|
||||||
|
"\red Your hand slips, cracking [target]'s skull with \the [tool]!" )
|
||||||
|
target.apply_damage(10, BRUTE, "head")
|
||||||
|
|
||||||
|
/datum/surgery_step/brain/cut_brain
|
||||||
|
required_tool = /obj/item/weapon/scalpel
|
||||||
|
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
|
||||||
|
|
||||||
|
min_duration = 80
|
||||||
|
max_duration = 100
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
return ..() && target.brain_op_stage == 2
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("[user] starts separating connections to [target]'s brain with \the [tool].", \
|
||||||
|
"You start separating connections to [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] separates connections to [target]'s brain with \the [tool].", \
|
||||||
|
"\blue You separate connections to [target]'s brain with \the [tool].")
|
||||||
|
target.brain_op_stage = 3
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("\red [user]'s hand slips, cutting a vein in [target]'s brain with \the [tool]!", \
|
||||||
|
"\red Your hand slips, cutting a vein in [target]'s brain with \the [tool]!")
|
||||||
|
target.apply_damage(50, BRUTE, "head", 1)
|
||||||
|
|
||||||
|
/datum/surgery_step/brain/saw_spine
|
||||||
|
required_tool = /obj/item/weapon/circular_saw
|
||||||
|
|
||||||
|
min_duration = 50
|
||||||
|
max_duration = 70
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
return ..() && target.brain_op_stage == 3
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("[user] starts separating [target]'s brain from \his spine with \the [tool].", \
|
||||||
|
"You start separating [target]'s brain from spine with \the [tool].")
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("\blue [user] separates [target]'s brain from \his spine with \the [tool].", \
|
||||||
|
"\blue You separate [target]'s brain from spine with \the [tool].")
|
||||||
|
|
||||||
|
user.attack_log += "\[[time_stamp()]\]<font color='red'> Debrained [target.name] ([target.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||||
|
target.attack_log += "\[[time_stamp()]\]<font color='orange'> Debrained by [user.name] ([user.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||||
|
|
||||||
|
log_admin("ATTACK: [user] ([user.ckey]) debrained [target] ([target.ckey]) with [tool].")
|
||||||
|
message_admins("ATTACK: [user] ([user.ckey]) debrained [target] ([target.ckey]) with [tool].")
|
||||||
|
log_attack("<font color='red'>[user.name] ([user.ckey]) debrained [target.name] ([target.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||||
|
|
||||||
|
var/obj/item/brain/B = new(target.loc)
|
||||||
|
B.transfer_identity(target)
|
||||||
|
|
||||||
|
target:brain_op_stage = 4.0
|
||||||
|
target.death()//You want them to die after the brain was transferred, so not to trigger client death() twice.
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("\red [user]'s hand slips, cutting a vein in [target]'s brain with \the [tool]!", \
|
||||||
|
"\red Your hand slips, cutting a vein in [target]'s brain with \the [tool]!")
|
||||||
|
target.apply_damage(30, BRUTE, "head", 1)
|
||||||
|
if (ishuman(user))
|
||||||
|
user:bloody_body(target)
|
||||||
|
user:bloody_hands(target, 0)
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
// slime CORE EXTRACTION //
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/datum/surgery_step/slime/
|
||||||
|
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||||
|
return istype(target, /mob/living/carbon/slime/) && target.stat == 2
|
||||||
|
|
||||||
|
/datum/surgery_step/slime/cut_flesh
|
||||||
|
required_tool = /obj/item/weapon/scalpel
|
||||||
|
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
|
||||||
|
|
||||||
|
min_duration = 30
|
||||||
|
max_duration = 50
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||||
|
return ..() && target.brain_op_stage == 0
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("[user] starts cutting [target]'s flesh with \the [tool].", \
|
||||||
|
"You start cutting [target]'s flesh with \the [tool].")
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("\blue [user] cuts [target]'s flesh with \the [tool].", \
|
||||||
|
"\blue You cut [target]'s flesh with \the [tool], exposing the cores")
|
||||||
|
target.brain_op_stage = 1
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("\red [user]'s hand slips, tearing [target]'s flesh with \the [tool]!", \
|
||||||
|
"\red Your hand slips, tearing [target]'s flesh with \the [tool]!")
|
||||||
|
|
||||||
|
/datum/surgery_step/slime/cut_innards
|
||||||
|
required_tool = /obj/item/weapon/scalpel
|
||||||
|
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
|
||||||
|
|
||||||
|
min_duration = 30
|
||||||
|
max_duration = 50
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||||
|
return ..() && target.brain_op_stage == 1
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("[user] starts cutting [target]'s silky innards apart with \the [tool].", \
|
||||||
|
"You start cutting [target]'s silky innards apart with \the [tool].")
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("\blue [user] cuts [target]'s innards apart with \the [tool], exposing the cores", \
|
||||||
|
"\blue You cut [target]'s innards apart with \the [tool], exposing the cores")
|
||||||
|
target.brain_op_stage = 2
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("\red [user]'s hand slips, tearing [target]'s innards with \the [tool]!", \
|
||||||
|
"\red Your hand slips, tearing [target]'s innards with \the [tool]!")
|
||||||
|
|
||||||
|
/datum/surgery_step/slime/saw_core
|
||||||
|
required_tool = /obj/item/weapon/circular_saw
|
||||||
|
|
||||||
|
min_duration = 50
|
||||||
|
max_duration = 70
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||||
|
return ..() && target.brain_op_stage == 2 && target.cores > 0
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("[user] starts cutting out one of [target]'s cores with \the [tool].", \
|
||||||
|
"You start cutting out one of [target]'s cores with \the [tool].")
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||||
|
target.cores--
|
||||||
|
user.visible_message("\blue [user] cuts out one of [target]'s cores with \the [tool].",, \
|
||||||
|
"\blue You cut out one of [target]'s cores with \the [tool]. [target.cores] cores left.")
|
||||||
|
|
||||||
|
if(target.cores >= 0)
|
||||||
|
new target.coretype(target.loc)
|
||||||
|
if(target.cores <= 0)
|
||||||
|
target.icon_state = "baby roro dead-nocore"
|
||||||
|
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("\red [user]'s hand slips, failing to cut core out!", \
|
||||||
|
"\red Your hand slips, failing to cut core out!")
|
||||||
121
code/modules/surgery/eye.dm
Normal file
121
code/modules/surgery/eye.dm
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
//Procedures in this file: Eye mending surgery
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
// EYE SURGERY //
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/datum/surgery_step/eye
|
||||||
|
can_infect = 1
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
if (!hasorgans(target))
|
||||||
|
return 0
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
if (!affected)
|
||||||
|
return 0
|
||||||
|
return target_zone == "eyes"
|
||||||
|
|
||||||
|
/datum/surgery_step/eye/cut_open
|
||||||
|
required_tool = /obj/item/weapon/scalpel
|
||||||
|
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/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)
|
||||||
|
|
||||||
|
/datum/surgery_step/eye/lift_eyes
|
||||||
|
required_tool = /obj/item/weapon/retractor
|
||||||
|
allowed_tools = list(/obj/item/weapon/kitchen/utensil/fork)
|
||||||
|
|
||||||
|
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/datum/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)
|
||||||
|
|
||||||
|
/datum/surgery_step/eye/mend_eyes
|
||||||
|
required_tool = /obj/item/weapon/hemostat
|
||||||
|
allowed_tools = list(/obj/item/weapon/cable_coil, /obj/item/device/assembly/mousetrap)
|
||||||
|
|
||||||
|
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/datum/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)
|
||||||
|
|
||||||
|
/datum/surgery_step/eye/cauterize
|
||||||
|
required_tool = /obj/item/weapon/cautery
|
||||||
|
allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
|
||||||
|
|
||||||
|
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)
|
||||||
|
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.sdisabilities &= ~BLIND
|
||||||
|
target.eye_stat = 0
|
||||||
|
target.op_stage.eyes = 0
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/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)
|
||||||
|
target.eye_stat += 5
|
||||||
124
code/modules/surgery/face.dm
Normal file
124
code/modules/surgery/face.dm
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
//Procedures in this file: Facial reconstruction surgery
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
// FACE SURGERY //
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/datum/surgery_step/face
|
||||||
|
can_infect = 0
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
if (!hasorgans(target))
|
||||||
|
return 0
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
if (!affected)
|
||||||
|
return 0
|
||||||
|
return target_zone == "mouth" && affected.open == 2 && !(affected.status & ORGAN_BLEEDING)
|
||||||
|
|
||||||
|
/datum/surgery_step/generic/cut_face
|
||||||
|
required_tool = /obj/item/weapon/scalpel
|
||||||
|
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
|
||||||
|
|
||||||
|
min_duration = 90
|
||||||
|
max_duration = 110
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
return ..() && target_zone == "mouth" && target.op_stage.face == 0
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("[user] starts to cut open [target]'s face and neck with \the [tool].", \
|
||||||
|
"You start to cut open [target]'s face and neck with \the [tool].")
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("\blue [user] has cut open [target]'s face and neck with \the [tool]." , \
|
||||||
|
"\blue You have cut open [target]'s face and neck with \the [tool].",)
|
||||||
|
target.op_stage.face = 1
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\red [user]'s hand slips, slicing [target]'s throat wth \the [tool]!" , \
|
||||||
|
"\red Your hand slips, slicing [target]'s throat wth \the [tool]!" )
|
||||||
|
affected.createwound(CUT, 60)
|
||||||
|
target.losebreath += 10
|
||||||
|
|
||||||
|
/datum/surgery_step/face/mend_vocal
|
||||||
|
required_tool = /obj/item/weapon/hemostat
|
||||||
|
allowed_tools = list(/obj/item/weapon/cable_coil, /obj/item/device/assembly/mousetrap)
|
||||||
|
|
||||||
|
min_duration = 70
|
||||||
|
max_duration = 90
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
return ..() && target.op_stage.face == 1
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("[user] starts mending [target]'s vocal cords with \the [tool].", \
|
||||||
|
"You start mending [target]'s vocal cords with \the [tool].")
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("\blue [user] mends [target]'s vocal cords with \the [tool].", \
|
||||||
|
"\blue You mend [target]'s vocal cords with \the [tool].")
|
||||||
|
target.op_stage.face = 2
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("\red [user]'s hand slips, clamping [target]'s trachea shut for a moment with \the [tool]!", \
|
||||||
|
"\red Your hand slips, clamping [user]'s trachea shut for a moment with \the [tool]!")
|
||||||
|
target.losebreath += 10
|
||||||
|
|
||||||
|
/datum/surgery_step/face/fix_face
|
||||||
|
required_tool = /obj/item/weapon/retractor
|
||||||
|
allowed_tools = list(/obj/item/weapon/kitchen/utensil/fork)
|
||||||
|
|
||||||
|
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.face == 2
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("[user] starts pulling skin on [target]'s face back in place with \the [tool].", \
|
||||||
|
"You start pulling skin on [target]'s face back in place with \the [tool].")
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("\blue [user] pulls skin on [target]'s face back in place with \the [tool].", \
|
||||||
|
"\blue You pull skin on [target]'s face back in place with \the [tool].")
|
||||||
|
target.op_stage.face = 3
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\red [user]'s hand slips, tearing skin on [target]'s face with \the [tool]!", \
|
||||||
|
"\red Your hand slips, tearing skin on [target]'s face with \the [tool]!")
|
||||||
|
target.apply_damage(10, BRUTE, affected)
|
||||||
|
|
||||||
|
/datum/surgery_step/face/cauterize
|
||||||
|
required_tool = /obj/item/weapon/cautery
|
||||||
|
allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
|
||||||
|
|
||||||
|
min_duration = 70
|
||||||
|
max_duration = 100
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
return ..() && target.op_stage.face > 0
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("[user] is beginning to cauterize the incision on [target]'s face and neck with \the [tool]." , \
|
||||||
|
"You are beginning to cauterize the incision on [target]'s face and neck with \the [tool].")
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\blue [user] cauterizes the incision on [target]'s face and neck with \the [tool].", \
|
||||||
|
"\blue You cauterize the incision on [target]'s face and neck with \the [tool].")
|
||||||
|
affected.open = 0
|
||||||
|
affected.status &= ~ORGAN_BLEEDING
|
||||||
|
if (target.op_stage.face == 3)
|
||||||
|
var/datum/organ/external/head/h = affected
|
||||||
|
h.disfigured = 0
|
||||||
|
target.op_stage.face = 0
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\red [user]'s hand slips, leaving a small burn on [target]'s face with \the [tool]!", \
|
||||||
|
"\red Your hand slips, leaving a small burn on [target]'s face with \the [tool]!")
|
||||||
|
target.apply_damage(4, BURN, affected)
|
||||||
167
code/modules/surgery/generic.dm
Normal file
167
code/modules/surgery/generic.dm
Normal file
@@ -0,0 +1,167 @@
|
|||||||
|
//Procedures in this file: Gneric surgery steps
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
// COMMON STEPS //
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/datum/surgery_step/generic/
|
||||||
|
can_infect = 1
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
if (target_zone == "eyes") //there are specific steps for eye surgery
|
||||||
|
return 0
|
||||||
|
if (!hasorgans(target))
|
||||||
|
return 0
|
||||||
|
var/datum/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/generic/cut_open
|
||||||
|
required_tool = /obj/item/weapon/scalpel
|
||||||
|
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
|
||||||
|
|
||||||
|
min_duration = 90
|
||||||
|
max_duration = 110
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
return ..() && affected.open == 0 && target_zone != "mouth"
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("[user] starts the incision on [target]'s [affected.display_name] with \the [tool].", \
|
||||||
|
"You start the incision on [target]'s [affected.display_name] with \the [tool].")
|
||||||
|
target.custom_pain("You feel a horrible pain as if from a sharp knife in your [affected.display_name]!",1)
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\blue [user] has made an incision on [target]'s [affected.display_name] with \the [tool].", \
|
||||||
|
"\blue You have made an incision on [target]'s [affected.display_name] with \the [tool].",)
|
||||||
|
affected.open = 1
|
||||||
|
affected.createwound(CUT, 1)
|
||||||
|
if (target_zone == "head")
|
||||||
|
target.brain_op_stage = 1
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\red [user]'s hand slips, slicing open [target]'s [affected.display_name] in a wrong spot with \the [tool]!", \
|
||||||
|
"\red Your hand slips, slicing open [target]'s [affected.display_name] in a wrong spot with \the [tool]!")
|
||||||
|
affected.createwound(CUT, 10)
|
||||||
|
|
||||||
|
/datum/surgery_step/generic/clamp_bleeders
|
||||||
|
required_tool = /obj/item/weapon/hemostat
|
||||||
|
allowed_tools = list(/obj/item/weapon/cable_coil, /obj/item/device/assembly/mousetrap)
|
||||||
|
|
||||||
|
min_duration = 40
|
||||||
|
max_duration = 60
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
return ..() && affected.open && (affected.status & ORGAN_BLEEDING)
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("[user] starts clamping bleeders in [target]'s [affected.display_name] with \the [tool].", \
|
||||||
|
"You start clamping bleeders in [target]'s [affected.display_name] with \the [tool].")
|
||||||
|
target.custom_pain("The pain in your [affected.display_name] is maddening!",1)
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\blue [user] clamps bleeders in [target]'s [affected.display_name] with \the [tool].", \
|
||||||
|
"\blue You clamp bleeders in [target]'s [affected.display_name] with \the [tool].")
|
||||||
|
affected.clamp()
|
||||||
|
spread_germs_to_organ(affected, user)
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\red [user]'s hand slips, tearing blood vessals and causing massive bleeding in [target]'s [affected.display_name] with the \[tool]!", \
|
||||||
|
"\red Your hand slips, tearing blood vessels and causing massive bleeding in [target]'s [affected.display_name] with \the [tool]!",)
|
||||||
|
affected.createwound(CUT, 10)
|
||||||
|
|
||||||
|
/datum/surgery_step/generic/retract_skin
|
||||||
|
required_tool = /obj/item/weapon/retractor
|
||||||
|
allowed_tools = list(/obj/item/weapon/kitchen/utensil/fork)
|
||||||
|
|
||||||
|
min_duration = 30
|
||||||
|
max_duration = 40
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
return ..() && affected.open < 2 && !(affected.status & ORGAN_BLEEDING)
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
var/msg = "[user] starts to pry open the incision on [target]'s [affected.display_name] with \the [tool]."
|
||||||
|
var/self_msg = "You start to pry open the incision on [target]'s [affected.display_name] with \the [tool]."
|
||||||
|
if (target_zone == "chest")
|
||||||
|
msg = "[user] starts to separate the ribcage and rearrange the organs in [target]'s torso with \the [tool]."
|
||||||
|
self_msg = "You start to separate the ribcage and rearrange the organs in [target]'s torso with \the [tool]."
|
||||||
|
if (target_zone == "groin")
|
||||||
|
msg = "[user] starts to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]."
|
||||||
|
self_msg = "You start to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]."
|
||||||
|
user.visible_message(msg, self_msg)
|
||||||
|
target.custom_pain("It feels like the skin on your [affected.display_name] is on fire!",1)
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
var/msg = "\blue [user] keeps the incision open on [target]'s [affected.display_name] with \the [tool]."
|
||||||
|
var/self_msg = "\blue You keep the incision open on [target]'s [affected.display_name] with \the [tool]."
|
||||||
|
if (target_zone == "chest")
|
||||||
|
msg = "\blue [user] keeps the ribcage open on [target]'s torso with \the [tool]."
|
||||||
|
self_msg = "\blue You keep the ribcage open on [target]'s torso with \the [tool]."
|
||||||
|
if (target_zone == "groin")
|
||||||
|
msg = "\blue [user] keeps the incision open on [target]'s lower abdomen with \the [tool]."
|
||||||
|
self_msg = "\blue You keep the incision open on [target]'s lower abdomen with \the [tool]."
|
||||||
|
user.visible_message(msg, self_msg)
|
||||||
|
affected.open = 2
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
var/msg = "\red [user]'s hand slips, tearing the edges of incision on [target]'s [affected.display_name] with \the [tool]!"
|
||||||
|
var/self_msg = "\red Your hand slips, tearing the edges of incision on [target]'s [affected.display_name] with \the [tool]!"
|
||||||
|
if (target_zone == "chest")
|
||||||
|
msg = "\red [user]'s hand slips, damaging several organs [target]'s torso with \the [tool]!"
|
||||||
|
self_msg = "\red Your hand slips, damaging several organs [target]'s torso with \the [tool]!"
|
||||||
|
if (target_zone == "groin")
|
||||||
|
msg = "\red [user]'s hand slips, damaging several organs [target]'s lower abdomen with \the [tool]"
|
||||||
|
self_msg = "\red Your hand slips, damaging several organs [target]'s lower abdomen with \the [tool]!"
|
||||||
|
user.visible_message(msg, self_msg)
|
||||||
|
target.apply_damage(12, BRUTE, affected)
|
||||||
|
|
||||||
|
/datum/surgery_step/generic/cauterize
|
||||||
|
required_tool = /obj/item/weapon/cautery
|
||||||
|
allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
|
||||||
|
|
||||||
|
min_duration = 70
|
||||||
|
max_duration = 100
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
return ..() && affected.open && target_zone != "mouth"
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("[user] is beginning to cauterize the incision on [target]'s [affected.display_name] with \the [tool]." , \
|
||||||
|
"You are beginning to cauterize the incision on [target]'s [affected.display_name] with \the [tool].")
|
||||||
|
target.custom_pain("Your [affected.display_name] is being burned!",1)
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\blue [user] cauterizes the incision on [target]'s [affected.display_name] with \the [tool].", \
|
||||||
|
"\blue You cauterize the incision on [target]'s [affected.display_name] with \the [tool].")
|
||||||
|
affected.open = 0
|
||||||
|
affected.germ_level = 0
|
||||||
|
affected.status &= ~ORGAN_BLEEDING
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\red [user]'s hand slips, leaving a small burn on [target]'s [affected.display_name] with \the [tool]!", \
|
||||||
|
"\red Your hand slips, leaving a small burn on [target]'s [affected.display_name] with \the [tool]!")
|
||||||
|
target.apply_damage(3, BURN, affected)
|
||||||
110
code/modules/surgery/other.dm
Normal file
110
code/modules/surgery/other.dm
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
//Procedures in this file: Inernal wound patching, Implant removal.
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
// INTERNAL WOUND PATCHING //
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/datum/surgery_step/fix_vein
|
||||||
|
required_tool = /obj/item/weapon/FixOVein
|
||||||
|
allowed_tools = list(/obj/item/weapon/cable_coil)
|
||||||
|
can_infect = 1
|
||||||
|
blood_level = 1
|
||||||
|
|
||||||
|
min_duration = 70
|
||||||
|
max_duration = 90
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
|
||||||
|
var/internal_bleeding = 0
|
||||||
|
for(var/datum/wound/W in affected.wounds) if(W.internal)
|
||||||
|
internal_bleeding = 1
|
||||||
|
break
|
||||||
|
|
||||||
|
return affected.open == 2 && internal_bleeding
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("[user] starts patching the damaged vein in [target]'s [affected.display_name] with \the [tool]." , \
|
||||||
|
"You start patching the damaged vein in [target]'s [affected.display_name] with \the [tool].")
|
||||||
|
target.custom_pain("The pain in [affected.display_name] is unbearable!",1)
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\blue [user] has patched the damaged vein in [target]'s [affected.display_name] with \the [tool].", \
|
||||||
|
"\blue You have patched the damaged vein in [target]'s [affected.display_name] with \the [tool].")
|
||||||
|
|
||||||
|
for(var/datum/wound/W in affected.wounds) if(W.internal)
|
||||||
|
affected.wounds -= W
|
||||||
|
affected.update_damages()
|
||||||
|
if (ishuman(user) && prob(40)) user:bloody_hands(target, 0)
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!" , \
|
||||||
|
"\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!")
|
||||||
|
affected.take_damage(5, 0)
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
// IMPLANT REMOVAL SURGERY //
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/datum/surgery_step/implant_removal
|
||||||
|
required_tool = /obj/item/weapon/hemostat
|
||||||
|
allowed_tools = list(/obj/item/weapon/wirecutters, /obj/item/weapon/kitchen/utensil/fork)
|
||||||
|
|
||||||
|
min_duration = 80
|
||||||
|
max_duration = 100
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
return affected.open == 2 && !(affected.status & ORGAN_BLEEDING)
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("[user] starts poking around inside the incision on [target]'s [affected.display_name] with \the [tool].", \
|
||||||
|
"You start poking around inside the incision on [target]'s [affected.display_name] with \the [tool]" )
|
||||||
|
target.custom_pain("The pain in your chest is living hell!",1)
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/chest/affected = target.get_organ(target_zone)
|
||||||
|
|
||||||
|
var/find_prob = 0
|
||||||
|
if (affected.implants.len)
|
||||||
|
var/obj/item/weapon/implant/imp = affected.implants[1]
|
||||||
|
if (imp.islegal())
|
||||||
|
find_prob +=60
|
||||||
|
else
|
||||||
|
find_prob +=40
|
||||||
|
if (isright(tool))
|
||||||
|
find_prob +=20
|
||||||
|
|
||||||
|
if (prob(find_prob))
|
||||||
|
user.visible_message("\blue [user] takes something out of incision on [target]'s [affected.display_name] with \the [tool].", \
|
||||||
|
"\blue You take something out of incision on [target]'s [affected.display_name]s with \the [tool]." )
|
||||||
|
var/obj/item/weapon/implant/imp = affected.implants[1]
|
||||||
|
affected.implants -= imp
|
||||||
|
imp.loc = get_turf(target)
|
||||||
|
imp.imp_in = null
|
||||||
|
imp.implanted = 0
|
||||||
|
else
|
||||||
|
user.visible_message("\blue [user] could not find anything inside [target]'s [affected.display_name], and pulls \the [tool] out.", \
|
||||||
|
"\blue You could not find anything inside [target]'s [affected.display_name]." )
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/chest/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!", \
|
||||||
|
"\red Your hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!")
|
||||||
|
affected.createwound(CUT, 20)
|
||||||
|
if (affected.implants.len)
|
||||||
|
var/fail_prob = 10
|
||||||
|
if (!isright(tool))
|
||||||
|
fail_prob += 30
|
||||||
|
if (prob(fail_prob))
|
||||||
|
var/obj/item/weapon/implant/imp = affected.implants[1]
|
||||||
|
user.visible_message("\red Something beeps inside [target]'s [affected.display_name]!")
|
||||||
|
playsound(imp.loc, 'sound/items/countdown.ogg', 75, 1, -3)
|
||||||
|
spawn(25)
|
||||||
|
imp.activate()
|
||||||
196
code/modules/surgery/ribcage.dm
Normal file
196
code/modules/surgery/ribcage.dm
Normal file
@@ -0,0 +1,196 @@
|
|||||||
|
//Procedures in this file: Generic ribcage opening steps, Removing alien embryo, Fixing ruptured lungs
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
// GENERIC RIBCAGE SURGERY //
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
/datum/surgery_step/ribcage
|
||||||
|
can_infect = 1
|
||||||
|
blood_level = 1
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
return target_zone == "chest"
|
||||||
|
|
||||||
|
/datum/surgery_step/ribcage/saw_ribcage
|
||||||
|
required_tool = /obj/item/weapon/circular_saw
|
||||||
|
|
||||||
|
min_duration = 50
|
||||||
|
max_duration = 70
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
return ..() && target.op_stage.ribcage == 0 && affected.open >= 2
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("[user] begins to cut through [target]'s ribcage with \the [tool].", \
|
||||||
|
"You begin to cut through [target]'s ribcage with \the [tool].")
|
||||||
|
target.custom_pain("Something hurts horribly in your chest!",1)
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("\blue [user] has cut through [target]'s ribcage open with \the [tool].", \
|
||||||
|
"\blue You have cut through [target]'s ribcage open with \the [tool].")
|
||||||
|
target.op_stage.ribcage = 1
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("\red [user]'s hand slips, cracking [target]'s ribcage with \the [tool]!" , \
|
||||||
|
"\red Your hand slips, cracking [target]'s ribcage with \the [tool]!" )
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
affected.createwound(CUT, 20)
|
||||||
|
affected.fracture()
|
||||||
|
|
||||||
|
|
||||||
|
/datum/surgery_step/ribcage/retract_ribcage
|
||||||
|
required_tool = /obj/item/weapon/retractor
|
||||||
|
allowed_tools = list(/obj/item/weapon/crowbar)
|
||||||
|
|
||||||
|
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.ribcage == 1
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/msg = "[user] starts to force open the ribcage in [target]'s torso with \the [tool]."
|
||||||
|
var/self_msg = "You start to force open the ribcage in [target]'s torso with \the [tool]."
|
||||||
|
user.visible_message(msg, self_msg)
|
||||||
|
target.custom_pain("Something hurts horribly in your chest!",1)
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/msg = "\blue [user] forces open [target]'s ribcage with \the [tool]."
|
||||||
|
var/self_msg = "\blue You force open [target]'s ribcage with \the [tool]."
|
||||||
|
user.visible_message(msg, self_msg)
|
||||||
|
target.op_stage.ribcage = 2
|
||||||
|
|
||||||
|
// Whoops!
|
||||||
|
if(prob(10))
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
affected.fracture()
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/msg = "\red [user]'s hand slips, breaking [target]'s ribcage!"
|
||||||
|
var/self_msg = "\red Your hand slips, breaking [target]'s ribcage!"
|
||||||
|
user.visible_message(msg, self_msg)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
affected.createwound(BRUISE, 20)
|
||||||
|
affected.fracture()
|
||||||
|
|
||||||
|
/datum/surgery_step/ribcage/close_ribcage
|
||||||
|
required_tool = /obj/item/weapon/retractor
|
||||||
|
allowed_tools = list(/obj/item/weapon/crowbar)
|
||||||
|
|
||||||
|
min_duration = 20
|
||||||
|
max_duration = 40
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
return ..() && target.op_stage.ribcage == 2
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/msg = "[user] starts bending [target]'s ribcage back into place with \the [tool]."
|
||||||
|
var/self_msg = "You start bending [target]'s ribcage back into place with \the [tool]."
|
||||||
|
user.visible_message(msg, self_msg)
|
||||||
|
target.custom_pain("Something hurts horribly in your chest!",1)
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/msg = "\blue [user] bends [target]'s ribcage back into place with \the [tool]."
|
||||||
|
var/self_msg = "\blue You bend [target]'s ribcage back into place with \the [tool]."
|
||||||
|
user.visible_message(msg, self_msg)
|
||||||
|
|
||||||
|
target.op_stage.ribcage = 1
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/msg = "\red [user]'s hand slips, bending [target]'s ribcage in a wrong shape!"
|
||||||
|
var/self_msg = "\red Your hand slips, bending [target]'s ribcage in a wrong shape!"
|
||||||
|
user.visible_message(msg, self_msg)
|
||||||
|
var/datum/organ/external/chest/affected = target.get_organ("chest")
|
||||||
|
affected.createwound(BRUISE, 20)
|
||||||
|
affected.fracture()
|
||||||
|
if (prob(40))
|
||||||
|
user.visible_message("\red Rib pierces the lung!")
|
||||||
|
affected.ruptured_lungs = 1
|
||||||
|
|
||||||
|
/datum/surgery_step/ribcage/mend_ribcage
|
||||||
|
required_tool = /obj/item/weapon/bonegel
|
||||||
|
|
||||||
|
min_duration = 20
|
||||||
|
max_duration = 40
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
return ..() && target.op_stage.ribcage == 1
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/msg = "[user] starts applying \the [tool] to [target]'s ribcage."
|
||||||
|
var/self_msg = "You start applying \the [tool] to [target]'s ribcage."
|
||||||
|
user.visible_message(msg, self_msg)
|
||||||
|
target.custom_pain("Something hurts horribly in your chest!",1)
|
||||||
|
..()
|
||||||
|
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/msg = "\blue [user] applied \the [tool] to [target]'s ribcage."
|
||||||
|
var/self_msg = "\blue You applied \the [tool] to [target]'s ribcage."
|
||||||
|
user.visible_message(msg, self_msg)
|
||||||
|
|
||||||
|
target.op_stage.ribcage = 0
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
// ALIEN EMBRYO SURGERY //
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
/datum/surgery_step/ribcage/remove_embryo
|
||||||
|
required_tool = /obj/item/weapon/hemostat
|
||||||
|
blood_level = 2
|
||||||
|
|
||||||
|
min_duration = 80
|
||||||
|
max_duration = 100
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/embryo = 0
|
||||||
|
for(var/obj/item/alien_embryo/A in target)
|
||||||
|
embryo = 1
|
||||||
|
break
|
||||||
|
return ..() && embryo && target.op_stage.ribcage == 2
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/msg = "[user] starts to pull something out from [target]'s ribcage with \the [tool]."
|
||||||
|
var/self_msg = "You start to pull something out from [target]'s ribcage with \the [tool]."
|
||||||
|
user.visible_message(msg, self_msg)
|
||||||
|
target.custom_pain("Something hurts horribly in your chest!",1)
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("\red [user] rips the larva out of [target]'s ribcage!",
|
||||||
|
"You rip the larva out of [target]'s ribcage!")
|
||||||
|
|
||||||
|
for(var/obj/item/alien_embryo/A in target)
|
||||||
|
A.loc = A.loc.loc
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
// LUNG SURGERY //
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
/datum/surgery_step/ribcage/fix_lungs
|
||||||
|
required_tool = /obj/item/weapon/scalpel
|
||||||
|
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
|
||||||
|
|
||||||
|
min_duration = 70
|
||||||
|
max_duration = 90
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
return ..() && target.is_lung_ruptured() && target.op_stage.ribcage == 2
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
user.visible_message("[user] starts mending the rupture in [target]'s lungs with \the [tool].", \
|
||||||
|
"You start mending the rupture in [target]'s lungs with \the [tool]." )
|
||||||
|
target.custom_pain("The pain in your chest is living hell!",1)
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/chest/affected = target.get_organ("chest")
|
||||||
|
user.visible_message("\blue [user] mends the rupture in [target]'s lungs with \the [tool].", \
|
||||||
|
"\blue You mend the rupture in [target]'s lungs with \the [tool]." )
|
||||||
|
affected.ruptured_lungs = 0
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/chest/affected = target.get_organ("chest")
|
||||||
|
user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s chest with \the [tool]!", \
|
||||||
|
"\red Your hand slips, slicing an artery inside [target]'s chest with \the [tool]!")
|
||||||
|
affected.createwound(CUT, 20)
|
||||||
151
code/modules/surgery/robolimbs.dm
Normal file
151
code/modules/surgery/robolimbs.dm
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
//Procedures in this file: Robotic limbs attachment
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
// LIMB SURGERY //
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/datum/surgery_step/limb/
|
||||||
|
can_infect = 1
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
if (!hasorgans(target))
|
||||||
|
return 0
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
if (!affected)
|
||||||
|
return 0
|
||||||
|
if (!(affected.status & ORGAN_DESTROYED))
|
||||||
|
return 0
|
||||||
|
if (affected.parent)
|
||||||
|
if (affected.parent.status & ORGAN_DESTROYED)
|
||||||
|
return 0
|
||||||
|
return 1
|
||||||
|
|
||||||
|
|
||||||
|
/datum/surgery_step/limb/cut
|
||||||
|
required_tool = /obj/item/weapon/scalpel
|
||||||
|
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
|
||||||
|
|
||||||
|
min_duration = 80
|
||||||
|
max_duration = 100
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("[user] starts cutting away flesh where [target]'s [affected.display_name] used to be with \the [tool].", \
|
||||||
|
"You start cutting away flesh where [target]'s [affected.display_name] used to be with \the [tool].")
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\blue [user] cuts away flesh where [target]'s [affected.display_name] used to be with \the [tool].", \
|
||||||
|
"\blue You cut away flesh where [target]'s [affected.display_name] used to be with \the [tool].")
|
||||||
|
affected.status |= ORGAN_CUT_AWAY
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
if (affected.parent)
|
||||||
|
affected = affected.parent
|
||||||
|
user.visible_message("\red [user]'s hand slips, cutting [target]'s [affected.display_name] open!", \
|
||||||
|
"\red Your hand slips, cutting [target]'s [affected.display_name] open!")
|
||||||
|
affected.createwound(CUT, 10)
|
||||||
|
|
||||||
|
|
||||||
|
/datum/surgery_step/limb/mend
|
||||||
|
required_tool = /obj/item/weapon/retractor
|
||||||
|
allowed_tools = list(/obj/item/weapon/kitchen/utensil/fork)
|
||||||
|
|
||||||
|
min_duration = 80
|
||||||
|
max_duration = 100
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
return ..() && affected.status & ORGAN_CUT_AWAY
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("[user] is beginning reposition flesh and nerve endings where where [target]'s [affected.display_name] used to be with [tool].", \
|
||||||
|
"You start repositioning flesh and nerve endings where where [target]'s [affected.display_name] used to be with [tool].")
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\blue [user] has finished repositioning flesh and nerve endings where [target]'s [affected.display_name] used to be with [tool].", \
|
||||||
|
"\blue You have finished repositioning flesh and nerve endings where [target]'s [affected.display_name] used to be with [tool].")
|
||||||
|
affected.open = 3
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
if (affected.parent)
|
||||||
|
affected = affected.parent
|
||||||
|
user.visible_message("\red [user]'s hand slips, tearing flesh on [target]'s [affected.display_name]!", \
|
||||||
|
"\red Your hand slips, tearing flesh on [target]'s [affected.display_name]!")
|
||||||
|
target.apply_damage(10, BRUTE, affected)
|
||||||
|
|
||||||
|
|
||||||
|
/datum/surgery_step/limb/prepare
|
||||||
|
required_tool = /obj/item/weapon/cautery
|
||||||
|
allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
|
||||||
|
|
||||||
|
min_duration = 60
|
||||||
|
max_duration = 70
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
return ..() && affected.open == 3
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("[user] starts adjusting area around [target]'s [affected.display_name] with \the [tool].", \
|
||||||
|
"You start adjusting area around [target]'s [affected.display_name] with \the [tool]..")
|
||||||
|
..()
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\blue [user] has finished adjusting the area around [target]'s [affected.display_name] with \the [tool].", \
|
||||||
|
"\blue You have finished adjusting the area around [target]'s [affected.display_name] with \the [tool].")
|
||||||
|
affected.status |= ORGAN_ATTACHABLE
|
||||||
|
affected.amputated = 1
|
||||||
|
affected.setAmputatedTree()
|
||||||
|
affected.open = 0
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
if (affected.parent)
|
||||||
|
affected = affected.parent
|
||||||
|
user.visible_message("\red [user]'s hand slips, searing [target]'s [affected.display_name]!", \
|
||||||
|
"\red Your hand slips, searing [target]'s [affected.display_name]!")
|
||||||
|
target.apply_damage(10, BURN, affected)
|
||||||
|
|
||||||
|
|
||||||
|
/datum/surgery_step/limb/attach
|
||||||
|
required_tool = /obj/item/robot_parts
|
||||||
|
can_infect = 0
|
||||||
|
|
||||||
|
min_duration = 80
|
||||||
|
max_duration = 100
|
||||||
|
|
||||||
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/obj/item/robot_parts/p = tool
|
||||||
|
if (p.part)
|
||||||
|
if (!(target_zone in p.part))
|
||||||
|
return 0
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
return ..() && affected.status & ORGAN_ATTACHABLE
|
||||||
|
|
||||||
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("[user] starts attaching [tool] where [target]'s [affected.display_name] used to be.", \
|
||||||
|
"You start attaching [tool] where [target]'s [affected.display_name] used to be.")
|
||||||
|
|
||||||
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\blue [user] has attached [tool] where [target]'s [affected.display_name] used to be.", \
|
||||||
|
"\blue You have attached [tool] where [target]'s [affected.display_name] used to be.")
|
||||||
|
affected.robotize()
|
||||||
|
target.update_body()
|
||||||
|
target.updatehealth()
|
||||||
|
target.UpdateDamageIcon()
|
||||||
|
del(tool)
|
||||||
|
|
||||||
|
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
user.visible_message("\red [user]'s hand slips, damaging connectors on [target]'s [affected.display_name]!", \
|
||||||
|
"\red Your hand slips, damaging connectors on [target]'s [affected.display_name]!")
|
||||||
|
target.apply_damage(10, BRUTE, affected)
|
||||||
85
code/modules/surgery/surgery.dm
Normal file
85
code/modules/surgery/surgery.dm
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
/* SURGERY STEPS */
|
||||||
|
|
||||||
|
/datum/surgery_step
|
||||||
|
// type path referencing the required tool for this step
|
||||||
|
var/required_tool = null
|
||||||
|
|
||||||
|
// type path referencing tools that can be used as substitude for this step
|
||||||
|
var/list/allowed_tools = null
|
||||||
|
|
||||||
|
// duration of the step
|
||||||
|
var/min_duration = 0
|
||||||
|
var/max_duration = 0
|
||||||
|
|
||||||
|
// evil infection stuff that will make everyone hate me
|
||||||
|
var/can_infect = 0
|
||||||
|
//How much blood this step can get on surgeon. 1 - hands, 2 - full body.
|
||||||
|
var/blood_level = 0
|
||||||
|
|
||||||
|
//is it is a required surgical tool for this step
|
||||||
|
proc/isright(obj/item/tool)
|
||||||
|
return (istype(tool,required_tool))
|
||||||
|
|
||||||
|
//is it is an accepted replacement tool for this step
|
||||||
|
proc/isacceptable(obj/item/tool)
|
||||||
|
if (allowed_tools)
|
||||||
|
for (var/T in allowed_tools)
|
||||||
|
if (istype(tool,T))
|
||||||
|
return 1
|
||||||
|
return 0
|
||||||
|
|
||||||
|
// checks whether this step can be applied with the given user and target
|
||||||
|
proc/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
return 0
|
||||||
|
|
||||||
|
// does stuff to begin the step, usually just printing messages. Moved germs transfering and bloodying here too
|
||||||
|
proc/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
if (can_infect && affected)
|
||||||
|
spread_germs_to_organ(affected, user)
|
||||||
|
if (ishuman(user) && prob(60))
|
||||||
|
var/mob/living/carbon/human/H = user
|
||||||
|
if (blood_level)
|
||||||
|
H.bloody_hands(target,0)
|
||||||
|
if (blood_level > 1)
|
||||||
|
H.bloody_body(target,0)
|
||||||
|
return
|
||||||
|
|
||||||
|
// does stuff to end the step, which is normally print a message + do whatever this step changes
|
||||||
|
proc/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
return
|
||||||
|
|
||||||
|
// stuff that happens when the step fails
|
||||||
|
proc/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
|
return null
|
||||||
|
|
||||||
|
proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
|
||||||
|
if(!istype(user) || !istype(E)) return
|
||||||
|
|
||||||
|
var/germ_level = user.germ_level
|
||||||
|
if(user.gloves)
|
||||||
|
germ_level = user.gloves.germ_level
|
||||||
|
|
||||||
|
E.germ_level = max(germ_level,E.germ_level) //as funny as scrubbing microbes out with clean gloves is - no.
|
||||||
|
|
||||||
|
proc/do_surgery(mob/living/M, mob/living/user, obj/item/tool)
|
||||||
|
if(!istype(M,/mob/living/carbon))
|
||||||
|
return 0
|
||||||
|
if (user.a_intent == "harm") //check for Hippocratic Oath
|
||||||
|
return 0
|
||||||
|
for(var/datum/surgery_step/S in surgery_steps)
|
||||||
|
if( S.isright(tool) || S.isacceptable(tool) && \
|
||||||
|
S.can_use(user, M, user.zone_sel.selecting, tool)) //check if tool is right or close enough and if this step is possible
|
||||||
|
S.begin_step(user, M, user.zone_sel.selecting, tool) //start on it
|
||||||
|
if(do_mob(user, M, rand(S.min_duration, S.max_duration))) //if user did nto move or changed hands
|
||||||
|
S.end_step(user, M, user.zone_sel.selecting, tool) //finish successfully
|
||||||
|
else //or
|
||||||
|
S.fail_step(user, M, user.zone_sel.selecting, tool) //malpractice~
|
||||||
|
return 1 //don't want to do weapony things after surgery
|
||||||
|
return 0
|
||||||
|
|
||||||
|
/datum/surgery_status/
|
||||||
|
var/eyes = 0
|
||||||
|
var/face = 0
|
||||||
|
var/appendix = 0
|
||||||
|
var/ribcage = 0
|
||||||
10425
maps/tgstation.2.1.0.0.1.dmm
Normal file
10425
maps/tgstation.2.1.0.0.1.dmm
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user