From cd4eaecf21c1e2725868b068871f77f5e1fb3e9a Mon Sep 17 00:00:00 2001 From: Segrain Date: Mon, 19 Aug 2013 13:05:00 +0300 Subject: [PATCH 1/5] Fix for #3549. --- code/game/turfs/simulated/floor.dm | 2 +- code/game/turfs/space/space.dm | 2 +- code/game/turfs/unsimulated/floor.dm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 236d41d319..2b85253dd0 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -188,7 +188,7 @@ turf/simulated/floor/proc/update_icon() update_icon() if ((!( user.canmove ) || user.restrained() || !( user.pulling ))) return - if (user.pulling.anchored) + if (user.pulling.anchored || !isturf(user.pulling.loc)) return if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1)) return diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index e5ced14d63..95720295c8 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -17,7 +17,7 @@ /turf/space/attack_hand(mob/user as mob) if ((user.restrained() || !( user.pulling ))) return - if (user.pulling.anchored) + if (user.pulling.anchored || !isturf(user.pulling.loc)) return if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1)) return diff --git a/code/game/turfs/unsimulated/floor.dm b/code/game/turfs/unsimulated/floor.dm index f18ceeb821..1d391eee1c 100644 --- a/code/game/turfs/unsimulated/floor.dm +++ b/code/game/turfs/unsimulated/floor.dm @@ -9,7 +9,7 @@ /turf/unsimulated/floor/attack_hand(var/mob/user as mob) if ((!( user.canmove ) || user.restrained() || !( user.pulling ))) return - if (user.pulling.anchored) + if (user.pulling.anchored || !isturf(user.pulling.loc)) return if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1)) return From 18b26c57b737e05c53eb5222162db49cf269583a Mon Sep 17 00:00:00 2001 From: Segrain Date: Mon, 19 Aug 2013 13:05:52 +0300 Subject: [PATCH 2/5] Inertia fix. --- code/game/turfs/turf.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 6b21b32059..dc15cc4c9d 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -181,7 +181,7 @@ M.inertia_dir = 0 return spawn(5) - if((M && !(M.anchored) && (M.loc == src))) + if((M && !(M.anchored) && !(M.pulledby) && (M.loc == src))) if(M.inertia_dir) step(M, M.inertia_dir) return From 71e52b57feaec9e50aa89dd3068ec434f22c1531 Mon Sep 17 00:00:00 2001 From: Segrain Date: Mon, 19 Aug 2013 23:25:03 +0300 Subject: [PATCH 3/5] Fix for #3552. --- code/game/jobs/access.dm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index 82fe991ce0..22037996ce 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -412,10 +412,14 @@ return "Code Gold" /proc/get_all_jobs() - return list("Assistant", "Captain", "Head of Personnel", "Bartender", "Chef", "Botanist", "Quartermaster", "Cargo Technician", - "Shaft Miner", /*"Clown", "Mime", */"Janitor", "Librarian", "Lawyer", "Chaplain", "Chief Engineer", "Station Engineer", - "Atmospheric Technician", "Chief Medical Officer", "Medical Doctor", "Chemist", "Geneticist", "Virologist", - "Research Director", "Scientist", "Xenobiologist", "Roboticist", "Head of Security", "Warden", "Detective", "Security Officer") + var/list/all_jobs = list() + var/list/all_datums = typesof(/datum/job) + all_datums.Remove(list(/datum/job,/datum/job/ai,/datum/job/cyborg)) + var/datum/job/jobdatum + for(var/jobtype in all_datums) + jobdatum = new jobtype + all_jobs.Add(jobdatum.title) + return all_jobs /proc/get_all_centcom_jobs() return list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer","BlackOps Commander","Supreme Commander") From b2a3405f80a3a4417eae39b1ccb8ddd47f1403e5 Mon Sep 17 00:00:00 2001 From: Mloc-Argent Date: Mon, 19 Aug 2013 23:49:53 +0100 Subject: [PATCH 4/5] Two fixes for dismemberment. Species dismemberment now creates the correctly textured gibs. Decapitation now kills you. Signed-off-by: Mloc-Argent --- code/modules/organs/organ_external.dm | 61 +++++++++++++++++++-------- 1 file changed, 43 insertions(+), 18 deletions(-) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 9390d96218..7fe936dbab 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -742,21 +742,40 @@ obj/item/weapon/organ/New(loc, mob/living/carbon/human/H) //Forming icon for the limb //Setting base icon for this mob's race - if(ishuman(H) && H.dna) - var/icon/base = new H.species.icobase - if(base) - icon = base.MakeLying() + var/icon/base + if(H.species && H.species.icobase) + base = icon(H.species.icobase) else - icon_state = initial(icon_state)+"_l" + base = icon('icons/mob/human_races/r_human.dmi') - var/icon/I = new /icon(icon, icon_state) + if(base) + base = base.MakeLying() - //Changing limb's skin tone to match owner - if (H.s_tone >= 0) - I.Blend(rgb(H.s_tone, H.s_tone, H.s_tone), ICON_ADD) - else - I.Blend(rgb(-H.s_tone, -H.s_tone, -H.s_tone), ICON_SUBTRACT) - icon = I + //Changing limb's skin tone to match owner + if(!H.species || H.species.flags & HAS_SKIN_TONE) + if (H.s_tone >= 0) + base.Blend(rgb(H.s_tone, H.s_tone, H.s_tone), ICON_ADD) + else + base.Blend(rgb(-H.s_tone, -H.s_tone, -H.s_tone), ICON_SUBTRACT) + + //this is put here since I can't easially edit the same icon from head's constructor + if(istype(src, /obj/item/weapon/organ/head)) + //Add (facial) hair. + if(H.f_style) + var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[H.f_style] + if(facial_hair_style) + var/icon/facial = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_l") + facial.Blend(rgb(H.r_facial, H.g_facial, H.b_facial), ICON_ADD) + base.Blend(facial, ICON_OVERLAY) + + if(H.h_style && !(H.head && (H.head.flags & BLOCKHEADHAIR))) + var/datum/sprite_accessory/hair_style = hair_styles_list[H.h_style] + if(hair_style) + var/icon/hair = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_l") + hair.Blend(rgb(H.r_hair, H.g_hair, H.b_hair), ICON_ADD) + base.Blend(hair, ICON_OVERLAY) + + icon = base /**************************************************** @@ -794,21 +813,27 @@ obj/item/weapon/organ/head var/brain_op_stage = 0 obj/item/weapon/organ/head/New(loc, mob/living/carbon/human/H) + if(istype(H)) + src.icon_state = H.gender == MALE? "head_m" : "head_f" ..() spawn(5) if(brainmob && brainmob.client) brainmob.client.screen.len = null //clear the hud - if(ishuman(H)) - if(H.gender == FEMALE) - H.icon_state = "head_f" - H.overlays += H.generate_head_icon() + + //if(ishuman(H)) + // if(H.gender == FEMALE) + // H.icon_state = "head_f" + // H.overlays += H.generate_head_icon() transfer_identity(H) - pixel_x = -10 - pixel_y = 6 + name = "[H.real_name]'s head" H.regenerate_icons() + if(H.organs_by_name["chest"]) + var/datum/organ/external/chest/humanchest = H.organs_by_name["chest"] + humanchest.brute_dam = H.maxHealth * 2 + H.death() obj/item/weapon/organ/head/proc/transfer_identity(var/mob/living/carbon/human/H)//Same deal as the regular brain proc. Used for human-->head From de79aa733bc6ccf123611fb8c74b30725a4f8319 Mon Sep 17 00:00:00 2001 From: Mloc Date: Tue, 20 Aug 2013 02:06:56 +0100 Subject: [PATCH 5/5] More dismemberment fixes More elegant solution to gasping torsos. Applying damage to torso will no longer gib everything connected to it. Signed-off-by: Mloc --- code/modules/organs/organ_external.dm | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 7fe936dbab..02d0e47512 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -81,10 +81,11 @@ burn *= 0.66 //~2/3 damage for ROBOLIMBS //If limb took enough damage, try to cut or tear it off - if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier) - if( (sharp && prob(5 * brute)) || (brute > 20 && prob(2 * brute)) ) - droplimb(1) - return + 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( (sharp && prob(5 * brute)) || (brute > 20 && prob(2 * brute)) ) + droplimb(1) + return // High brute damage or sharp objects may damage internal organs if(internal_organs != null) if( (sharp && brute >= 5) || brute >= 10) if(prob(5)) @@ -830,10 +831,7 @@ obj/item/weapon/organ/head/New(loc, mob/living/carbon/human/H) H.regenerate_icons() - if(H.organs_by_name["chest"]) - var/datum/organ/external/chest/humanchest = H.organs_by_name["chest"] - humanchest.brute_dam = H.maxHealth * 2 - + H.stat = 2 H.death() obj/item/weapon/organ/head/proc/transfer_identity(var/mob/living/carbon/human/H)//Same deal as the regular brain proc. Used for human-->head