mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-01 04:52:39 +00:00
@@ -1,7 +1,28 @@
|
||||
|
||||
//check if mob is lying down on something we can operate him on.
|
||||
/proc/can_operate(mob/living/carbon/M)
|
||||
return (locate(/obj/machinery/optable, M.loc) && M.resting) || \
|
||||
(locate(/obj/structure/stool/bed/roller, M.loc) && \
|
||||
(M.buckled || M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat)) && prob(75) || \
|
||||
(locate(/obj/structure/table/, M.loc) && \
|
||||
(M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat) && prob(66))
|
||||
|
||||
/datum/surgery_status/
|
||||
var/eyes = 0
|
||||
var/face = 0
|
||||
var/appendix = 0
|
||||
|
||||
/mob/living/carbon/var/datum/surgery_status/op_stage = new/datum/surgery_status
|
||||
|
||||
/* 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
|
||||
|
||||
// When multiple steps can be applied with the current tool etc., choose the one with higher priority
|
||||
|
||||
// checks whether this step can be applied with the given user and target
|
||||
@@ -27,26 +48,6 @@
|
||||
// evil infection stuff that will make everyone hate me
|
||||
var/can_infect = 0
|
||||
|
||||
/datum/surgery_step/cut_open_abdomen
|
||||
required_tool = /obj/item/weapon/scalpel
|
||||
|
||||
can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return target_zone == "groin"
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts cutting open [target]'s abdomen with \the [tool]", "You start cutting open [user] with \the [tool]")
|
||||
|
||||
end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/groin = target.get_organ("groin")
|
||||
groin.open = 1
|
||||
|
||||
/datum/surgery_step/remove_appendix
|
||||
required_tool = /obj/item/weapon/scalpel
|
||||
|
||||
can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/groin = target.get_organ("groin")
|
||||
return target_zone == "groin" && groin.open
|
||||
|
||||
// Build this list by iterating over all typesof(/datum/surgery_step) and sorting the results by priority
|
||||
var/global/list/surgery_steps = null
|
||||
|
||||
@@ -56,3 +57,740 @@ proc/build_surgery_steps_list()
|
||||
var/datum/surgery_step/S = new T
|
||||
surgery_steps += S
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// COMMON STEPS //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
/datum/surgery_step/generic/
|
||||
var/datum/organ/external/affected //affected organ
|
||||
can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
affected = target.get_organ(target_zone)
|
||||
if (affected == null)
|
||||
return 0
|
||||
return target_zone != "eyes" //there are specific steps for eye surgery
|
||||
|
||||
/datum/surgery_step/generic/cut_open
|
||||
required_tool = /obj/item/weapon/scalpel
|
||||
|
||||
min_duration = 90
|
||||
max_duration = 110
|
||||
|
||||
can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
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].")
|
||||
|
||||
end_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("\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/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
|
||||
|
||||
min_duration = 40
|
||||
max_duration = 60
|
||||
|
||||
can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
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].")
|
||||
|
||||
end_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("\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.bandage()
|
||||
affected.status &= ~ORGAN_BLEEDING
|
||||
|
||||
fail_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("\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
|
||||
|
||||
min_duration = 30
|
||||
max_duration = 40
|
||||
|
||||
can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
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)
|
||||
|
||||
end_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 = "\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/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
|
||||
|
||||
min_duration = 70
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
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].")
|
||||
|
||||
end_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("\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.status &= ~ORGAN_BLEEDING
|
||||
|
||||
fail_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("\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)
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// APPENDECTOMY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/appendectomy/
|
||||
var/datum/organ/external/groin
|
||||
can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (target_zone != "groin")
|
||||
return 0
|
||||
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
|
||||
|
||||
min_duration = 70
|
||||
max_duration = 90
|
||||
|
||||
can_use(mob/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]." )
|
||||
|
||||
end_step(mob/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/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)
|
||||
|
||||
/datum/surgery_step/appendectomy/remove_appendix
|
||||
required_tool = /obj/item/weapon/hemostat
|
||||
|
||||
min_duration = 60
|
||||
max_duration = 80
|
||||
|
||||
can_use(mob/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].")
|
||||
|
||||
end_step(mob/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/datum/disease/appendicitis/app = null
|
||||
for(var/datum/disease/appendicitis/appendicitis in target.viruses)
|
||||
app = appendicitis
|
||||
appendicitis.cure()
|
||||
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.resistances += app
|
||||
target.op_stage.appendix = 2
|
||||
|
||||
fail_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("\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)
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// BONE SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/glue_bone
|
||||
required_tool = /obj/item/weapon/bonegel
|
||||
|
||||
min_duration = 50
|
||||
max_duration = 60
|
||||
|
||||
can_use(mob/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].")
|
||||
|
||||
end_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("\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/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
|
||||
|
||||
min_duration = 60
|
||||
max_duration = 70
|
||||
|
||||
can_use(mob/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 [target_zone] in place with \the [tool].")
|
||||
|
||||
end_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.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/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
|
||||
|
||||
min_duration = 60
|
||||
max_duration = 70
|
||||
|
||||
can_use(mob/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/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 [affected.display_name] skull with \the [tool]." , \
|
||||
"\blue You set [target]'s [affected.display_name] skull with \the [tool].")
|
||||
affected.stage = 2
|
||||
|
||||
fail_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("\red [user]'s hand slips, damaging [target]'s [affected.display_name] face with \the [tool]!" , \
|
||||
"\red Your hand slips, damaging [target]'s [affected.display_name] 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
|
||||
|
||||
min_duration = 50
|
||||
max_duration = 60
|
||||
|
||||
can_use(mob/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/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/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]!")
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// EYE SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/eye
|
||||
can_use(mob/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
|
||||
|
||||
min_duration = 90
|
||||
max_duration = 110
|
||||
|
||||
can_use(mob/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/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/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
|
||||
|
||||
min_duration = 30
|
||||
max_duration = 40
|
||||
|
||||
can_use(mob/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/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/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
|
||||
|
||||
min_duration = 80
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/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/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/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
|
||||
|
||||
min_duration = 70
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/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/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/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
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// FACE SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/face
|
||||
can_use(mob/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
|
||||
|
||||
min_duration = 90
|
||||
max_duration = 110
|
||||
|
||||
can_use(mob/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/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/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
|
||||
|
||||
min_duration = 70
|
||||
max_duration = 90
|
||||
|
||||
can_use(mob/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/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/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
|
||||
|
||||
min_duration = 80
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/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/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/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
|
||||
|
||||
min_duration = 70
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/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/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/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)
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// BRAIN SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/brain/
|
||||
can_use(mob/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/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/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/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
|
||||
|
||||
min_duration = 80
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/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/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/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")
|
||||
|
||||
/datum/surgery_step/brain/saw_spine
|
||||
required_tool = /obj/item/weapon/circular_saw
|
||||
|
||||
min_duration = 50
|
||||
max_duration = 70
|
||||
|
||||
can_use(mob/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/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/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")
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// METROID CORE EXTRACTION //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/metroid/
|
||||
can_use(mob/user, mob/living/carbon/metroid/target, target_zone, obj/item/tool)
|
||||
return istype(target, /mob/living/carbon/metroid/) && target.stat == 2
|
||||
|
||||
/datum/surgery_step/metroid/cut_flesh
|
||||
required_tool = /obj/item/weapon/scalpel
|
||||
|
||||
min_duration = 30
|
||||
max_duration = 50
|
||||
|
||||
can_use(mob/user, mob/living/carbon/metroid/target, target_zone, obj/item/tool)
|
||||
return ..() && target.brain_op_stage == 0
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/metroid/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/user, mob/living/carbon/metroid/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/user, mob/living/carbon/metroid/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/metroid/cut_innards
|
||||
required_tool = /obj/item/weapon/scalpel
|
||||
|
||||
min_duration = 30
|
||||
max_duration = 50
|
||||
|
||||
can_use(mob/user, mob/living/carbon/metroid/target, target_zone, obj/item/tool)
|
||||
return ..() && target.brain_op_stage == 1
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/metroid/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/user, mob/living/carbon/metroid/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/user, mob/living/carbon/metroid/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/metroid/saw_core
|
||||
required_tool = /obj/item/weapon/circular_saw
|
||||
|
||||
min_duration = 50
|
||||
max_duration = 70
|
||||
|
||||
can_use(mob/user, mob/living/carbon/metroid/target, target_zone, obj/item/tool)
|
||||
return ..() && target.brain_op_stage == 2 && target.cores > 0
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/metroid/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/user, mob/living/carbon/metroid/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.")
|
||||
new/obj/item/metroid_core(target.loc)
|
||||
if(target.cores <= 0)
|
||||
target.icon_state = "baby roro dead-nocore"
|
||||
|
||||
fail_step(mob/user, mob/living/carbon/metroid/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!")
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// LIMB SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
//uh, sometime later, okay?
|
||||
@@ -232,14 +232,18 @@
|
||||
owner.update_body(1)
|
||||
return
|
||||
if(config.bones_can_break && brute_dam > min_broken_damage * config.organ_health_multiplier && !(status & ORGAN_ROBOT))
|
||||
if(!(status & ORGAN_BROKEN))
|
||||
owner.visible_message("\red You hear a loud cracking sound coming from \the [owner].","\red <b>Something feels like it shattered in your [display_name]!</b>","You hear a sickening crack.")
|
||||
owner.emote("scream")
|
||||
status |= ORGAN_BROKEN
|
||||
broken_description = pick("broken","fracture","hairline fracture")
|
||||
perma_injury = brute_dam
|
||||
src.fracture()
|
||||
return
|
||||
|
||||
proc/fracture()
|
||||
if(status & ORGAN_BROKEN)
|
||||
return
|
||||
owner.visible_message("\red You hear a loud cracking sound coming from \the [owner].","\red <b>Something feels like it shattered in your [display_name]!</b>","You hear a sickening crack.")
|
||||
owner.emote("scream")
|
||||
status |= ORGAN_BROKEN
|
||||
broken_description = pick("broken","fracture","hairline fracture")
|
||||
perma_injury = brute_dam
|
||||
|
||||
// new damage icon system
|
||||
// returns just the brute/burn damage code
|
||||
proc/damage_state_text()
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
src.min_damage = damage_list[current_stage]
|
||||
|
||||
proc/bleeding()
|
||||
return (!bandaged && damage > 4)
|
||||
return (!bandaged && (damage_type == BRUISE && damage >= 20 || damage_type == CUT))
|
||||
|
||||
/** CUTS **/
|
||||
/datum/wound/cut
|
||||
|
||||
@@ -1722,6 +1722,23 @@
|
||||
attack_verb = list("attacked", "slashed", "sawed", "cut")
|
||||
sharp = 1
|
||||
|
||||
/obj/item/weapon/bonegel
|
||||
name = "bone gel"
|
||||
icon = 'surgery.dmi'
|
||||
icon_state = "bone-gel"
|
||||
force = 0
|
||||
throwforce = 1.0
|
||||
|
||||
/obj/item/weapon/bonesetter
|
||||
name = "bone setter"
|
||||
icon = 'surgery.dmi'
|
||||
icon_state = "bone setter"
|
||||
force = 8.0
|
||||
throwforce = 9.0
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
attack_verb = list("attacked", "hit", "bludgeoned")
|
||||
|
||||
/obj/item/weapon/syntiflesh
|
||||
name = "syntiflesh"
|
||||
desc = "Meat that appears...strange..."
|
||||
|
||||
@@ -1353,6 +1353,15 @@ proc/is_hot(obj/item/W as obj)
|
||||
istype(W, /obj/item/weapon/kitchen/utensil/fork) && W.icon_state != "forkloaded" || \
|
||||
istype(W, /obj/item/weapon/twohanded/fireaxe) \
|
||||
)
|
||||
/proc/is_surgery_tool(obj/item/W as obj)
|
||||
return ( \
|
||||
istype(W, /obj/item/weapon/scalpel) || \
|
||||
istype(W, /obj/item/weapon/hemostat) || \
|
||||
istype(W, /obj/item/weapon/retractor) || \
|
||||
istype(W, /obj/item/weapon/cautery) || \
|
||||
istype(W, /obj/item/weapon/bonegel) || \
|
||||
istype(W, /obj/item/weapon/bonesetter)
|
||||
)
|
||||
|
||||
/proc/reverse_direction(var/dir)
|
||||
switch(dir)
|
||||
@@ -1371,4 +1380,4 @@ proc/is_hot(obj/item/W as obj)
|
||||
if(WEST)
|
||||
return EAST
|
||||
if(NORTHWEST)
|
||||
return SOUTHEAST
|
||||
return SOUTHEAST
|
||||
|
||||
@@ -179,28 +179,22 @@
|
||||
|
||||
if (!istype(M)) // not sure if this is the right thing...
|
||||
return
|
||||
|
||||
//if(istype(M) &&((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/table/, M.loc) && (M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat) && prob(50))))
|
||||
if(istype(M,/mob/living/carbon))
|
||||
if (user.a_intent == "help")
|
||||
if(surgery_steps == null) build_surgery_steps_list()
|
||||
for(var/datum/surgery_step/S in surgery_steps)
|
||||
var/have_correct_tool = 0
|
||||
if(istype(S.required_tool, /list))
|
||||
for(var/T in S.required_tool) if(istype(src, T))
|
||||
have_correct_tool = 1
|
||||
break
|
||||
else
|
||||
have_correct_tool = (istype(src, S.required_tool))
|
||||
if(!have_correct_tool) continue
|
||||
if(S.can_use(user, M, user.zone_sel.selecting, src))
|
||||
S.begin_step(user, M, user.zone_sel.selecting, src)
|
||||
if(do_mob(user, M, rand(S.min_duration, S.max_duration)))
|
||||
S.end_step(user, M, user.zone_sel.selecting, src)
|
||||
else
|
||||
S.fail_step(user, M, user.zone_sel.selecting, src)
|
||||
return //don't want to do weapony things after surgery
|
||||
|
||||
if (can_operate(M)) //Checks if mob is lying down on table for surgery
|
||||
if(istype(M,/mob/living/carbon))
|
||||
if (user.a_intent == "help" || (user.a_intent != "harm" && is_surgery_tool(src)))
|
||||
if(surgery_steps == null) build_surgery_steps_list()
|
||||
for(var/datum/surgery_step/S in surgery_steps)
|
||||
//check if tool is right or close enough
|
||||
if(istype(src, S.required_tool) || (S.allowed_tools && src.type in S.allowed_tools ))
|
||||
if(S.can_use(user, M, user.zone_sel.selecting, src)) //is this step possible?
|
||||
S.begin_step(user, M, user.zone_sel.selecting, src)
|
||||
if(do_mob(user, M, rand(S.min_duration, S.max_duration)))
|
||||
S.end_step(user, M, user.zone_sel.selecting, src)
|
||||
else
|
||||
S.fail_step(user, M, user.zone_sel.selecting, src)
|
||||
return //don't want to do weapony things after surgery
|
||||
if (is_surgery_tool(src))
|
||||
return
|
||||
|
||||
var/messagesource = M
|
||||
|
||||
|
||||
@@ -404,7 +404,10 @@ ZIPPO
|
||||
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src].</span>")
|
||||
else
|
||||
user << "<span class='warning'>You burn yourself while lighting the lighter.</span>"
|
||||
user.adjustFireLoss(2)
|
||||
if (user.l_hand == src)
|
||||
apply_damage(2,BURN,"l_hand")
|
||||
else
|
||||
apply_damage(2,BURN,"r_hand")
|
||||
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src], they however burn their finger in the process.</span>")
|
||||
|
||||
user.SetLuminosity(user.luminosity + 2)
|
||||
|
||||
@@ -9,572 +9,11 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Retractor
|
||||
*/
|
||||
/obj/item/weapon/retractor/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M))
|
||||
return
|
||||
|
||||
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/table/, M.loc) && (M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat) && prob(50))))
|
||||
return ..()
|
||||
HAHA, SUCK IT, 2000 LINES OF SPAGHETTI CODE!
|
||||
|
||||
if(user.zone_sel.selecting == "groin")
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
switch(M:appendix_op_stage)
|
||||
if(2.0)
|
||||
if(M != user)
|
||||
for(var/mob/O in (viewers(M) - user - M))
|
||||
O.show_message("\red [user] retracts the flap in [M]'s abdomen cut open with [src].", 1)
|
||||
M << "\red [user] begins to retract the flap in your abdomen with [src]!"
|
||||
user << "\red You retract the flap in [M]'s abdomen with [src]!"
|
||||
M:appendix_op_stage = 3.0
|
||||
return
|
||||
NOW YOUR JOB IOS DONE BY ONLY 500 LINES OF SPAGHETTI CODE!
|
||||
|
||||
if (user.zone_sel.selecting == "eyes")
|
||||
LOOK FOR SURGERY.DM
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H) && ( \
|
||||
(H.head && H.head.flags & HEADCOVERSEYES) || \
|
||||
(H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
|
||||
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
|
||||
))
|
||||
user << "\red You're going to need to remove that mask/helmet/glasses first."
|
||||
return
|
||||
|
||||
var/mob/living/carbon/monkey/Mo = M
|
||||
if(istype(Mo) && ( \
|
||||
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
|
||||
))
|
||||
user << "\red You're going to need to remove that mask/helmet/glasses first."
|
||||
return
|
||||
|
||||
if(istype(M, /mob/living/carbon/alien) || istype(M, /mob/living/carbon/metroid))//Aliens don't have eyes./N
|
||||
user << "\red You cannot locate any eyes on this creature!"
|
||||
return
|
||||
|
||||
switch(M.eye_op_stage)
|
||||
if(1.0)
|
||||
if(M != user)
|
||||
for(var/mob/O in (viewers(M) - user - M))
|
||||
O.show_message("\red [M] is having his eyes retracted by [user].", 1)
|
||||
M << "\red [user] begins to seperate your eyes with [src]!"
|
||||
user << "\red You seperate [M]'s eyes with [src]!"
|
||||
else
|
||||
user.visible_message( \
|
||||
"\red [user] begins to have his eyes retracted.", \
|
||||
"\red You begin to pry open your eyes with [src]!" \
|
||||
)
|
||||
if(M == user && prob(25))
|
||||
user << "\red You mess up!"
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
if(affecting.take_damage(15))
|
||||
M:UpdateDamageIcon()
|
||||
M.updatehealth()
|
||||
else
|
||||
M.take_organ_damage(15)
|
||||
|
||||
M:eye_op_stage = 2.0
|
||||
|
||||
else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
|
||||
return ..()
|
||||
|
||||
return
|
||||
|
||||
/*
|
||||
* Hemostat
|
||||
*/
|
||||
/obj/item/weapon/hemostat/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M))
|
||||
return
|
||||
|
||||
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/table/, M.loc) && M.lying && prob(50))))
|
||||
return ..()
|
||||
|
||||
if(user.zone_sel.selecting == "groin")
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
switch(M:appendix_op_stage)
|
||||
if(1.0)
|
||||
if(M != user)
|
||||
for(var/mob/O in (viewers(M) - user - M))
|
||||
O.show_message("\red [user] is beginning to clamp bleeders in [M]'s abdomen cut open with [src].", 1)
|
||||
M << "\red [user] begins to clamp bleeders in your abdomen with [src]!"
|
||||
user << "\red You clamp bleeders in [M]'s abdomen with [src]!"
|
||||
M:appendix_op_stage = 2.0
|
||||
if(4.0)
|
||||
if(M != user)
|
||||
for(var/mob/O in (viewers(M) - user - M))
|
||||
O.show_message("\red [user] is removing [M]'s appendix with [src].", 1)
|
||||
M << "\red [user] begins to remove your appendix with [src]!"
|
||||
user << "\red You remove [M]'s appendix with [src]!"
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(istype(D, /datum/disease/appendicitis))
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/appendix/inflamed(get_turf(M))
|
||||
M:appendix_op_stage = 5.0
|
||||
return
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/appendix(get_turf(M))
|
||||
M:appendix_op_stage = 5.0
|
||||
return
|
||||
|
||||
if (user.zone_sel.selecting == "eyes")
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H) && ( \
|
||||
(H.head && H.head.flags & HEADCOVERSEYES) || \
|
||||
(H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
|
||||
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
|
||||
))
|
||||
user << "\red You're going to need to remove that mask/helmet/glasses first."
|
||||
return
|
||||
|
||||
var/mob/living/carbon/monkey/Mo = M
|
||||
if(istype(Mo) && ( \
|
||||
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
|
||||
))
|
||||
user << "\red You're going to need to remove that mask/helmet/glasses first."
|
||||
return
|
||||
|
||||
if(istype(M, /mob/living/carbon/alien))//Aliens don't have eyes./N
|
||||
user << "\red You cannot locate any eyes on this creature!"
|
||||
return
|
||||
|
||||
switch(M.eye_op_stage)
|
||||
if(2.0)
|
||||
if(M != user)
|
||||
for(var/mob/O in (viewers(M) - user - M))
|
||||
O.show_message("\red [M] is having his eyes mended by [user].", 1)
|
||||
M << "\red [user] begins to mend your eyes with [src]!"
|
||||
user << "\red You mend [M]'s eyes with [src]!"
|
||||
else
|
||||
user.visible_message( \
|
||||
"\red [user] begins to have his eyes mended.", \
|
||||
"\red You begin to mend your eyes with [src]!" \
|
||||
)
|
||||
if(M == user && prob(25))
|
||||
user << "\red You mess up!"
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
if(affecting.take_damage(15))
|
||||
M:UpdateDamageIcon()
|
||||
M.updatehealth()
|
||||
else
|
||||
M.take_organ_damage(15)
|
||||
M:eye_op_stage = 3.0
|
||||
|
||||
else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
|
||||
return ..()
|
||||
|
||||
return
|
||||
|
||||
/*
|
||||
* Cautery
|
||||
*/
|
||||
/obj/item/weapon/cautery/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M))
|
||||
return
|
||||
|
||||
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/table/, M.loc) && M.lying && prob(50))))
|
||||
return ..()
|
||||
|
||||
if(user.zone_sel.selecting == "groin")
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
switch(M:appendix_op_stage)
|
||||
if(5.0)
|
||||
if(M != user)
|
||||
for(var/mob/O in (viewers(M) - user - M))
|
||||
O.show_message("\red [user] is beginning to cauterize the incision in [M]'s abdomen with [src].", 1)
|
||||
M << "\red [user] begins to cauterize the incision in your abdomen with [src]!"
|
||||
user << "\red You cauterize the incision in [M]'s abdomen with [src]!"
|
||||
M:appendix_op_stage = 6.0
|
||||
for(var/datum/disease/appendicitis in M.viruses)
|
||||
appendicitis.cure()
|
||||
M.resistances += appendicitis
|
||||
return
|
||||
|
||||
if (user.zone_sel.selecting == "eyes")
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H) && ( \
|
||||
(H.head && H.head.flags & HEADCOVERSEYES) || \
|
||||
(H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
|
||||
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
|
||||
))
|
||||
user << "\red You're going to need to remove that mask/helmet/glasses first."
|
||||
return
|
||||
|
||||
var/mob/living/carbon/monkey/Mo = M
|
||||
if(istype(Mo) && ( \
|
||||
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
|
||||
))
|
||||
user << "\red You're going to need to remove that mask/helmet/glasses first."
|
||||
return
|
||||
|
||||
if(istype(M, /mob/living/carbon/alien))//Aliens don't have eyes./N
|
||||
user << "\red You cannot locate any eyes on this creature!"
|
||||
return
|
||||
|
||||
switch(M.eye_op_stage)
|
||||
if(3.0)
|
||||
if(M != user)
|
||||
for(var/mob/O in (viewers(M) - user - M))
|
||||
O.show_message("\red [M] is having his eyes cauterized by [user].", 1)
|
||||
M << "\red [user] begins to cauterize your eyes!"
|
||||
user << "\red You cauterize [M]'s eyes with [src]!"
|
||||
else
|
||||
user.visible_message( \
|
||||
"\red [user] begins to have his eyes cauterized.", \
|
||||
"\red You begin to cauterize your eyes!" \
|
||||
)
|
||||
if(M == user && prob(25))
|
||||
user << "\red You mess up!"
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
if(affecting.take_damage(15))
|
||||
M:UpdateDamageIcon()
|
||||
M.updatehealth()
|
||||
else
|
||||
M.take_organ_damage(15)
|
||||
M.sdisabilities &= ~BLIND
|
||||
M.eye_stat = 0
|
||||
M:eye_op_stage = 0.0
|
||||
|
||||
else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
|
||||
return ..()
|
||||
|
||||
return
|
||||
|
||||
/*
|
||||
* Surgical Drill
|
||||
*/
|
||||
//obj/item/weapon/surgicaldrill
|
||||
|
||||
|
||||
/*
|
||||
* Scalpel
|
||||
*/
|
||||
/obj/item/weapon/scalpel/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
//if(M.mutations & HUSK) return ..()
|
||||
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
|
||||
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/table/, M.loc) && M.lying && prob(50))))
|
||||
return ..()
|
||||
|
||||
src.add_fingerprint(user)
|
||||
|
||||
if(user.zone_sel.selecting == "groin")
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
switch(M:appendix_op_stage)
|
||||
if(0.0)
|
||||
if(M != user)
|
||||
for(var/mob/O in (viewers(M) - user - M))
|
||||
O.show_message("\red [M] is beginning to have his abdomen cut open with [src] by [user].", 1)
|
||||
M << "\red [user] begins to cut open your abdomen with [src]!"
|
||||
user << "\red You cut [M]'s abdomen open with [src]!"
|
||||
M:appendix_op_stage = 1.0
|
||||
if(3.0)
|
||||
if(M != user)
|
||||
for(var/mob/O in (viewers(M) - user - M))
|
||||
O.show_message("\red [M] is beginning to have his appendix seperated with [src] by [user].", 1)
|
||||
M << "\red [user] begins to seperate your appendix with [src]!"
|
||||
user << "\red You seperate [M]'s appendix with [src]!"
|
||||
M:appendix_op_stage = 4.0
|
||||
return
|
||||
|
||||
if(user.zone_sel.selecting == "head" || istype(M, /mob/living/carbon/metroid))
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H) && ( \
|
||||
(H.head && H.head.flags & HEADCOVERSEYES) || \
|
||||
(H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
|
||||
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
|
||||
))
|
||||
user << "\red You're going to need to remove that mask/helmet/glasses first."
|
||||
return
|
||||
|
||||
var/mob/living/carbon/monkey/Mo = M
|
||||
if(istype(Mo) && ( \
|
||||
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
|
||||
))
|
||||
user << "\red You're going to need to remove that mask/helmet/glasses first."
|
||||
return
|
||||
|
||||
switch(M:brain_op_stage)
|
||||
if(0.0)
|
||||
if(istype(M, /mob/living/carbon/metroid))
|
||||
if(M.stat == 2)
|
||||
for(var/mob/O in (viewers(M) - user - M))
|
||||
O.show_message("\red [M.name] is beginning to have its flesh cut open with [src] by [user].", 1)
|
||||
M << "\red [user] begins to cut open your flesh with [src]!"
|
||||
user << "\red You cut [M]'s flesh open with [src]!"
|
||||
M:brain_op_stage = 1.0
|
||||
|
||||
return
|
||||
|
||||
if(M != user)
|
||||
for(var/mob/O in (viewers(M) - user - M))
|
||||
O.show_message("\red [M] is beginning to have his head cut open with [src] by [user].", 1)
|
||||
M << "\red [user] begins to cut open your head with [src]!"
|
||||
user << "\red You cut [M]'s head open with [src]!"
|
||||
else
|
||||
user.visible_message( \
|
||||
"\red [user] begins to cut open his skull with [src]!", \
|
||||
"\red You begin to cut open your head with [src]!" \
|
||||
)
|
||||
|
||||
if(M == user && prob(25))
|
||||
user << "\red You mess up!"
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
if(affecting.take_damage(15))
|
||||
M:UpdateDamageIcon()
|
||||
else
|
||||
M.take_organ_damage(15)
|
||||
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
affecting.take_damage(7)
|
||||
else
|
||||
M.take_organ_damage(7)
|
||||
|
||||
M.updatehealth()
|
||||
M:brain_op_stage = 1.0
|
||||
|
||||
if(1)
|
||||
if(istype(M, /mob/living/carbon/metroid))
|
||||
if(M.stat == 2)
|
||||
for(var/mob/O in (viewers(M) - user - M))
|
||||
O.show_message("\red [M.name] is having its silky inndards cut apart with [src] by [user].", 1)
|
||||
M << "\red [user] begins to cut apart your innards with [src]!"
|
||||
user << "\red You cut [M]'s silky innards apart with [src]!"
|
||||
M:brain_op_stage = 2.0
|
||||
return
|
||||
if(2.0)
|
||||
if(istype(M, /mob/living/carbon/metroid))
|
||||
if(M.stat == 2)
|
||||
var/mob/living/carbon/metroid/Metroid = M
|
||||
if(Metroid.cores > 0)
|
||||
if(istype(M, /mob/living/carbon/metroid))
|
||||
user << "\red You attempt to remove [M]'s core, but [src] is ineffective!"
|
||||
return
|
||||
|
||||
if(M != user)
|
||||
for(var/mob/O in (viewers(M) - user - M))
|
||||
O.show_message("\red [M] is having his connections to the brain delicately severed with [src] by [user].", 1)
|
||||
M << "\red [user] begins to cut open your head with [src]!"
|
||||
user << "\red You cut [M]'s head open with [src]!"
|
||||
else
|
||||
user.visible_message( \
|
||||
"\red [user] begin to delicately remove the connections to his brain with [src]!", \
|
||||
"\red You begin to cut open your head with [src]!" \
|
||||
)
|
||||
if(M == user && prob(25))
|
||||
user << "\red You nick an artery!"
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
if(affecting.take_damage(75))
|
||||
M:UpdateDamageIcon()
|
||||
else
|
||||
M.take_organ_damage(75)
|
||||
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
affecting.take_damage(7)
|
||||
else
|
||||
M.take_organ_damage(7)
|
||||
|
||||
M.updatehealth()
|
||||
M:brain_op_stage = 3.0
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
else if(user.zone_sel.selecting == "eyes")
|
||||
user << "\blue So far so good."
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H) && ( \
|
||||
(H.head && H.head.flags & HEADCOVERSEYES) || \
|
||||
(H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
|
||||
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
|
||||
))
|
||||
user << "\red You're going to need to remove that mask/helmet/glasses first."
|
||||
return
|
||||
|
||||
var/mob/living/carbon/monkey/Mo = M
|
||||
if(istype(Mo) && ( \
|
||||
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
|
||||
))
|
||||
user << "\red You're going to need to remove that mask/helmet/glasses first."
|
||||
return
|
||||
|
||||
if(istype(M, /mob/living/carbon/alien) || istype(M, /mob/living/carbon/metroid))//Aliens don't have eyes./N
|
||||
user << "\red You cannot locate any eyes on this creature!"
|
||||
return
|
||||
|
||||
switch(M:eye_op_stage)
|
||||
if(0.0)
|
||||
if(M != user)
|
||||
for(var/mob/O in (viewers(M) - user - M))
|
||||
O.show_message("\red [M] is beginning to have his eyes incised with [src] by [user].", 1)
|
||||
M << "\red [user] begins to cut open your eyes with [src]!"
|
||||
user << "\red You make an incision around [M]'s eyes with [src]!"
|
||||
else
|
||||
user.visible_message( \
|
||||
"\red [user] begins to cut around his eyes with [src]!", \
|
||||
"\red You begin to cut open your eyes with [src]!" \
|
||||
)
|
||||
if(M == user && prob(25))
|
||||
user << "\red You mess up!"
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
if(affecting.take_damage(15))
|
||||
M:UpdateDamageIcon()
|
||||
else
|
||||
M.take_organ_damage(15)
|
||||
|
||||
user << "\blue So far so good before."
|
||||
M.updatehealth()
|
||||
M:eye_op_stage = 1.0
|
||||
user << "\blue So far so good after."
|
||||
else
|
||||
return ..()
|
||||
/* wat
|
||||
else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
|
||||
return ..()
|
||||
*/
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
* Circular Saw
|
||||
*/
|
||||
/obj/item/weapon/circular_saw/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
|
||||
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/table/, M.loc) && M.lying && prob(50))))
|
||||
return ..()
|
||||
|
||||
src.add_fingerprint(user)
|
||||
|
||||
if(user.zone_sel.selecting == "head" || istype(M, /mob/living/carbon/metroid))
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H) && ( \
|
||||
(H.head && H.head.flags & HEADCOVERSEYES) || \
|
||||
(H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
|
||||
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
|
||||
))
|
||||
user << "\red You're going to need to remove that mask/helmet/glasses first."
|
||||
return
|
||||
|
||||
var/mob/living/carbon/monkey/Mo = M
|
||||
if(istype(Mo) && ( \
|
||||
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
|
||||
))
|
||||
user << "\red You're going to need to remove that mask/helmet/glasses first."
|
||||
return
|
||||
|
||||
switch(M:brain_op_stage)
|
||||
if(1.0)
|
||||
if(istype(M, /mob/living/carbon/metroid))
|
||||
return
|
||||
if(M != user)
|
||||
for(var/mob/O in (viewers(M) - user - M))
|
||||
O.show_message("\red [M] has his skull sawed open with [src] by [user].", 1)
|
||||
M << "\red [user] begins to saw open your head with [src]!"
|
||||
user << "\red You saw [M]'s head open with [src]!"
|
||||
else
|
||||
user.visible_message( \
|
||||
"\red [user] saws open his skull with [src]!", \
|
||||
"\red You begin to saw open your head with [src]!" \
|
||||
)
|
||||
if(M == user && prob(25))
|
||||
user << "\red You mess up!"
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
if(affecting.take_damage(40))
|
||||
M:UpdateDamageIcon()
|
||||
M.updatehealth()
|
||||
else
|
||||
M.take_organ_damage(40)
|
||||
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
affecting.take_damage(7)
|
||||
else
|
||||
M.take_organ_damage(7)
|
||||
|
||||
M.updatehealth()
|
||||
M:brain_op_stage = 2.0
|
||||
|
||||
if(2.0)
|
||||
if(istype(M, /mob/living/carbon/metroid))
|
||||
if(M.stat == 2)
|
||||
var/mob/living/carbon/metroid/Metroid = M
|
||||
if(Metroid.cores > 0)
|
||||
for(var/mob/O in (viewers(M) - user - M))
|
||||
O.show_message("\red [M.name] is having one of its cores sawed out with [src] by [user].", 1)
|
||||
|
||||
Metroid.cores--
|
||||
M << "\red [user] begins to remove one of your cores with [src]! ([Metroid.cores] cores remaining)"
|
||||
user << "\red You cut one of [M]'s cores out with [src]! ([Metroid.cores] cores remaining)"
|
||||
|
||||
new/obj/item/metroid_core(M.loc)
|
||||
|
||||
if(Metroid.cores <= 0)
|
||||
M.icon_state = "baby roro dead-nocore"
|
||||
|
||||
return
|
||||
|
||||
if(3.0)
|
||||
if(M.mind && M.mind.changeling)
|
||||
user << "\red The neural tissue regrows before your eyes as you cut it."
|
||||
return
|
||||
|
||||
if(M != user)
|
||||
for(var/mob/O in (viewers(M) - user - M))
|
||||
O.show_message("\red [M] has his spine's connection to the brain severed with [src] by [user].", 1)
|
||||
M << "\red [user] severs your brain's connection to the spine with [src]!"
|
||||
user << "\red You sever [M]'s brain's connection to the spine with [src]!"
|
||||
else
|
||||
user.visible_message( \
|
||||
"\red [user] severs his brain's connection to the spine with [src]!", \
|
||||
"\red You sever your brain's connection to the spine with [src]!" \
|
||||
)
|
||||
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> Debrained [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Debrained by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) debrained [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
|
||||
log_admin("ATTACK: [user.name] ([user.ckey]) debrained [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
|
||||
msg_admin_attack("ATTACK: [user.name] ([user.ckey]) debrained [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") //BS12 EDIT ALG
|
||||
|
||||
var/obj/item/brain/B = new(M.loc)
|
||||
B.transfer_identity(M)
|
||||
|
||||
M:brain_op_stage = 4.0
|
||||
M.death()//You want them to die after the brain was transferred, so not to trigger client death() twice.
|
||||
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
else
|
||||
return ..()
|
||||
/*
|
||||
else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
|
||||
return ..()
|
||||
*/
|
||||
return
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/mob/living/carbon/
|
||||
gender = MALE
|
||||
var/list/stomach_contents = list()
|
||||
|
||||
var/brain_op_stage = 0.0
|
||||
/*
|
||||
var/eye_op_stage = 0.0
|
||||
var/appendix_op_stage = 0.0
|
||||
|
||||
*/
|
||||
var/antibodies = 0
|
||||
|
||||
var/silent = null //Can't talk. Value goes down every life proc.
|
||||
|
||||
@@ -150,6 +150,8 @@
|
||||
|
||||
/mob/living/carbon/human/proc/get_organ(var/zone)
|
||||
if(!zone) zone = "chest"
|
||||
if (zone in list( "eyes", "mouth" ))
|
||||
zone = "head"
|
||||
return organs_by_name[zone]
|
||||
|
||||
/mob/living/carbon/human/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0)
|
||||
|
||||
Reference in New Issue
Block a user