Skip to content

Commit

Permalink
fix(surgery): fixes wrong messages during mend_bones and saw steps
Browse files Browse the repository at this point in the history
  • Loading branch information
Filatelele authored Nov 22, 2023
1 parent 8e101f8 commit 8236cfe
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
14 changes: 8 additions & 6 deletions code/datums/surgery/steps/bone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,25 @@
return (..() && parent_organ.stage == 1)

/datum/surgery_step/bone/mend_bone/initiate(obj/item/organ/external/parent_organ, obj/item/organ/target_organ, mob/living/carbon/human/target, obj/item/tool, mob/user)
var/bone = parent_organ.encased ? "[target]'s [parent_organ.encased]" : "bones in [target]'s [parent_organ]"
announce_preop(user,
"[user] is beginning to piece together [target]'s skull with \the [tool].",
"You are beginning to piece together [target]'s skull with \the [tool]."
"[user] is beginning to piece together [bone] with \the [tool].",
"You are beginning to piece together [bone] with \the [tool]."
)
return ..()

/datum/surgery_step/bone/mend_bone/success(obj/item/organ/external/parent_organ, obj/item/organ/target_organ, mob/living/carbon/human/target, obj/item/tool, mob/user)
var/bone = parent_organ.encased ? "[target]'s [parent_organ.encased]" : "bones in [target]'s [parent_organ]"
announce_success(user,
"[user] sets [target]'s skull with \the [tool].",
"You set [target]'s skull with \the [tool]."
"[user] sets [bone] with \the [tool].",
"You set [bone] with \the [tool]."
)
parent_organ.stage = 2

/datum/surgery_step/bone/mend_bone/failure(obj/item/organ/external/parent_organ, obj/item/organ/target_organ, mob/living/carbon/human/target, obj/item/tool, mob/user)
announce_failure(user,
"[user]'s hand slips, damaging [target]'s face with \the [tool]!",
"Your hand slips, damaging [target]'s face with \the [tool]!"
"[user]'s hand slips, damaging [target]'s [parent_organ.name] with \the [tool]!",
"Your hand slips, damaging [target]'s [parent_organ.name] with \the [tool]!"
)
parent_organ.take_external_damage(10, used_weapon = tool)
parent_organ.status |= ORGAN_DISFIGURED
Expand Down
15 changes: 9 additions & 6 deletions code/datums/surgery/steps/generic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,10 @@
return (..() && parent_organ.open() == SURGERY_RETRACTED)

/datum/surgery_step/generic/saw/initiate(obj/item/organ/external/parent_organ, obj/item/organ/target_organ, mob/living/carbon/human/target, obj/item/tool, mob/user)
var/bone = parent_organ.encased ? "[target]'s [parent_organ.encased]" : "bones in [target]'s [parent_organ]"
announce_preop(user,
"[user] begins to cut through [target]'s [parent_organ.encased] with \the [tool].",
"You begin to cut through [target]'s [parent_organ.encased] with \the [tool]."
"[user] begins to cut through [bone] with \the [tool].",
"You begin to cut through [bone] with \the [tool]."
)
target.custom_pain(
"Something hurts horribly in your [parent_organ]!",
Expand All @@ -367,16 +368,18 @@
return ..()

/datum/surgery_step/generic/saw/success(obj/item/organ/external/parent_organ, obj/item/organ/target_organ, mob/living/carbon/human/target, obj/item/tool, mob/user)
var/bone = parent_organ.encased ? "[target]'s [parent_organ.encased]" : "bones in [target]'s [parent_organ]"
announce_success(user,
"[user] has cut [target]'s [parent_organ.encased] open with \the [tool].",
"You have cut [target]'s [parent_organ.encased] open with \the [tool]."
"[user] has cut [bone] open with \the [tool].",
"You have cut [bone] open with \the [tool]."
)
parent_organ.fracture()

/datum/surgery_step/generic/saw/failure(obj/item/organ/external/parent_organ, obj/item/organ/target_organ, mob/living/carbon/human/target, obj/item/tool, mob/user)
var/bone = parent_organ.encased ? "[target]'s [parent_organ.encased]" : "bones in [target]'s [parent_organ]"
announce_failure(user,
"[user]'s hand slips, cracking [target]'s [parent_organ.encased] with \the [tool]!" ,
"Your hand slips, cracking [target]'s [parent_organ.encased] with \the [tool]!"
"[user]'s hand slips, cracking [bone] with \the [tool]!" ,
"Your hand slips, cracking [bone] with \the [tool]!"
)
parent_organ.take_external_damage(
15,
Expand Down

0 comments on commit 8236cfe

Please sign in to comment.