mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
Merge pull request #14921 from Seris02/mirrortransparent
reworks handling of transparent limbs (manual mirror)
This commit is contained in:
committed by
CHOMPStation2
parent
50ef3183f7
commit
905d26f647
@@ -79,7 +79,7 @@ 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)
|
||||
|
||||
for(var/M in markings)
|
||||
var/datum/sprite_accessory/marking/mark = markings[M]["datum"]
|
||||
@@ -107,6 +107,8 @@ var/global/list/limb_icon_cache = list()
|
||||
if(owner && owner.gender == FEMALE)
|
||||
gender = "f"
|
||||
|
||||
var/should_apply_transparency = FALSE
|
||||
|
||||
if(!force_icon_key)
|
||||
icon_cache_key = "[icon_name]_[species ? species.get_bodytype() : SPECIES_HUMAN]" //VOREStation Edit
|
||||
else
|
||||
@@ -131,9 +133,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.
|
||||
@@ -165,6 +169,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)
|
||||
@@ -184,6 +189,9 @@ var/global/list/limb_icon_cache = list()
|
||||
mob_icon.Blend(limb_icon_cache[cache_key], ICON_OVERLAY)
|
||||
// VOREStation edit ends here
|
||||
|
||||
if (transparent && !istype(src,/obj/item/organ/external/head) && can_apply_transparency && should_apply_transparency) //VORESTATION EDIT: transparent instead of nonsolid
|
||||
mob_icon += rgb(,,,180) //do it here so any markings become transparent as well
|
||||
|
||||
dir = EAST
|
||||
icon = mob_icon
|
||||
return mob_icon
|
||||
@@ -218,9 +226,6 @@ var/global/list/limb_icon_cache = list()
|
||||
icon_cache_key += "_color_[s_col[1]]_[s_col[2]]_[s_col[3]]_[ICON_ADD]"
|
||||
//VOREStation Edit End
|
||||
|
||||
// Translucency.
|
||||
if(transparent) applying += rgb(,,,180) // SO INTUITIVE TY BYOND //VOREStation Edit
|
||||
|
||||
return applying
|
||||
|
||||
/obj/item/organ/external/var/icon_cache_key
|
||||
|
||||
@@ -339,7 +339,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
|
||||
@@ -400,6 +400,9 @@
|
||||
|
||||
add_overlay(get_hair_icon())
|
||||
|
||||
if (transparent && can_apply_transparency) //VOREStation Edit: transparent instead of nonsolid
|
||||
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