From cd502b6a16a2d7acd871caef7edd0d59ebb07eca Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Wed, 14 Oct 2015 07:05:49 -0400 Subject: [PATCH] surgeryize me cap'n --- code/modules/mob/living/carbon/brain/brain_item.dm | 6 ++++++ code/modules/organs/organ.dm | 5 ++++- code/modules/organs/organ_internal.dm | 8 ++++++++ code/modules/surgery/organs_internal.dm | 10 ++-------- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm index 3981a18f59d..10b8d580447 100644 --- a/code/modules/mob/living/carbon/brain/brain_item.dm +++ b/code/modules/mob/living/carbon/brain/brain_item.dm @@ -18,6 +18,12 @@ /obj/item/organ/brain/attack_self(mob/user as mob) return //let's not have players taken out of the round as easily as a click, once you have their brain. +/obj/item/organ/brain/surgeryize() + if(!owner) + return + owner.ear_damage = 0 //Yeah, didn't you...hear? The ears are totally inside the brain. + owner.ear_deaf = 0 + /obj/item/organ/brain/xeno name = "thinkpan" desc = "It looks kind of like an enormous wad of purple bubblegum." diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index a93d2a278a8..e7d4fd89eba 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -323,4 +323,7 @@ var/list/organ_cache = list() if(fingerprintslast) O.fingerprintslast = fingerprintslast user.put_in_active_hand(O) - qdel(src) \ No newline at end of file + qdel(src) + +/obj/item/organ/proc/surgeryize() + return \ No newline at end of file diff --git a/code/modules/organs/organ_internal.dm b/code/modules/organs/organ_internal.dm index 323fe8519c1..46d7f01b0d9 100644 --- a/code/modules/organs/organ_internal.dm +++ b/code/modules/organs/organ_internal.dm @@ -81,6 +81,14 @@ owner.b_eyes ? owner.b_eyes : 0 ) +/obj/item/organ/eyes/surgeryize() + if(!owner) + return + owner.disabilities &= ~NEARSIGHTED + owner.sdisabilities &= ~BLIND + owner.eye_blurry = 0 + owner.eye_blind = 0 + /obj/item/organ/liver name = "liver" icon_state = "liver" diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index d0f70b6482b..6b29f969743 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -150,20 +150,14 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) for(var/obj/item/organ/I in affected.internal_organs) + if(I) + I.surgeryize() if(I && I.damage > 0) if(I.robotic < 2) user.visible_message("\blue [user] treats damage to [target]'s [I.name] with [tool_name].", \ "\blue You treat damage to [target]'s [I.name] with [tool_name]." ) I.damage = 0 - if(target_zone == "head") - target.disabilities &= ~NEARSIGHTED - target.sdisabilities &= ~BLIND - target.eye_blurry = 0 - target.eye_blind = 0 - target.ear_damage = 0 - target.ear_deaf = 0 - fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target))