From 6770819ae876dc7613f7c482b0ccd32e5cd2cdd4 Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Tue, 24 Mar 2015 08:38:33 -0400 Subject: [PATCH 01/11] Limb overhaul first comit --- code/controllers/configuration.dm | 4 +-- .../mob/living/carbon/human/human_damage.dm | 14 ++++---- .../mob/living/carbon/human/human_defines.dm | 2 ++ code/modules/organs/organ_external.dm | 34 +++++++++++-------- code/modules/organs/pain.dm | 7 ++-- 5 files changed, 36 insertions(+), 25 deletions(-) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 95ecef88978..51427f0788b 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -92,8 +92,8 @@ var/organ_health_multiplier = 1 var/organ_regeneration_multiplier = 1 - var/bones_can_break = 0 - var/limbs_can_break = 0 + var/bones_can_break = 1 + var/limbs_can_break = 1 var/revival_pod_plants = 1 var/revival_cloning = 1 diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index a296aabd7ea..cbca69640a7 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -6,9 +6,11 @@ return var/total_burn = 0 var/total_brute = 0 + limbpain = 0 for(var/datum/organ/external/O in organs) //hardcoded to streamline things a bit - total_brute += O.brute_dam - total_burn += O.burn_dam + if(O.vital) + total_brute += O.brute_dam + total_burn += O.burn_dam health = 100 - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute //TODO: fix husking if( (((100 - total_burn) < config.health_threshold_dead) && stat == DEAD) && (!species.flags & IS_SYNTHETIC))//100 only being used as the magic human max health number, feel free to change it if you add a var for it -- Urist @@ -49,20 +51,21 @@ /mob/living/carbon/human/getBruteLoss() var/amount = 0 for(var/datum/organ/external/O in organs) - amount += O.brute_dam + if(O.vital) + amount += O.brute_dam return amount /mob/living/carbon/human/getFireLoss() var/amount = 0 for(var/datum/organ/external/O in organs) - amount += O.burn_dam + if(O.vital) + amount += O.burn_dam return amount /mob/living/carbon/human/adjustBruteLoss(var/amount) if(species && species.brute_mod) amount = amount*species.brute_mod - if(amount > 0) take_overall_damage(amount, 0) else @@ -72,7 +75,6 @@ /mob/living/carbon/human/adjustFireLoss(var/amount) if(species && species.burn_mod) amount = amount*species.burn_mod - if(amount > 0) take_overall_damage(0, amount) else diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 04189211f2f..e00bba6e046 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -79,5 +79,7 @@ var/frozen = 0 //used for preventing attacks on admin-frozen people + var/limbpain = 0 + fire_dmi = 'icons/mob/OnFire.dmi' fire_sprite = "Standing" diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 6767170003a..e96138ed8ef 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -139,6 +139,9 @@ if (burn || brute) if (status & ORGAN_ROBOT && body_part != UPPER_TORSO && body_part != LOWER_TORSO) droplimb(1) //Robot limbs just kinda fail at full damage. + +//Removing shuffling limb damage over to parent if limb is out of HP +/* else //List organs we can pass it to var/list/datum/organ/external/possible_points = list() @@ -152,18 +155,20 @@ //And pass the pain around var/datum/organ/external/target = pick(possible_points) target.take_damage(brute, burn, sharp, edge, used_weapon, forbidden_limbs + src) +*/ // sync the organ's damage with its wounds src.update_damages() //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. if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier) if( (edge && prob(5 * brute)) || (brute > 20 && prob(2 * brute)) ) droplimb(1) return - */ +*/ + owner.updatehealth() var/result = update_icon() @@ -875,8 +880,8 @@ Note that amputating the affected organ does in fact remove the infection from t name = "chest" icon_name = "torso" display_name = "chest" - max_damage = 75 - min_broken_damage = 40 + max_damage = 200 + min_broken_damage = 50 body_part = UPPER_TORSO vital = 1 @@ -887,14 +892,13 @@ Note that amputating the affected organ does in fact remove the infection from t max_damage = 50 min_broken_damage = 30 body_part = LOWER_TORSO - vital = 1 /datum/organ/external/l_arm name = "l_arm" display_name = "left arm" icon_name = "l_arm" max_damage = 50 - min_broken_damage = 20 + min_broken_damage = 30 body_part = ARM_LEFT process() @@ -906,7 +910,7 @@ Note that amputating the affected organ does in fact remove the infection from t display_name = "left leg" icon_name = "l_leg" max_damage = 50 - min_broken_damage = 20 + min_broken_damage = 30 body_part = LEG_LEFT icon_position = LEFT @@ -915,7 +919,7 @@ Note that amputating the affected organ does in fact remove the infection from t display_name = "right arm" icon_name = "r_arm" max_damage = 50 - min_broken_damage = 20 + min_broken_damage = 30 body_part = ARM_RIGHT process() @@ -927,7 +931,7 @@ Note that amputating the affected organ does in fact remove the infection from t display_name = "right leg" icon_name = "r_leg" max_damage = 50 - min_broken_damage = 20 + min_broken_damage = 30 body_part = LEG_RIGHT icon_position = RIGHT @@ -936,7 +940,7 @@ Note that amputating the affected organ does in fact remove the infection from t display_name = "left foot" icon_name = "l_foot" max_damage = 30 - min_broken_damage = 15 + min_broken_damage = 20 body_part = FOOT_LEFT icon_position = LEFT @@ -945,7 +949,7 @@ Note that amputating the affected organ does in fact remove the infection from t display_name = "right foot" icon_name = "r_foot" max_damage = 30 - min_broken_damage = 15 + min_broken_damage = 20 body_part = FOOT_RIGHT icon_position = RIGHT @@ -954,7 +958,7 @@ Note that amputating the affected organ does in fact remove the infection from t display_name = "right hand" icon_name = "r_hand" max_damage = 30 - min_broken_damage = 15 + min_broken_damage = 20 body_part = HAND_RIGHT process() @@ -966,7 +970,7 @@ Note that amputating the affected organ does in fact remove the infection from t display_name = "left hand" icon_name = "l_hand" max_damage = 30 - min_broken_damage = 15 + min_broken_damage = 20 body_part = HAND_LEFT process() @@ -977,8 +981,8 @@ Note that amputating the affected organ does in fact remove the infection from t name = "head" icon_name = "head" display_name = "head" - max_damage = 75 - min_broken_damage = 40 + max_damage = 200 + min_broken_damage = 50 body_part = HEAD var/disfigured = 0 var/brained = 0 diff --git a/code/modules/organs/pain.dm b/code/modules/organs/pain.dm index b064fdf6621..af618f2e40d 100644 --- a/code/modules/organs/pain.dm +++ b/code/modules/organs/pain.dm @@ -88,6 +88,7 @@ mob/living/carbon/human/proc/handle_pain() return var/maxdam = 0 var/datum/organ/external/damaged_organ = null + limbpain = 0 for(var/datum/organ/external/E in organs) // amputated limbs don't cause pain if(E.amputated) continue @@ -98,8 +99,10 @@ mob/living/carbon/human/proc/handle_pain() if(dam > maxdam && (maxdam == 0 || prob(70)) ) damaged_organ = E maxdam = dam - if(damaged_organ) - pain(damaged_organ.display_name, maxdam, 0) + if(damaged_organ) + pain(damaged_organ.display_name, maxdam, 0) + if(!E.vital) + limbpain += dam // Damage to internal organs hurts a lot. for(var/n in internal_organs_by_name) From 3665d7fd31fa33f603ac1e8549c1f566871e8283 Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Tue, 24 Mar 2015 23:02:35 -0400 Subject: [PATCH 02/11] Removing the unneeded limbpain count --- code/modules/mob/living/carbon/human/human_damage.dm | 1 - code/modules/mob/living/carbon/human/human_defines.dm | 2 -- code/modules/organs/pain.dm | 4 +--- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index cbca69640a7..d751ff4892f 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -6,7 +6,6 @@ return var/total_burn = 0 var/total_brute = 0 - limbpain = 0 for(var/datum/organ/external/O in organs) //hardcoded to streamline things a bit if(O.vital) total_brute += O.brute_dam diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index e00bba6e046..04189211f2f 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -79,7 +79,5 @@ var/frozen = 0 //used for preventing attacks on admin-frozen people - var/limbpain = 0 - fire_dmi = 'icons/mob/OnFire.dmi' fire_sprite = "Standing" diff --git a/code/modules/organs/pain.dm b/code/modules/organs/pain.dm index af618f2e40d..39378d99583 100644 --- a/code/modules/organs/pain.dm +++ b/code/modules/organs/pain.dm @@ -88,7 +88,6 @@ mob/living/carbon/human/proc/handle_pain() return var/maxdam = 0 var/datum/organ/external/damaged_organ = null - limbpain = 0 for(var/datum/organ/external/E in organs) // amputated limbs don't cause pain if(E.amputated) continue @@ -101,8 +100,7 @@ mob/living/carbon/human/proc/handle_pain() maxdam = dam if(damaged_organ) pain(damaged_organ.display_name, maxdam, 0) - if(!E.vital) - limbpain += dam + // Damage to internal organs hurts a lot. for(var/n in internal_organs_by_name) From 989bde71a23ad3a647378bdbadd6ad6b629026da Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Tue, 24 Mar 2015 23:06:14 -0400 Subject: [PATCH 03/11] Setting min broken damage to half of max limb health --- code/modules/organs/organ_external.dm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index e96138ed8ef..281d9068d4c 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -890,7 +890,7 @@ Note that amputating the affected organ does in fact remove the infection from t icon_name = "groin" display_name = "groin" max_damage = 50 - min_broken_damage = 30 + min_broken_damage = 25 body_part = LOWER_TORSO /datum/organ/external/l_arm @@ -898,7 +898,7 @@ Note that amputating the affected organ does in fact remove the infection from t display_name = "left arm" icon_name = "l_arm" max_damage = 50 - min_broken_damage = 30 + min_broken_damage = 25 body_part = ARM_LEFT process() @@ -910,7 +910,7 @@ Note that amputating the affected organ does in fact remove the infection from t display_name = "left leg" icon_name = "l_leg" max_damage = 50 - min_broken_damage = 30 + min_broken_damage = 25 body_part = LEG_LEFT icon_position = LEFT @@ -919,7 +919,7 @@ Note that amputating the affected organ does in fact remove the infection from t display_name = "right arm" icon_name = "r_arm" max_damage = 50 - min_broken_damage = 30 + min_broken_damage = 25 body_part = ARM_RIGHT process() @@ -931,7 +931,7 @@ Note that amputating the affected organ does in fact remove the infection from t display_name = "right leg" icon_name = "r_leg" max_damage = 50 - min_broken_damage = 30 + min_broken_damage = 25 body_part = LEG_RIGHT icon_position = RIGHT @@ -940,7 +940,7 @@ Note that amputating the affected organ does in fact remove the infection from t display_name = "left foot" icon_name = "l_foot" max_damage = 30 - min_broken_damage = 20 + min_broken_damage = 15 body_part = FOOT_LEFT icon_position = LEFT @@ -949,7 +949,7 @@ Note that amputating the affected organ does in fact remove the infection from t display_name = "right foot" icon_name = "r_foot" max_damage = 30 - min_broken_damage = 20 + min_broken_damage = 15 body_part = FOOT_RIGHT icon_position = RIGHT @@ -958,7 +958,7 @@ Note that amputating the affected organ does in fact remove the infection from t display_name = "right hand" icon_name = "r_hand" max_damage = 30 - min_broken_damage = 20 + min_broken_damage = 15 body_part = HAND_RIGHT process() @@ -970,7 +970,7 @@ Note that amputating the affected organ does in fact remove the infection from t display_name = "left hand" icon_name = "l_hand" max_damage = 30 - min_broken_damage = 20 + min_broken_damage = 15 body_part = HAND_LEFT process() From 18239091a713dd68a38be18a6405e054639fcec0 Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Wed, 25 Mar 2015 15:03:46 -0400 Subject: [PATCH 04/11] 2 new ways of losing limbs! --- code/modules/mob/living/carbon/human/human.dm | 8 ++++---- code/modules/mob/living/carbon/human/human_defense.dm | 5 ----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 05ec3909226..a2988d9d177 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 != "groin") - processing_dismember.dismember_limb() + processing_dismember.droplimb(1,0,0,pick(0,1,2)) limbs_affected -= 1 @@ -260,7 +260,7 @@ while(limbs_affected != 0) processing_dismember = pick(organs) if(processing_dismember.name != "chest" && processing_dismember.name != "groin" && processing_dismember.name != "head") - processing_dismember.dismember_limb() + processing_dismember.droplimb(1,0,0,pick(0,2)) limbs_affected -= 1 else @@ -270,7 +270,7 @@ while(limbs_affected != 0) processing_dismember = pick(organs) if(processing_dismember.name != "chest" && processing_dismember.name != "groin") - processing_dismember.dismember_limb() + processing_dismember.droplimb(1,0,0,pick(0,2)) 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 != "groin" && processing_dismember.name != "head") - processing_dismember.dismember_limb() + processing_dismember.droplimb(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 e5145332701..1e4682bcba3 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -318,11 +318,6 @@ emp_act if(Iforce > 10 || Iforce >= 5 && prob(33)) forcesay(hit_appends) //forcesay checks stat already - if (I.damtype == BRUTE) - if((affecting.brute_dam + I.force) >= affecting.max_damage * config.organ_health_multiplier) - if(I.edge && prob(I.force)) - affecting.dismember_limb() - /* //Melee weapon embedded object code. Commented out, as most people on the forums seem to find this annoying and think it does not contribute to general gameplay. - Dave if (I.damtype == BRUTE && !I.is_robot_module()) var/damage = I.force From 971ecc06a9244d406fa7178a9487b9c75952e64a Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Wed, 25 Mar 2015 15:04:31 -0400 Subject: [PATCH 05/11] Forgot a file --- code/modules/organs/organ_external.dm | 120 ++++++++++++++++++-------- 1 file changed, 83 insertions(+), 37 deletions(-) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 281d9068d4c..258f19fef01 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -169,6 +169,21 @@ return */ + //If limb took enough damage, try to cut or tear it off + if(config.limbs_can_break && (brute_dam + burn_dam) >= (max_damage * config.organ_health_multiplier)) + if((sharp || edge) && used_weapon) + if(istype(used_weapon,/obj/item)) + var/obj/item/W = used_weapon + if(W.w_class >= 3) + droplimb(1) + return + if(brute >= 23 && prob(brute)) // Wooden baseball bat in both hands == 23 + droplimb(1,0,0,2) + return + if(burn >= 20) // Most laser rifle shots. + droplimb(1,0,0,1) + return + owner.updatehealth() var/result = update_icon() @@ -295,12 +310,6 @@ This function completely restores a damaged organ to perfect condition. return 1 return 0 -/datum/organ/external/proc/dismember_limb() - 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. - if(config.limbs_can_break) - droplimb(1) - return - /datum/organ/external/process() //Dismemberment if(status & ORGAN_DESTROYED) @@ -572,15 +581,13 @@ Note that amputating the affected organ does in fact remove the infection from t O.setAmputatedTree() //Handles dismemberment -/datum/organ/external/proc/droplimb(var/override = 0,var/no_explode = 0,var/amputation=0, var/spawn_limb=0) +/datum/organ/external/proc/droplimb(var/override = 0,var/no_explode = 0,var/amputation=0, var/disintegrate) if(destspawn) return if(override) status |= ORGAN_DESTROYED if(status & ORGAN_DESTROYED) if(body_part == UPPER_TORSO) return - if(body_part == LOWER_TORSO) - return src.status &= ~ORGAN_BROKEN src.status &= ~ORGAN_BLEEDING src.status &= ~ORGAN_SPLINTED @@ -610,22 +617,23 @@ Note that amputating the affected organ does in fact remove the infection from t switch(body_part) if(HEAD) - if(owner.species.flags & IS_SYNTHETIC) - if(owner.mind) - organ= new /obj/item/weapon/organ/head/posi(owner.loc, owner) + if(!disintegrate) + if(owner.species.flags & IS_SYNTHETIC) + if(owner.mind) + organ= new /obj/item/weapon/organ/head/posi(owner.loc, owner) + owner.death() + else if(SKELETON in owner.mutations) + organ= new /obj/item/weapon/skeleton/head(owner.loc) + else + organ= new /obj/item/weapon/organ/head(owner.loc, owner) owner.death() - else if(SKELETON in owner.mutations) - organ= new /obj/item/weapon/skeleton/head(owner.loc) - else - organ= new /obj/item/weapon/organ/head(owner.loc, owner) - owner.death() - owner.unEquip(owner.glasses) - owner.unEquip(owner.head) - owner.unEquip(owner.l_ear) - owner.unEquip(owner.r_ear) - owner.unEquip(owner.wear_mask) + owner.unEquip(owner.glasses) + owner.unEquip(owner.head) + owner.unEquip(owner.l_ear) + owner.unEquip(owner.r_ear) + owner.unEquip(owner.wear_mask) if(ARM_RIGHT) - if(!spawn_limb) + if(!disintegrate) if(status & ORGAN_ROBOT) organ = new /obj/item/robot_parts/r_arm(owner.loc) else if(SKELETON in owner.mutations) @@ -633,7 +641,7 @@ Note that amputating the affected organ does in fact remove the infection from t else organ= new /obj/item/weapon/organ/r_arm(owner.loc, owner) if(ARM_LEFT) - if(!spawn_limb) + if(!disintegrate) if(status & ORGAN_ROBOT) organ= new /obj/item/robot_parts/l_arm(owner.loc) else if(SKELETON in owner.mutations) @@ -641,7 +649,7 @@ Note that amputating the affected organ does in fact remove the infection from t else organ= new /obj/item/weapon/organ/l_arm(owner.loc, owner) if(LEG_RIGHT) - if(!spawn_limb) + if(!disintegrate) if(status & ORGAN_ROBOT) organ = new /obj/item/robot_parts/r_leg(owner.loc) else if(SKELETON in owner.mutations) @@ -649,7 +657,7 @@ Note that amputating the affected organ does in fact remove the infection from t else organ= new /obj/item/weapon/organ/r_leg(owner.loc, owner) if(LEG_LEFT) - if(!spawn_limb) + if(!disintegrate) if(status & ORGAN_ROBOT) organ = new /obj/item/robot_parts/l_leg(owner.loc) else if(SKELETON in owner.mutations) @@ -657,7 +665,7 @@ Note that amputating the affected organ does in fact remove the infection from t else organ= new /obj/item/weapon/organ/l_leg(owner.loc, owner) if(HAND_RIGHT) - if(!spawn_limb) + if(!disintegrate) if(!(status & ORGAN_ROBOT)) if(SKELETON in owner.mutations) organ = new /obj/item/weapon/skeleton/r_hand(owner.loc) @@ -665,7 +673,7 @@ Note that amputating the affected organ does in fact remove the infection from t organ= new /obj/item/weapon/organ/r_hand(owner.loc, owner) owner.unEquip(owner.gloves) if(HAND_LEFT) - if(!spawn_limb) + if(!disintegrate) if(!(status & ORGAN_ROBOT)) if(SKELETON in owner.mutations) organ = new /obj/item/weapon/skeleton/l_hand(owner.loc) @@ -673,7 +681,7 @@ Note that amputating the affected organ does in fact remove the infection from t organ= new /obj/item/weapon/organ/l_hand(owner.loc, owner) owner.unEquip(owner.gloves) if(FOOT_RIGHT) - if(!spawn_limb) + if(!disintegrate) if(!(status & ORGAN_ROBOT)) if(SKELETON in owner.mutations) organ = new /obj/item/weapon/skeleton/r_foot(owner.loc) @@ -681,7 +689,7 @@ Note that amputating the affected organ does in fact remove the infection from t organ= new /obj/item/weapon/organ/r_foot/(owner.loc, owner) owner.unEquip(owner.shoes) if(FOOT_LEFT) - if(!spawn_limb) + if(!disintegrate) if(!(status & ORGAN_ROBOT)) if(SKELETON in owner.mutations) organ = new /obj/item/weapon/skeleton/l_foot(owner.loc) @@ -703,20 +711,58 @@ Note that amputating the affected organ does in fact remove the infection from t spawn(10) del(spark_system) - if(organ) - owner.visible_message("\red [owner.name]'s [display_name] flies off in an arc.",\ - "Your [display_name] goes flying off!",\ - "You hear a terrible sound of ripping tendons and flesh.") + switch(disintegrate) + if(1) + owner.visible_message( + "\The [owner]'s [display_name] flashes away into ashes!",\ + "Your [display_name] flashes away into ashes!",\ + "You hear the crackling sound of burning flesh.") + new /obj/effect/decal/cleanable/ash(get_turf(owner)) + if(2) + owner.visible_message( + "\The [owner]'s [display_name] explodes in a shower of gore!",\ + "Your [display_name] explodes in a shower of gore!",\ + "You hear the sickening splatter of gore.") + var/obj/effect/decal/cleanable/blood/gibs/gore = new(get_turf(owner)) + if(owner.species.flesh_color) + gore.fleshcolor = owner.species.flesh_color + if(owner.species.blood_color) + gore.basecolor = owner.species.blood_color + gore.update_icon() + gore.throw_at(get_edge_target_turf(owner,pick(alldirs)),rand(1,3),30) + if(body_part == HEAD && owner.brain_op_stage != 4.0) + var/mob/living/simple_animal/borer/borer = owner.has_brain_worms() + if(borer) + borer.detatch() //Should remove borer if the brain is removed - RR + if(owner.species && owner.species.flags & IS_SYNTHETIC) + var/obj/item/device/mmi/posibrain/P = new(owner.loc) + P.transfer_identity(owner) + if(istype(P.loc,/turf)) + P.throw_at(get_edge_target_turf(owner,pick(alldirs)),rand(1,3),30) + else + var/obj/item/brain/B = new(owner.loc) + B.transfer_identity(owner) + if(istype(B.loc,/turf)) + B.throw_at(get_edge_target_turf(owner,pick(alldirs)),rand(1,3),30) + + + + if(organ) + if(!amputation) + owner.visible_message( + "\The [owner]'s [display_name] flies off in an arc!",\ + "Your [display_name] goes flying off!",\ + "You hear a terrible sound of ripping tendons and flesh.") //Throw organs around var/lol = pick(cardinal) step(organ,lol) // OK so maybe your limb just flew off, but if it was attached to a pair of cuffs then hooray! Freedom! release_restraints() - owner.regenerate_icons() - if(vital) - owner.death() + if(vital) + owner.death() + owner.regenerate_icons() return organ /**************************************************** From d8feaab17f123020c52e670b551af3d71f60806d Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Wed, 25 Mar 2015 15:42:06 -0400 Subject: [PATCH 06/11] Compile fix --- paradise.dme | 94 +++++++++++----------------------------------------- 1 file changed, 19 insertions(+), 75 deletions(-) diff --git a/paradise.dme b/paradise.dme index 21a34c8006a..d93e30ecb2c 100644 --- a/paradise.dme +++ b/paradise.dme @@ -5,79 +5,6 @@ // END_INTERNALS // BEGIN_FILE_DIR #define FILE_DIR . -#define FILE_DIR "code" -#define FILE_DIR "code/modules" -#define FILE_DIR "code/modules/jungle" -#define FILE_DIR "code/modules/shieldgen" -#define FILE_DIR "html" -#define FILE_DIR "html/images" -#define FILE_DIR "icons" -#define FILE_DIR "icons/48x48" -#define FILE_DIR "icons/ass" -#define FILE_DIR "icons/atmos" -#define FILE_DIR "icons/effects" -#define FILE_DIR "icons/mecha" -#define FILE_DIR "icons/misc" -#define FILE_DIR "icons/mob" -#define FILE_DIR "icons/mob/human_races" -#define FILE_DIR "icons/mob/in-hand" -#define FILE_DIR "icons/mob/in-hand/left" -#define FILE_DIR "icons/mob/in-hand/right" -#define FILE_DIR "icons/mob/otherHuman" -#define FILE_DIR "icons/mob/species" -#define FILE_DIR "icons/mob/species/armalis" -#define FILE_DIR "icons/mob/species/skrell" -#define FILE_DIR "icons/mob/species/tajaran" -#define FILE_DIR "icons/mob/species/unathi" -#define FILE_DIR "icons/mob/species/vox" -#define FILE_DIR "icons/mob/spirits" -#define FILE_DIR "icons/NTOS" -#define FILE_DIR "icons/NTOS/battery_icons" -#define FILE_DIR "icons/obj" -#define FILE_DIR "icons/obj/assemblies" -#define FILE_DIR "icons/obj/atmospherics" -#define FILE_DIR "icons/obj/clothing" -#define FILE_DIR "icons/obj/clothing/species" -#define FILE_DIR "icons/obj/clothing/species/skrell" -#define FILE_DIR "icons/obj/clothing/species/tajaran" -#define FILE_DIR "icons/obj/clothing/species/unathi" -#define FILE_DIR "icons/obj/clothing/species/vox" -#define FILE_DIR "icons/obj/doors" -#define FILE_DIR "icons/obj/flora" -#define FILE_DIR "icons/obj/machines" -#define FILE_DIR "icons/obj/pipes" -#define FILE_DIR "icons/obj/power_cond" -#define FILE_DIR "icons/pda_icons" -#define FILE_DIR "icons/pods" -#define FILE_DIR "icons/spideros_icons" -#define FILE_DIR "icons/stamp_icons" -#define FILE_DIR "icons/Testing" -#define FILE_DIR "icons/turf" -#define FILE_DIR "icons/vehicles" -#define FILE_DIR "icons/vending_icons" -#define FILE_DIR "nano" -#define FILE_DIR "nano/images" -#define FILE_DIR "sound" -#define FILE_DIR "sound/AI" -#define FILE_DIR "sound/ambience" -#define FILE_DIR "sound/effects" -#define FILE_DIR "sound/effects/turret" -#define FILE_DIR "sound/effects/wind" -#define FILE_DIR "sound/hallucinations" -#define FILE_DIR "sound/items" -#define FILE_DIR "sound/machines" -#define FILE_DIR "sound/mecha" -#define FILE_DIR "sound/misc" -#define FILE_DIR "sound/music" -#define FILE_DIR "sound/piano" -#define FILE_DIR "sound/turntable" -#define FILE_DIR "sound/violin" -#define FILE_DIR "sound/voice" -#define FILE_DIR "sound/voice/complionator" -#define FILE_DIR "sound/voice/Serithi" -#define FILE_DIR "sound/vox" -#define FILE_DIR "sound/vox_fem" -#define FILE_DIR "sound/weapons" // END_FILE_DIR // BEGIN_PREFERENCES #define DEBUG @@ -253,6 +180,7 @@ #include "code\datums\wires\radio.dm" #include "code\datums\wires\robot.dm" #include "code\datums\wires\syndicatebomb.dm" +#include "code\datums\wires\taperecorder.dm" #include "code\datums\wires\vending.dm" #include "code\datums\wires\wires.dm" #include "code\defines\obj.dm" @@ -593,7 +521,6 @@ #include "code\game\mecha\working\working.dm" #include "code\game\objects\empulse.dm" #include "code\game\objects\explosion.dm" -#include "code\game\objects\explosion_recursive.dm" #include "code\game\objects\items.dm" #include "code\game\objects\objs.dm" #include "code\game\objects\structures.dm" @@ -869,6 +796,7 @@ #include "code\game\vehicles\spacepods\construction.dm" #include "code\game\vehicles\spacepods\equipment.dm" #include "code\game\vehicles\spacepods\parts.dm" +#include "code\game\vehicles\spacepods\pod_fabricator.dm" #include "code\game\vehicles\spacepods\spacepod.dm" #include "code\game\verbs\atom_verbs.dm" #include "code\game\verbs\ooc.dm" @@ -1425,6 +1353,14 @@ #include "code\modules\nano\nanomapgen.dm" #include "code\modules\nano\nanoui.dm" #include "code\modules\nano\modules\crew_monitor.dm" +#include "code\modules\ninja\energy_katana.dm" +#include "code\modules\ninja\suit\eye.dm" +#include "code\modules\ninja\suit\gloves.dm" +#include "code\modules\ninja\suit\head.dm" +#include "code\modules\ninja\suit\mask.dm" +#include "code\modules\ninja\suit\shoes.dm" +#include "code\modules\ninja\suit\suit.dm" +#include "code\modules\ninja\suit\suit_initialisation.dm" #include "code\modules\organs\blood.dm" #include "code\modules\organs\organ.dm" #include "code\modules\organs\organ_external.dm" @@ -1520,7 +1456,6 @@ #include "code\modules\reagents\Chemistry-Holder.dm" #include "code\modules\reagents\Chemistry-Machinery.dm" #include "code\modules\reagents\Chemistry-Readme.dm" -#include "code\modules\reagents\Chemistry-Reagents-Antidepressants.dm" #include "code\modules\reagents\Chemistry-Reagents.dm" #include "code\modules\reagents\Chemistry-Recipes.dm" #include "code\modules\reagents\dartgun.dm" @@ -1528,6 +1463,14 @@ #include "code\modules\reagents\reagent_containers.dm" #include "code\modules\reagents\reagent_dispenser.dm" #include "code\modules\reagents\syringe_gun.dm" +#include "code\modules\reagents\newchem\chem_heater.dm" +#include "code\modules\reagents\newchem\drugs.dm" +#include "code\modules\reagents\newchem\medicine.dm" +#include "code\modules\reagents\newchem\newchem_procs.dm" +#include "code\modules\reagents\newchem\other.dm" +#include "code\modules\reagents\newchem\patch.dm" +#include "code\modules\reagents\newchem\pyro.dm" +#include "code\modules\reagents\newchem\toxins.dm" #include "code\modules\reagents\reagent_containers\blood_pack.dm" #include "code\modules\reagents\reagent_containers\borghydro.dm" #include "code\modules\reagents\reagent_containers\dropper.dm" @@ -1580,6 +1523,7 @@ #include "code\modules\research\designs\mining_designs.dm" #include "code\modules\research\designs\misc_designs.dm" #include "code\modules\research\designs\power_designs.dm" +#include "code\modules\research\designs\spacepod_designs.dm" #include "code\modules\research\designs\stock_parts_designs.dm" #include "code\modules\research\designs\telecomms_designs.dm" #include "code\modules\research\designs\weapon_designs.dm" From fb988a1f361709ad76f7faeae10cf9335bad53e8 Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Sat, 28 Mar 2015 23:58:44 -0400 Subject: [PATCH 07/11] Revert limb damage not counting towards overall health --- code/modules/mob/living/carbon/human/human_damage.dm | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index d751ff4892f..a1ea2c4ea49 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -7,9 +7,8 @@ var/total_burn = 0 var/total_brute = 0 for(var/datum/organ/external/O in organs) //hardcoded to streamline things a bit - if(O.vital) - total_brute += O.brute_dam - total_burn += O.burn_dam + total_brute += O.brute_dam + total_burn += O.burn_dam health = 100 - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute //TODO: fix husking if( (((100 - total_burn) < config.health_threshold_dead) && stat == DEAD) && (!species.flags & IS_SYNTHETIC))//100 only being used as the magic human max health number, feel free to change it if you add a var for it -- Urist @@ -50,15 +49,13 @@ /mob/living/carbon/human/getBruteLoss() var/amount = 0 for(var/datum/organ/external/O in organs) - if(O.vital) - amount += O.brute_dam + amount += O.brute_dam return amount /mob/living/carbon/human/getFireLoss() var/amount = 0 for(var/datum/organ/external/O in organs) - if(O.vital) - amount += O.burn_dam + amount += O.burn_dam return amount From 035ebc27fb0a0d72edb49d039370792e60443ec0 Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Sun, 29 Mar 2015 00:09:02 -0400 Subject: [PATCH 08/11] Fix up delimb probabilities to be closer to current --- code/modules/organs/organ_external.dm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 258f19fef01..c365cd3936c 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -171,16 +171,14 @@ //If limb took enough damage, try to cut or tear it off if(config.limbs_can_break && (brute_dam + burn_dam) >= (max_damage * config.organ_health_multiplier)) - if((sharp || edge) && used_weapon) - if(istype(used_weapon,/obj/item)) - var/obj/item/W = used_weapon - if(W.w_class >= 3) - droplimb(1) + if((sharp || edge) && prob(brute)) + droplimb(1) return - if(brute >= 23 && prob(brute)) // Wooden baseball bat in both hands == 23 + if(brute >= 20 && prob(brute)) // Wooden baseball bat in both hands == 23 droplimb(1,0,0,2) return if(burn >= 20) // Most laser rifle shots. + if(body_part == HEAD) return //No ashing someone's head off since you don't get a brain back. droplimb(1,0,0,1) return From 9ecf61f43f926b46c1fe922adf8398ca6d16e4f9 Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Sun, 29 Mar 2015 00:11:26 -0400 Subject: [PATCH 09/11] Putting back some values for max limb health. --- code/modules/organs/organ_external.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index c365cd3936c..5c3318636c9 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -924,7 +924,7 @@ Note that amputating the affected organ does in fact remove the infection from t name = "chest" icon_name = "torso" display_name = "chest" - max_damage = 200 + max_damage = 75 min_broken_damage = 50 body_part = UPPER_TORSO vital = 1 @@ -934,7 +934,7 @@ Note that amputating the affected organ does in fact remove the infection from t icon_name = "groin" display_name = "groin" max_damage = 50 - min_broken_damage = 25 + min_broken_damage = 60 body_part = LOWER_TORSO /datum/organ/external/l_arm @@ -1025,7 +1025,7 @@ Note that amputating the affected organ does in fact remove the infection from t name = "head" icon_name = "head" display_name = "head" - max_damage = 200 + max_damage = 75 min_broken_damage = 50 body_part = HEAD var/disfigured = 0 From 16e38305594f051bf53a2ef631ab4c4c76319e61 Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Sun, 29 Mar 2015 00:17:21 -0400 Subject: [PATCH 10/11] Goodbye limb parent damage overhaul, I barely knew ya. --- code/modules/organs/organ_external.dm | 4 ---- 1 file changed, 4 deletions(-) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 5c3318636c9..50aa2205f20 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -139,9 +139,6 @@ if (burn || brute) if (status & ORGAN_ROBOT && body_part != UPPER_TORSO && body_part != LOWER_TORSO) droplimb(1) //Robot limbs just kinda fail at full damage. - -//Removing shuffling limb damage over to parent if limb is out of HP -/* else //List organs we can pass it to var/list/datum/organ/external/possible_points = list() @@ -155,7 +152,6 @@ //And pass the pain around var/datum/organ/external/target = pick(possible_points) target.take_damage(brute, burn, sharp, edge, used_weapon, forbidden_limbs + src) -*/ // sync the organ's damage with its wounds src.update_damages() From 315d9572be57e480def6be2675b96e282f5f3811 Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Sun, 29 Mar 2015 00:40:09 -0400 Subject: [PATCH 11/11] Turn explosion delimbs into amputations due to explosion code overhaul --- code/modules/mob/living/carbon/human/human.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index da65d810057..2529d3bd607 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -233,7 +233,7 @@ while(limbs_affected != 0) processing_dismember = pick(organs) if(processing_dismember.name != "chest" && processing_dismember.name != "head") - processing_dismember.droplimb(1,0,0,pick(0,1,2)) + processing_dismember.droplimb(1,0,1,pick(0,1,2)) limbs_affected -= 1 @@ -257,7 +257,7 @@ while(limbs_affected != 0) processing_dismember = pick(organs) if(processing_dismember.name != "chest" && processing_dismember.name != "head") - processing_dismember.droplimb(1,0,0,pick(0,2)) + processing_dismember.droplimb(1,0,1,pick(0,2)) limbs_affected -= 1 else @@ -267,7 +267,7 @@ while(limbs_affected != 0) processing_dismember = pick(organs) if(processing_dismember.name != "chest" && processing_dismember.name != "head") - processing_dismember.droplimb(1,0,0,pick(0,2)) + processing_dismember.droplimb(1,0,1,pick(0,2)) limbs_affected -= 1 if (!istype(l_ear, /obj/item/clothing/ears/earmuffs) && !istype(r_ear, /obj/item/clothing/ears/earmuffs)) @@ -289,7 +289,7 @@ while(limbs_affected != 0) processing_dismember = pick(organs) if(processing_dismember.name != "chest" && processing_dismember.name != "head") - processing_dismember.droplimb(1) + processing_dismember.droplimb(1,0,1) limbs_affected -= 1 if (!istype(l_ear, /obj/item/clothing/ears/earmuffs) && !istype(r_ear, /obj/item/clothing/ears/earmuffs))