mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-18 19:39:42 +01:00
bugfix: "Fixed a major issue where alien species with cybernetic limbs on spawn would always be the species default colour." bugfix: "Fixed preview images of nonhumans with cybernetic limbs being tinted the body colour."
This commit is contained in:
@@ -186,4 +186,4 @@
|
||||
/mob/living/carbon/human/proc/force_update_limbs()
|
||||
for(var/obj/item/organ/external/O in organs)
|
||||
O.sync_colour_to_human(src)
|
||||
update_body(0)
|
||||
update_body(2)//Forces new icon generation
|
||||
|
||||
@@ -225,8 +225,10 @@ var/global/list/damage_icon_parts = list()
|
||||
if(update_icons) update_icons()
|
||||
|
||||
//BASE MOB SPRITE
|
||||
/mob/living/carbon/human/proc/update_body(var/update_icons=1)
|
||||
//Extension by Nanako
|
||||
//Passing in a value of 2 for update_icons will ignore any cached icon, and force a new one to be generated
|
||||
|
||||
/mob/living/carbon/human/proc/update_body(var/update_icons=1)
|
||||
var/husk_color_mod = rgb(96,88,80)
|
||||
var/hulk_color_mod = rgb(48,224,40)
|
||||
|
||||
@@ -234,7 +236,6 @@ var/global/list/damage_icon_parts = list()
|
||||
var/fat = (FAT in src.mutations)
|
||||
var/hulk = (HULK in src.mutations)
|
||||
var/skeleton = (SKELETON in src.mutations)
|
||||
|
||||
var/g = (gender == FEMALE ? "f" : "m")
|
||||
|
||||
//CACHING: Generate an index key from visible bodyparts.
|
||||
@@ -268,9 +269,8 @@ var/global/list/damage_icon_parts = list()
|
||||
icon_key += "1"
|
||||
|
||||
icon_key = "[icon_key][husk ? 1 : 0][fat ? 1 : 0][hulk ? 1 : 0][skeleton ? 1 : 0]"
|
||||
|
||||
var/icon/base_icon
|
||||
if(human_icon_cache[icon_key])
|
||||
if(update_icons != 2 && human_icon_cache[icon_key])//If update_icons is 2, then we forcibly generate a new icon
|
||||
base_icon = human_icon_cache[icon_key]
|
||||
else
|
||||
//BEGIN CACHED ICON GENERATION.
|
||||
@@ -278,7 +278,7 @@ var/global/list/damage_icon_parts = list()
|
||||
base_icon = chest.get_icon()
|
||||
|
||||
for(var/obj/item/organ/external/part in organs)
|
||||
var/icon/temp = part.get_icon(skeleton)
|
||||
var/icon/temp = part.get_icon(skeleton)//The color comes from this function
|
||||
//That part makes left and right legs drawn topmost and lowermost when human looks WEST or EAST
|
||||
//And no change in rendering for other parts (they icon_position is 0, so goes to 'else' part)
|
||||
if(part.icon_position&(LEFT|RIGHT))
|
||||
|
||||
@@ -198,14 +198,12 @@ datum/preferences
|
||||
preview_icon.Blend(new /icon(icobase, "groin_[g]"), ICON_OVERLAY)
|
||||
preview_icon.Blend(new /icon(icobase, "head_[g]"), ICON_OVERLAY)
|
||||
|
||||
|
||||
//Non-robotic limbs
|
||||
for(var/name in list("r_arm","r_hand","r_leg","r_foot","l_leg","l_foot","l_arm","l_hand"))
|
||||
if(organ_data[name] == "amputated") continue
|
||||
if(organ_data[name] == "cyborg")
|
||||
var/datum/robolimb/R
|
||||
if(rlimb_data[name]) R = all_robolimbs[rlimb_data[name]]
|
||||
if(!R) R = basic_robolimb
|
||||
preview_icon.Blend(icon(R.icon, "[name]"), ICON_OVERLAY) // This doesn't check gendered_icon. Not an issue while only limbs can be robotic.
|
||||
continue
|
||||
continue//We will add the icons for robolimbs after the skin color is applied
|
||||
preview_icon.Blend(new /icon(icobase, "[name]"), ICON_OVERLAY)
|
||||
|
||||
//Tail
|
||||
@@ -224,6 +222,16 @@ datum/preferences
|
||||
else
|
||||
preview_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
|
||||
|
||||
|
||||
//Robotic limbs, done AFTER skin color/tone blending
|
||||
for(var/name in list("r_arm","r_hand","r_leg","r_foot","l_leg","l_foot","l_arm","l_hand"))
|
||||
if(organ_data[name] == "cyborg")
|
||||
var/datum/robolimb/R
|
||||
if(rlimb_data[name]) R = all_robolimbs[rlimb_data[name]]
|
||||
if(!R) R = basic_robolimb
|
||||
preview_icon.Blend(icon(R.icon, "[name]"), ICON_OVERLAY) // This doesn't check gendered_icon. Not an issue while only limbs can be robotic.
|
||||
|
||||
|
||||
var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = current_species ? current_species.eyes : "eyes_s")
|
||||
if ((current_species && (current_species.flags & HAS_EYE_COLOR)))
|
||||
eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
|
||||
|
||||
Reference in New Issue
Block a user