mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-27 15:17:21 +01:00
Reworking limb blending based on species.
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
flags = NO_SCAN | NO_DEFIB
|
||||
spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED
|
||||
appearance_flags = HAS_SKIN_COLOR | HAS_EYE_COLOR | HAS_HAIR_COLOR
|
||||
limb_blend = ICON_MULTIPLY
|
||||
|
||||
blood_color = "#9066BD"
|
||||
flesh_color = "#808D11"
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
// Icon/appearance vars.
|
||||
var/icobase = 'icons/mob/human_races/r_human.dmi' // Normal icon set.
|
||||
var/deform = 'icons/mob/human_races/r_def_human.dmi' // Mutated icon set.
|
||||
var/limb_blend = ICON_ADD // Specify a blending mode for limbs and tail.
|
||||
|
||||
var/speech_bubble_appearance = "normal" // Part of icon_state to use for speech bubbles when talking. See talk.dmi for available icons.
|
||||
var/fire_icon_state = "humanoid" // The icon_state used inside OnFire.dmi for when on fire.
|
||||
@@ -258,10 +259,6 @@
|
||||
/datum/mob_descriptor/build
|
||||
)
|
||||
|
||||
//This is used in character setup preview generation (prefences_setup.dm) and human mob
|
||||
//rendering (update_icons.dm)
|
||||
var/color_mult = 0
|
||||
|
||||
//This is for overriding tail rendering with a specific icon in icobase, for static
|
||||
//tails only, since tails would wag when dead if you used this
|
||||
var/icobase_tail = 0
|
||||
|
||||
@@ -250,10 +250,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
||||
icon_key += "[rgb(part.s_col[1],part.s_col[2],part.s_col[3])]"
|
||||
if(part.body_hair && part.h_col && part.h_col.len >= 3)
|
||||
icon_key += "[rgb(part.h_col[1],part.h_col[2],part.h_col[3])]"
|
||||
if(species.color_mult)
|
||||
icon_key += "[ICON_MULTIPLY]"
|
||||
else
|
||||
icon_key += "[ICON_ADD]"
|
||||
icon_key += "[species?.limb_blend || ICON_ADD]"
|
||||
else
|
||||
icon_key += "#000000"
|
||||
|
||||
@@ -891,7 +888,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
||||
remove_layer(TAIL_NORTH_LAYER)
|
||||
remove_layer(TAIL_SOUTH_LAYER)
|
||||
|
||||
var tail_layer = GET_TAIL_LAYER
|
||||
var/tail_layer = GET_TAIL_LAYER
|
||||
|
||||
var/image/tail_image = get_tail_image()
|
||||
if(tail_image)
|
||||
@@ -918,12 +915,12 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
||||
if(!species_tail_anim && species.icobase_tail) species_tail_anim = species.icobase //Allow override of file for non-animated tails
|
||||
if(!species_tail_anim) species_tail_anim = 'icons/effects/species.dmi'
|
||||
tail_icon = new/icon(species_tail_anim)
|
||||
tail_icon.Blend(rgb(r_skin, g_skin, b_skin), species.color_mult ? ICON_MULTIPLY : ICON_ADD)
|
||||
tail_icon.Blend(rgb(r_skin, g_skin, b_skin), species?.limb_blend || ICON_ADD)
|
||||
// The following will not work with animated tails.
|
||||
var/use_species_tail = species.get_tail_hair(src)
|
||||
if(use_species_tail)
|
||||
var/icon/hair_icon = icon('icons/effects/species.dmi', "[species.get_tail(src)]_[use_species_tail]")
|
||||
hair_icon.Blend(rgb(r_hair, g_hair, b_hair), species.color_mult ? ICON_MULTIPLY : ICON_ADD) //Check for species color_mult
|
||||
hair_icon.Blend(rgb(r_hair, g_hair, b_hair), species?.limb_blend || ICON_ADD)
|
||||
tail_icon.Blend(hair_icon, ICON_OVERLAY)
|
||||
tail_icon_cache[icon_key] = tail_icon
|
||||
|
||||
@@ -1078,7 +1075,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
||||
//If you are FBP with wing style and didn't set a custom one
|
||||
if(synthetic && synthetic.includes_wing && !wing_style)
|
||||
var/icon/wing_s = new/icon("icon" = synthetic.icon, "icon_state" = "wing") //I dunno. If synths have some custom wing?
|
||||
wing_s.Blend(rgb(src.r_skin, src.g_skin, src.b_skin), species.color_mult ? ICON_MULTIPLY : ICON_ADD)
|
||||
wing_s.Blend(rgb(src.r_skin, src.g_skin, src.b_skin), species?.limb_blend || ICON_ADD)
|
||||
return image(wing_s)
|
||||
|
||||
//If you have custom wings selected
|
||||
@@ -1128,7 +1125,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
||||
var/datum/robolimb/model = isSynthetic()
|
||||
if(istype(model) && model.includes_tail && !tail_style)
|
||||
var/icon/tail_s = new/icon("icon" = synthetic.icon, "icon_state" = "tail")
|
||||
tail_s.Blend(rgb(src.r_skin, src.g_skin, src.b_skin), species.color_mult ? ICON_MULTIPLY : ICON_ADD)
|
||||
tail_s.Blend(rgb(src.r_skin, src.g_skin, src.b_skin), species?.limb_blend || ICON_ADD)
|
||||
return image(tail_s)
|
||||
|
||||
//If you have a custom tail selected
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
var/gendered_icon = 0 // Whether or not the icon state appends a gender.
|
||||
var/s_tone // Skin tone.
|
||||
var/list/s_col // skin colour
|
||||
var/s_col_blend = ICON_ADD // How the skin colour is applied.
|
||||
var/list/h_col // hair colour
|
||||
var/body_hair // Icon blend for body hair if any.
|
||||
var/mob/living/applied_pressure
|
||||
|
||||
@@ -170,8 +170,9 @@ var/global/list/limb_icon_cache = list()
|
||||
icon_cache_key += "_tone_[s_tone]"
|
||||
else
|
||||
if(s_col && s_col.len >= 3)
|
||||
applying.Blend(rgb(s_col[1], s_col[2], s_col[3]), s_col_blend)
|
||||
icon_cache_key += "_color_[s_col[1]]_[s_col[2]]_[s_col[3]]_[s_col_blend]"
|
||||
var/blend = species?.limb_blend || ICON_ADD
|
||||
applying.Blend(rgb(s_col[1], s_col[2], s_col[3]), blend)
|
||||
icon_cache_key += "_color_[s_col[1]]_[s_col[2]]_[s_col[3]]_[blend]"
|
||||
|
||||
// Translucency.
|
||||
if(nonsolid) applying += rgb(,,,180) // SO INTUITIVE TY BYOND
|
||||
|
||||
Reference in New Issue
Block a user