From 98378819c42b652d5a85e52e07ef23c35e20a7f9 Mon Sep 17 00:00:00 2001 From: MarinaGryphon Date: Sat, 14 Oct 2017 12:03:47 -0500 Subject: [PATCH] Fixed bugs with shell surgery and human damage overlays. (#3637) You no longer have to punch people to reset their overlay. (This bug was noticed with, but is not limited to, shells.) Shells now have their own face repair surgery. --- .../mob/living/carbon/human/human_damage.dm | 1 + code/modules/surgery/face.dm | 126 +++++++++++++++++- html/changelogs/mdp-shellfix.yml | 5 + 3 files changed, 131 insertions(+), 1 deletion(-) create mode 100644 html/changelogs/mdp-shellfix.yml diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 9dd3581c2a7..c3a418f3116 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -22,6 +22,7 @@ //TODO: fix husking if( ((maxHealth - total_burn) < config.health_threshold_dead) && stat == DEAD) ChangeToHusk() + UpdateDamageIcon() // to fix that darn overlay bug return /mob/living/carbon/human/adjustBrainLoss(var/amount) diff --git a/code/modules/surgery/face.dm b/code/modules/surgery/face.dm index 51d199a4eed..63616cf7423 100644 --- a/code/modules/surgery/face.dm +++ b/code/modules/surgery/face.dm @@ -16,7 +16,7 @@ /datum/surgery_step/generic/cut_face allowed_tools = list( - /obj/item/weapon/scalpel = 100, + /obj/item/weapon/scalpel = 100, /obj/item/weapon/material/knife = 75, /obj/item/weapon/material/shard = 50 ) @@ -135,3 +135,127 @@ user.visible_message("[user]'s hand slips, leaving a small burn on [target]'s face with \the [tool]!", \ "Your hand slips, leaving a small burn on [target]'s face with \the [tool]!") target.apply_damage(4, BURN, affected) + +/datum/surgery_step/robotics/face + priority = 2 + can_infect = 0 + can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + return target_zone == "mouth" + +/datum/surgery_step/robotics/face/synthskin + allowed_tools = list( + /obj/item/weapon/scalpel = 100, + /obj/item/weapon/material/knife = 75, + /obj/item/weapon/material/shard = 50 + ) + + min_duration = 90 + max_duration = 110 + + can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + return ..() && target.op_stage.face == 0 && target.get_species() == "Shell Frame" + + begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + user.visible_message("[user] starts to cut open [target]'s synthskin face and neck with \the [tool].", \ + "You start to cut open [target]'s synthskin face and neck with \the [tool].") + ..() + + end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + user.visible_message("[user] has cut open [target]'s synthskin face and neck with \the [tool]." , \ + "You have cut open [target]'s synthskin 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/obj/item/organ/external/affected = target.get_organ(target_zone) + user.visible_message("[user]'s hand slips, slicing [target]'s throat wth \the [tool]!" , \ + "Your hand slips, slicing [target]'s throat wth \the [tool]!" ) + affected.createwound(CUT, 60) + +/datum/surgery_step/robotics/face/mend_voice + allowed_tools = list( + /obj/item/device/multitool = 100, \ + /obj/item/stack/cable_coil = 75 + ) + + 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 voice synthesiser with \the [tool].", \ + "You start mending [target]'s voice synthesiser with \the [tool].") + ..() + + end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + user.visible_message("[user] mends [target]'s voice synthesiser with \the [tool].", \ + "You mend [target]'s voice synthesiser 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("[user]'s hand slips!", \ + "Your hand slips!") + +/datum/surgery_step/robotics/face/fix_face + allowed_tools = list( + /obj/item/weapon/retractor = 100, \ + /obj/item/weapon/wirecutters = 85, \ + /obj/item/weapon/material/kitchen/utensil/fork = 55) + + 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 the synthskin on [target]'s face back in place with \the [tool].", \ + "You start pulling the synthskin 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("[user] pulls the synthskin on [target]'s face back in place with \the [tool].", \ + "You pull the synthskin 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/obj/item/organ/external/affected = target.get_organ(target_zone) + user.visible_message("[user]'s hand slips, tearing the synthskin on [target]'s face with \the [tool]!", \ + "Your hand slips, tearing the synthskin on [target]'s face with \the [tool]!") + target.apply_damage(10, BRUTE, affected, sharp=1, sharp=1) + +/datum/surgery_step/robotics/face/seal_face + allowed_tools = list( + /obj/item/weapon/cautery = 100, \ + /obj/item/clothing/mask/smokable/cigarette = 75, \ + /obj/item/weapon/flame/lighter = 50, \ + /obj/item/weapon/weldingtool = 25 + ) + + min_duration = 70 + max_duration = 100 + + can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + return ..() && 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 seal the incision on [target]'s synthskin face and neck with \the [tool]." , \ + "You are beginning to seal the incision on [target]'s synthskin face and neck with \the [tool].") + ..() + + end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + var/obj/item/organ/external/affected = target.get_organ(target_zone) + user.visible_message("[user] seals the incision on [target]'s synthskin face and neck with \the [tool].", \ + "You seal the incision on [target]'s synthskin face and neck with \the [tool].") + affected.open = 0 + if (target.op_stage.face == 3) + var/obj/item/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/obj/item/organ/external/affected = target.get_organ(target_zone) + user.visible_message("[user]'s hand slips, leaving a small burn on [target]'s synthskin face with \the [tool]!", \ + "Your hand slips, leaving a small burn on [target]'s synthskin face with \the [tool]!") + target.apply_damage(4, BURN, affected) \ No newline at end of file diff --git a/html/changelogs/mdp-shellfix.yml b/html/changelogs/mdp-shellfix.yml new file mode 100644 index 00000000000..eacee30a781 --- /dev/null +++ b/html/changelogs/mdp-shellfix.yml @@ -0,0 +1,5 @@ +author: MoondancerPony +delete-after: True +changes: + - bugfix: "Damage overlays now update on their own. You can stop punching IPCs and shells to fix their faces, now, Lualyrr." + - rscadd: "Shells now have their own face repair surgery. Use it when they're showing up as Unknown. The steps are: Scalpel, Multitool/Cable Coil, Retractor/Wirecutters, Cautery."