From 91cb7b8b32f4394f5e9bb3c17c7911d5fe3644fa Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Sat, 4 Apr 2015 23:30:49 -0400 Subject: [PATCH] Final fixes --- code/modules/mob/living/carbon/human/human.dm | 8 +++---- .../mob/living/carbon/human/human_defense.dm | 4 ++-- code/modules/organs/organ_external.dm | 22 +++++++++---------- code/modules/surgery/headreattach.dm | 13 ++++++----- 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 591da7a4c5d..56d0f59048d 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -236,7 +236,7 @@ while(limbs_affected != 0) processing_dismember = pick(organs) if(processing_dismember.name != "chest" && processing_dismember.name != "head" && processing_dismember.name != "groin") - processing_dismember.droplimb(1,pick(0,1,2)) + processing_dismember.droplimb(1,pick(0,1,2),0,1) limbs_affected -= 1 @@ -260,7 +260,7 @@ while(limbs_affected != 0) processing_dismember = pick(organs) if(processing_dismember.name != "chest" && processing_dismember.name != "head" && processing_dismember.name != "groin") - processing_dismember.droplimb(1,pick(0,2)) + processing_dismember.droplimb(1,pick(0,2),0,1) limbs_affected -= 1 else @@ -270,7 +270,7 @@ while(limbs_affected != 0) processing_dismember = pick(organs) if(processing_dismember.name != "chest" && processing_dismember.name != "head" && processing_dismember.name != "groin") - processing_dismember.droplimb(1,pick(0,2)) + processing_dismember.droplimb(1,pick(0,2),0,1) limbs_affected -= 1 if (!istype(l_ear, /obj/item/clothing/ears/earmuffs) && !istype(r_ear, /obj/item/clothing/ears/earmuffs)) @@ -292,7 +292,7 @@ while(limbs_affected != 0) processing_dismember = pick(organs) if(processing_dismember.name != "chest" && processing_dismember.name != "head" && processing_dismember.name != "groin") - processing_dismember.droplimb(1,1) + processing_dismember.droplimb(1,1,0,1) limbs_affected -= 1 if (!istype(l_ear, /obj/item/clothing/ears/earmuffs) && !istype(r_ear, /obj/item/clothing/ears/earmuffs)) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 9151640e7f2..e29841092bc 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -240,9 +240,9 @@ emp_act del(src) var/obj/item/organ/external/affecting = get_organ(ran_zone(user.zone_sel.selecting)) - if(!affecting || (affecting.status & ORGAN_DESTROYED) || affecting.is_stump()) + if(affecting.is_stump() || !affecting || affecting.status & ORGAN_DESTROYED) user << "They are missing that limb!" - return 0 + return 1 var/hit_area = affecting.name if(user != src) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 3380de5bca7..5defb11c251 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -577,7 +577,7 @@ Note that amputating the affected organ does in fact remove the infection from t ****************************************************/ //Handles dismemberment -/obj/item/organ/external/proc/droplimb(var/clean, var/disintegrate, var/ignore_children) +/obj/item/organ/external/proc/droplimb(var/clean, var/disintegrate, var/ignore_children, var/nodamage) if(cannot_amputate || !owner) return @@ -608,7 +608,7 @@ Note that amputating the affected organ does in fact remove the infection from t victim.traumatic_shock += 30 wounds.Cut() - if(parent) + if(parent && !nodamage) var/datum/wound/W if(clean || max_damage < 50) W = new/datum/wound/lost_limb/small(max_damage) @@ -868,8 +868,8 @@ Note that amputating the affected organ does in fact remove the infection from t name = "upper body" limb_name = "chest" icon_name = "torso" - health = 100 - min_broken_damage = 35 + max_damage = 100 + min_broken_damage = 50 body_part = UPPER_TORSO vital = 1 amputation_point = "spine" @@ -882,8 +882,8 @@ Note that amputating the affected organ does in fact remove the infection from t name = "lower body" limb_name = "groin" icon_name = "groin" - health = 100 - min_broken_damage = 35 + max_damage = 100 + min_broken_damage = 50 body_part = LOWER_TORSO vital = 1 parent_organ = "chest" @@ -894,7 +894,7 @@ Note that amputating the affected organ does in fact remove the infection from t limb_name = "l_arm" name = "left arm" icon_name = "l_arm" - health = 50 + max_damage = 60 min_broken_damage = 30 body_part = ARM_LEFT parent_organ = "chest" @@ -912,7 +912,7 @@ Note that amputating the affected organ does in fact remove the infection from t limb_name = "l_leg" name = "left leg" icon_name = "l_leg" - health = 50 + max_damage = 60 min_broken_damage = 30 body_part = LEG_LEFT icon_position = LEFT @@ -932,7 +932,7 @@ Note that amputating the affected organ does in fact remove the infection from t limb_name = "l_foot" name = "left foot" icon_name = "l_foot" - health = 30 + max_damage = 30 min_broken_damage = 15 body_part = FOOT_LEFT icon_position = LEFT @@ -957,7 +957,7 @@ Note that amputating the affected organ does in fact remove the infection from t limb_name = "l_hand" name = "left hand" icon_name = "l_hand" - health = 30 + max_damage = 30 min_broken_damage = 15 body_part = HAND_LEFT parent_organ = "l_arm" @@ -980,7 +980,7 @@ Note that amputating the affected organ does in fact remove the infection from t limb_name = "head" icon_name = "head" name = "head" - health = 75 + max_damage = 70 min_broken_damage = 35 body_part = HEAD vital = 1 diff --git a/code/modules/surgery/headreattach.dm b/code/modules/surgery/headreattach.dm index 9957ee8b78a..4be43c44fd6 100644 --- a/code/modules/surgery/headreattach.dm +++ b/code/modules/surgery/headreattach.dm @@ -1,5 +1,6 @@ //This is an uguu head restoration surgery TOTALLY not yoinked from chinsky's limb reattacher /datum/surgery_step/attach_head/ + priority = 3 // Must be higher than /datum/surgery_step/internal allowed_tools = list(/obj/item/organ/external/head = 100) can_infect = 0 @@ -7,20 +8,20 @@ max_duration = 100 can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - if(..()) - var/obj/item/organ/external/head = target.get_organ(target_zone) - return !head && target_zone == "head" + var/obj/item/organ/external/head = target.get_organ(target_zone) + return isnull(head) && target_zone == "head" && !isnull(target.species.has_limbs["head"]) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("[user] starts attaching [tool] to [target]'s reshaped neck.", \ - "You start attaching [tool] to [target]'s reshaped neck.") + user.visible_message("[user] starts attaching [tool] to [target]'s neck.", \ + "You start attaching [tool] to [target]'s neck.") end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("\blue [user] has attached [target]'s head to the body.", \ "\blue You have attached [target]'s head to the body.") var/obj/item/organ/external/head = tool - head.loc = target + user.unEquip(head) head.replaced(target) + head.loc = target head.status = 0 target.update_body() target.updatehealth()