Two fixes for dismemberment.

Species dismemberment now creates the correctly textured gibs.
Decapitation now kills you.

Signed-off-by: Mloc-Argent <colmohici@gmail.com>
This commit is contained in:
Mloc-Argent
2013-08-19 23:49:53 +01:00
parent 1f3fc60cb4
commit b2a3405f80
+43 -18
View File
@@ -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