Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Species names are colored when examining / health analyzing #2582

Merged
merged 3 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/scanners.dm
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ GENE SCANNER
else if(S.mutantstomach != initial(S.mutantstomach))
mutant = TRUE

to_chat(user, "<span class='info'>Species: [S.name][mutant ? "-derived mutant" : ""]</span>")
to_chat(user, "<span class='info'>Species: <span class='[H.species_examine_font()]'>[S.name][mutant ? "-derived mutant" : ""]</span></span>") //NSV13 - species name is colored depending on special conditions.
to_chat(user, "<span class='info'>Body temperature: [round(M.bodytemperature-T0C,0.1)] &deg;C ([round(M.bodytemperature*1.8-459.67,0.1)] &deg;F)</span>")

// Time of death
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/examine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
display_name += "[compose_rank(src)]"
display_name += name
if(dna?.species && !skipface)
apparent_species = ", \an [dna.species.name]"
apparent_species = ", <span class='[species_examine_font()]'>\an [dna.species.name]</span>" //NSV13 - species name is colored depending on special conditions.
. = list("<span class='info'>*---------*\nThis is <EM>[!obscure_name ? display_name : "Unknown"][apparent_species]</EM>!")

//uniform
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@
H.throw_alert("nutrition", /atom/movable/screen/alert/etherealcharge, 3)
if(H.health > 10.5)
apply_damage(0.65, TOX, null, null, H)
brutemod = 1.9
else
H.throw_alert("nutrition", /atom/movable/screen/alert/etherealcharge, 4)
if(H.health > 10.5)
Expand Down
1 change: 1 addition & 0 deletions nsv13.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3914,6 +3914,7 @@
#include "nsv13\code\modules\mob\living\carbon\carbon.dm"
#include "nsv13\code\modules\mob\living\carbon\examine_tgui.dm"
#include "nsv13\code\modules\mob\living\carbon\human\nsv_emotes.dm"
#include "nsv13\code\modules\mob\living\carbon\human\nsv_human_helpers.dm"
#include "nsv13\code\modules\mob\living\carbon\human\species_types\catgirl.dm"
#include "nsv13\code\modules\mob\living\carbon\human\species_types\nanotrasen_knpc.dm"
#include "nsv13\code\modules\mob\living\carbon\human\species_types\other_knpc.dm"
Expand Down
25 changes: 25 additions & 0 deletions nsv13/code/modules/mob/living/carbon/human/nsv_human_helpers.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* # `species_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
* * Yellow-ish if an Ethereal
* * Purple if plasmaperson
* * Rock / Brownish if a golem
* * Green if none of the others apply (aka, generic organic)
*/
/mob/living/carbon/human/proc/species_examine_font()
if((MOB_ROBOTIC in mob_biotypes))
return "sc_robotic"
if(HAS_TRAIT(src, TRAIT_TOXINLOVER))
DeltaFire15 marked this conversation as resolved.
Show resolved Hide resolved
return "sc_toxlover"
if(isethereal(src))
return "sc_ethereal"
if(isplasmaman(src))
return "sc_plasmaman"
if(isgolem(src))
return "sc_golem"
return "sc_normal"
9 changes: 9 additions & 0 deletions tgui/packages/tgui-panel/styles/goon/chat-dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -582,3 +582,12 @@ em {font-style: normal; font-weight: bold;}
.stat_infomation {color: #e6a648;}

.stat_br {color: #2ace53;}

//NSV13 - species examine colors
.sc_robotic {color: #aaa9ad;}
.sc_toxlover {color: #00ffff;}
.sc_ethereal {color: #e0d31d;}
.sc_plasmaman {color: #c400c4}
.sc_golem {color: #b34a00}
.sc_normal {color: #18d855}
//NSV13 end
9 changes: 9 additions & 0 deletions tgui/packages/tgui-panel/styles/goon/chat-light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -581,3 +581,12 @@ h1.alert, h2.alert {color: #000000;}
.stat_infomation {color: #be8530;}

.stat_br {color: #2ace53;}

//NSV13 - species examine colors
.sc_robotic {color: #8a898d;}
.sc_toxlover {color: #1e89d1;}
.sc_ethereal {color: #dda91a;}
.sc_plasmaman {color: #aa03aa}
.sc_golem {color: #8f3e05}
.sc_normal {color: #029731}
//NSV13 end
Loading