mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-07-19 20:22:38 +01:00
reworks handling of transparent limbs (#8947)
* reworks handling of transparent limbs * fixing the icon operation error
This commit is contained in:
@@ -79,12 +79,14 @@ var/global/list/limb_icon_cache = list()
|
||||
|
||||
return res
|
||||
|
||||
/obj/item/organ/external/proc/get_icon(var/skeletal)
|
||||
/obj/item/organ/external/proc/get_icon(var/skeletal, var/can_apply_transparency = TRUE)
|
||||
|
||||
var/gender = "m"
|
||||
if(owner && owner.gender == FEMALE)
|
||||
gender = "f"
|
||||
|
||||
var/should_apply_transparency = FALSE
|
||||
|
||||
if(!force_icon_key)
|
||||
icon_cache_key = "[icon_name]_[species ? species.name : SPECIES_HUMAN]"
|
||||
else
|
||||
@@ -109,9 +111,11 @@ var/global/list/limb_icon_cache = list()
|
||||
mob_icon = new /icon('icons/mob/human_races/r_skeleton.dmi', "[icon_name][gender ? "_[gender]" : ""]")
|
||||
else if (robotic >= ORGAN_ROBOT)
|
||||
mob_icon = new /icon('icons/mob/human_races/robotic.dmi', "[icon_name][gender ? "_[gender]" : ""]")
|
||||
should_apply_transparency = TRUE
|
||||
apply_colouration(mob_icon)
|
||||
else
|
||||
mob_icon = new /icon(species.get_icobase(owner, (status & ORGAN_MUTATED)), "[icon_name][gender ? "_[gender]" : ""]")
|
||||
should_apply_transparency = TRUE
|
||||
apply_colouration(mob_icon)
|
||||
|
||||
//Body markings, actually does not include head this time. Done separately above.
|
||||
@@ -134,6 +138,7 @@ var/global/list/limb_icon_cache = list()
|
||||
|
||||
if(model)
|
||||
icon_cache_key += "_model_[model]"
|
||||
should_apply_transparency = TRUE
|
||||
apply_colouration(mob_icon)
|
||||
if(owner && owner.synth_markings)
|
||||
for(var/M in markings)
|
||||
@@ -144,6 +149,9 @@ var/global/list/limb_icon_cache = list()
|
||||
mob_icon.Blend(mark_s, ICON_OVERLAY) //So when it's on your body, it has icons
|
||||
icon_cache_key += "[M][markings[M]["color"]]"
|
||||
|
||||
if (nonsolid && !istype(src,/obj/item/organ/external/head) && can_apply_transparency && should_apply_transparency)
|
||||
mob_icon += rgb(,,,180) //do it here so any markings become transparent as well
|
||||
|
||||
dir = EAST
|
||||
icon = mob_icon
|
||||
return mob_icon
|
||||
@@ -173,9 +181,6 @@ var/global/list/limb_icon_cache = list()
|
||||
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
|
||||
|
||||
return applying
|
||||
|
||||
/obj/item/organ/external/var/icon_cache_key
|
||||
|
||||
@@ -336,7 +336,7 @@
|
||||
"<span class='notice'>You make \the [I] kiss \the [src]!.</span>")
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/external/head/get_icon()
|
||||
/obj/item/organ/external/head/get_icon(var/skeletal, var/can_apply_transparency = TRUE)
|
||||
..()
|
||||
|
||||
//The overlays are not drawn on the mob, they are used for if the head is removed and becomes an item
|
||||
@@ -387,6 +387,9 @@
|
||||
|
||||
add_overlay(get_hair_icon())
|
||||
|
||||
if (nonsolid && can_apply_transparency)
|
||||
mob_icon += rgb(,,,180) //do it here so any markings become transparent as well
|
||||
|
||||
return mob_icon
|
||||
|
||||
/obj/item/organ/external/head/skrell
|
||||
|
||||
Reference in New Issue
Block a user