Merge pull request #1551 from Zuhayr/master

Makes slime people more interesting and thematic.
This commit is contained in:
Datraen
2016-05-11 02:34:50 -04:00
35 changed files with 721 additions and 262 deletions

View File

@@ -26,6 +26,7 @@
var/last_dam = -1 // used in healing/processing calculations.
// Appearance vars.
var/nonsolid // Snowflake warning, reee. Used for slime limbs.
var/icon_name = null // Icon state base.
var/body_part = null // Part flag
var/icon_position = 0 // Used in mob overlay layering calculations.
@@ -731,6 +732,9 @@ Note that amputating the affected organ does in fact remove the infection from t
if(cannot_amputate || !owner)
return
if(disintegrate == DROPLIMB_EDGE && nonsolid)
disintegrate = DROPLIMB_BLUNT //splut
switch(disintegrate)
if(DROPLIMB_EDGE)
if(!clean)
@@ -759,6 +763,10 @@ Note that amputating the affected organ does in fact remove the infection from t
var/mob/living/carbon/human/victim = owner //Keep a reference for post-removed().
var/obj/item/organ/external/parent_organ = parent
var/use_flesh_colour = species.get_flesh_colour(owner)
var/use_blood_colour = species.get_blood_colour(owner)
removed(null, ignore_children)
victim.traumatic_shock += 60
@@ -806,10 +814,8 @@ Note that amputating the affected organ does in fact remove the infection from t
else
gore = new /obj/effect/decal/cleanable/blood/gibs(get_turf(victim))
if(species)
if(species.get_flesh_colour())
gore.fleshcolor = species.get_flesh_colour()
if(species.get_blood_colour())
gore.basecolor = species.get_blood_colour()
gore.fleshcolor = use_flesh_colour
gore.basecolor = use_blood_colour
gore.update_icon()
gore.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)

View File

@@ -71,7 +71,7 @@ var/global/list/limb_icon_cache = list()
if(owner.f_style)
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[owner.f_style]
if(facial_hair_style && facial_hair_style.species_allowed && (species.get_bodytype() in facial_hair_style.species_allowed))
if(facial_hair_style && facial_hair_style.species_allowed && (species.get_bodytype(owner) in facial_hair_style.species_allowed))
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
if(facial_hair_style.do_colouration)
facial_s.Blend(rgb(owner.r_facial, owner.g_facial, owner.b_facial), ICON_ADD)
@@ -79,7 +79,7 @@ var/global/list/limb_icon_cache = list()
if(owner.h_style && !(owner.head && (owner.head.flags_inv & BLOCKHEADHAIR)))
var/datum/sprite_accessory/hair_style = hair_styles_list[owner.h_style]
if(hair_style && (species.get_bodytype() in hair_style.species_allowed))
if(hair_style && (species.get_bodytype(owner) in hair_style.species_allowed))
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
if(hair_style.do_colouration && islist(h_col) && h_col.len >= 3)
hair_s.Blend(rgb(h_col[1], h_col[2], h_col[3]), ICON_ADD)
@@ -113,36 +113,47 @@ var/global/list/limb_icon_cache = list()
else if (status & ORGAN_ROBOT)
mob_icon = new /icon('icons/mob/human_races/robotic.dmi', "[icon_name][gender ? "_[gender]" : ""]")
else
if (status & ORGAN_MUTATED)
mob_icon = new /icon(species.deform, "[icon_name][gender ? "_[gender]" : ""]")
else
mob_icon = new /icon(species.icobase, "[icon_name][gender ? "_[gender]" : ""]")
if(status & ORGAN_DEAD)
mob_icon.ColorTone(rgb(10,50,0))
mob_icon.SetIntensity(0.7)
if(!isnull(s_tone))
if(s_tone >= 0)
mob_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
else
mob_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
else if(s_col && s_col.len >= 3)
mob_icon.Blend(rgb(s_col[1], s_col[2], s_col[3]), ICON_ADD)
mob_icon = new /icon(species.get_icobase(owner, (status & ORGAN_MUTATED)), "[icon_name][gender ? "_[gender]" : ""]")
apply_colouration(mob_icon)
if(body_hair && islist(h_col) && h_col.len >= 3)
var/cache_key = "[body_hair]-[icon_name]-[h_col[1]][h_col[2]][h_col[3]]"
if(!limb_icon_cache[cache_key])
var/icon/I = icon(species.icobase, "[icon_name]_[body_hair]")
var/icon/I = icon(species.get_icobase(owner), "[icon_name]_[body_hair]")
I.Blend(rgb(h_col[1],h_col[2],h_col[3]), ICON_ADD)
limb_icon_cache[cache_key] = I
mob_icon.Blend(limb_icon_cache[cache_key], ICON_OVERLAY)
dir = EAST
icon = mob_icon
return mob_icon
/obj/item/organ/external/proc/apply_colouration(var/icon/applying)
if(nonsolid)
applying.MapColors("#4D4D4D","#969696","#1C1C1C", "#000000")
if(species && species.get_bodytype(owner) != "Human")
applying.SetIntensity(1.5) // Unathi, Taj and Skrell have -very- dark base icons.
else
applying.SetIntensity(0.7)
else if(status & ORGAN_DEAD)
applying.ColorTone(rgb(10,50,0))
applying.SetIntensity(0.7)
if(!isnull(s_tone))
if(s_tone >= 0)
applying.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
else
applying.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
else if(s_col && s_col.len >= 3)
applying.Blend(rgb(s_col[1], s_col[2], s_col[3]), ICON_ADD)
// Translucency.
if(nonsolid) applying += rgb(,,,180) // SO INTUITIVE TY BYOND
return applying
// new damage icon system
// adjusted to set damage_state to brute/burn code only (without r_name0 as before)
/obj/item/organ/external/update_icon()

View File

@@ -1,4 +1,3 @@
// Slime limbs.
/obj/item/organ/external/chest/unbreakable
cannot_break = 1
dislocated = -1
@@ -42,3 +41,48 @@
/obj/item/organ/external/head/unbreakable
cannot_break = 1
dislocated = -1
// Slime limbs.
/obj/item/organ/external/chest/unbreakable/slime
nonsolid = 1
max_damage = 50
/obj/item/organ/external/groin/unbreakable/slime
nonsolid = 1
max_damage = 30
/obj/item/organ/external/arm/unbreakable/slime
nonsolid = 1
max_damage = 15
/obj/item/organ/external/arm/right/unbreakable/slime
nonsolid = 1
max_damage = 15
/obj/item/organ/external/leg/unbreakable/slime
nonsolid = 1
max_damage = 15
/obj/item/organ/external/leg/right/unbreakable/slime
nonsolid = 1
max_damage = 15
/obj/item/organ/external/foot/unbreakable/slime
nonsolid = 1
max_damage = 5
/obj/item/organ/external/foot/right/unbreakable/slime
nonsolid = 1
max_damage = 5
/obj/item/organ/external/hand/unbreakable/slime
nonsolid = 1
max_damage = 5
/obj/item/organ/external/hand/right/unbreakable/slime
nonsolid = 1
max_damage = 5
/obj/item/organ/external/head/unbreakable/slime
nonsolid = 1
max_damage = 15