From 69d260a11d239f8114eaeb6ffeef2e2db4c245ff Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Tue, 28 Jan 2014 16:00:36 +1030 Subject: [PATCH] Preliminary surgery work for IS_SYNTHETIC. --- code/modules/organs/organ_external.dm | 32 +++++++++++++++++++++------ code/modules/surgery/braincore.dm | 14 ++++++++++-- 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 9a17eb620c..768a14a496 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -77,9 +77,19 @@ if(status & ORGAN_DESTROYED) return 0 - if(status & ORGAN_ROBOT) - brute *= 0.66 //~2/3 damage for ROBOLIMBS - burn *= 0.66 //~2/3 damage for ROBOLIMBS + if(status & ORGAN_ROBOT ) + + var/brmod = 0.66 + var/bumod = 0.66 + + if(istype(owner,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = owner + if(H.species && H.species.flags & IS_SYNTHETIC) + brmod = H.species.brute_mod + bumod = H.species.burn_mod + + brute *= brmod //~2/3 damage for ROBOLIMBS + burn *= bumod //~2/3 damage for ROBOLIMBS //If limb took enough damage, try to cut or tear it off if(body_part != UPPER_TORSO && body_part != LOWER_TORSO) //as hilarious as it is, getting hit on the chest too much shouldn't effectively gib you. @@ -628,7 +638,7 @@ This function completely restores a damaged organ to perfect condition. return 0 /datum/organ/external/get_icon(gender="") - if (status & ORGAN_ROBOT) + if (status & ORGAN_ROBOT && !(owner.species && owner.species.flags & IS_SYNTHETIC)) return new /icon('icons/mob/human_races/robotic.dmi', "[icon_name][gender ? "_[gender]" : ""]") if (status & ORGAN_MUTATED) @@ -914,7 +924,7 @@ obj/item/weapon/organ/head/attackby(obj/item/weapon/W as obj, mob/user as mob) switch(brain_op_stage) if(1) for(var/mob/O in (oviewers(brainmob) - user)) - O.show_message("\red [brainmob] has \his skull sawed open with [W] by [user].", 1) + O.show_message("\red [brainmob] has \his head sawed open with [W] by [user].", 1) brainmob << "\red [user] begins to saw open your head with [W]!" user << "\red You saw [brainmob]'s head open with [W]!" @@ -929,8 +939,16 @@ obj/item/weapon/organ/head/attackby(obj/item/weapon/W as obj, mob/user as mob) brainmob.attack_log += "\[[time_stamp()]\] Debrained by [user.name] ([user.ckey]) with [W.name] (INTENT: [uppertext(user.a_intent)])" msg_admin_attack("[user] ([user.ckey]) debrained [brainmob] ([brainmob.ckey]) (INTENT: [uppertext(user.a_intent)]) (JMP)") - var/obj/item/brain/B = new(loc) - B.transfer_identity(brainmob) + var/mob/living/carbon/human/H + if(istype(brainmob,/mob/living/carbon/human)) + H = brainmob + + if(istype(H) && H.species && H.species.flags & IS_SYNTHETIC) + var/obj/item/device/mmi/posibrain/B = new(loc) + B.transfer_identity(brainmob) + else + var/obj/item/brain/B = new(loc) + B.transfer_identity(brainmob) brain_op_stage = 4.0 else diff --git a/code/modules/surgery/braincore.dm b/code/modules/surgery/braincore.dm index b9f3fe24a4..cb89b9916d 100644 --- a/code/modules/surgery/braincore.dm +++ b/code/modules/surgery/braincore.dm @@ -94,8 +94,18 @@ target.attack_log += "\[[time_stamp()]\] Debrained by [user.name] ([user.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)])" msg_admin_attack("[user.name] ([user.ckey]) debrained [target.name] ([target.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)]) (JMP)") - var/obj/item/brain/B = new(target.loc) - B.transfer_identity(target) + var/mob/living/carbon/human/H + if(istype(target,/mob/living/carbon/human)) + H = target + + var/obj/item/brain/B + if(istype(H) && H.species && H.species.flags & IS_SYNTHETIC) + var/obj/item/device/mmi/posibrain/P = new(target.loc) + P.transfer_identity(target) + else + B = new(target.loc) + B.transfer_identity(target) + target.internal_organs -= B target:brain_op_stage = 4.0