Merge pull request #14783 from DeltaFire15/spec-species-color
Colors species names depending on traits
This commit is contained in:
@@ -381,8 +381,8 @@ GENETICS SCANNER
|
||||
else if (S.mutantstomach != initial(S.mutantstomach))
|
||||
mutant = TRUE
|
||||
|
||||
msg += "\t<span class='info'>Reported Species: [H.dna.custom_species ? H.dna.custom_species : S.name]</span>\n"
|
||||
msg += "\t<span class='info'>Base Species: [S.name]</span>\n"
|
||||
msg += "\t<span class='info'>Reported Species: [H.spec_trait_examine_font()][H.dna.custom_species ? H.dna.custom_species : S.name]</font></span>\n"
|
||||
msg += "\t<span class='info'>Base Species: [H.spec_trait_examine_font()][S.name]</font></span>\n"
|
||||
if(mutant)
|
||||
msg += "\t<span class='info'>Subject has mutations present.</span>\n"
|
||||
msg += "\t<span class='info'>Body temperature: [round(M.bodytemperature-T0C,0.1)] °C ([round(M.bodytemperature*1.8-459.67,0.1)] °F)</span>\n"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
if(skipface || get_visible_name() == "Unknown")
|
||||
. += "You can't make out what species they are."
|
||||
else
|
||||
. += "[t_He] [t_is] a [dna.custom_species ? dna.custom_species : dna.species.name]!"
|
||||
. += "[t_He] [t_is] a [spec_trait_examine_font()][dna.custom_species ? dna.custom_species : dna.species.name]</font>!"
|
||||
|
||||
//uniform
|
||||
if(w_uniform && !(SLOT_W_UNIFORM in obscured))
|
||||
|
||||
@@ -1083,6 +1083,30 @@
|
||||
. = ..()
|
||||
set_species(race)
|
||||
|
||||
/**
|
||||
* # `spec_trait_examine_font()`
|
||||
*
|
||||
* This gets a humanoid's special examine font, which is used to color their species name during examine / health analyzing.
|
||||
* The first of these that applies is returned.
|
||||
* Returns:
|
||||
* * Metallic font if robotic
|
||||
* * Cyan if a toxinlover
|
||||
* * Purple if plasmaperson
|
||||
* * Rock / Brownish if a golem
|
||||
* * Green if none of the others apply (aka, generic organic)
|
||||
*/
|
||||
/mob/living/carbon/human/proc/spec_trait_examine_font()
|
||||
if(HAS_TRAIT(src, TRAIT_ROBOTIC_ORGANISM))
|
||||
return "<font color='#aaa9ad'>"
|
||||
if(HAS_TRAIT(src, TRAIT_TOXINLOVER))
|
||||
return "<font color='#00ffff'>"
|
||||
if(isplasmaman(src))
|
||||
return "<font color='#800080'"
|
||||
if(isgolem(src))
|
||||
return "<font color='#8b4513'"
|
||||
return "<font color='#18d855'>"
|
||||
|
||||
|
||||
/mob/living/carbon/human/get_tooltip_data()
|
||||
var/t_He = p_they(TRUE)
|
||||
var/t_is = p_are()
|
||||
@@ -1091,7 +1115,7 @@
|
||||
if(skipface || get_visible_name() == "Unknown")
|
||||
. += "You can't make out what species they are."
|
||||
else
|
||||
. += "[t_He] [t_is] a [dna.custom_species ? dna.custom_species : dna.species.name]"
|
||||
. += "[t_He] [t_is] a [spec_trait_examine_font()][dna.custom_species ? dna.custom_species : dna.species.name]</font>"
|
||||
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, usr, .)
|
||||
|
||||
/mob/living/carbon/human/species/abductor
|
||||
|
||||
Reference in New Issue
Block a user