mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-07-14 09:43:49 +01:00
Species in Char Directory
This commit is contained in:
@@ -49,6 +49,7 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
|
||||
// These are the three vars we're trying to find
|
||||
// The approach differs based on the mob the client is controlling
|
||||
var/name = null
|
||||
var/species = null
|
||||
var/ooc_notes = null
|
||||
var/flavor_text = null
|
||||
var/tag = C.prefs.directory_tag || "Unset"
|
||||
@@ -63,12 +64,14 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
|
||||
if(!find_record("name", H.real_name, data_core.hidden_general))
|
||||
continue
|
||||
name = H.real_name
|
||||
species = "[H.custom_species ? H.custom_species : H.species.name]"
|
||||
ooc_notes = H.ooc_notes
|
||||
flavor_text = H.flavor_texts["general"]
|
||||
|
||||
if(isAI(C.mob))
|
||||
var/mob/living/silicon/ai/A = C.mob
|
||||
name = "[A.name] (Artificial Intelligence)"
|
||||
name = A.name
|
||||
species = "Artificial Intelligence"
|
||||
ooc_notes = A.ooc_notes
|
||||
flavor_text = null // No flavor text for AIs :c
|
||||
|
||||
@@ -76,7 +79,8 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
|
||||
var/mob/living/silicon/robot/R = C.mob
|
||||
if(R.scrambledcodes || (R.module && R.module.hide_on_manifest))
|
||||
continue
|
||||
name = "[R.name] ([R.modtype] [R.braintype])"
|
||||
name = R.name
|
||||
species = "[R.modtype] [R.braintype]"
|
||||
ooc_notes = R.ooc_notes
|
||||
flavor_text = R.flavor_text
|
||||
|
||||
@@ -87,6 +91,7 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
|
||||
|
||||
directory_mobs.Add(list(list(
|
||||
"name" = name,
|
||||
"species" = species,
|
||||
"ooc_notes" = ooc_notes,
|
||||
"tag" = tag,
|
||||
"erptag" = erptag,
|
||||
|
||||
@@ -94,6 +94,11 @@ const ViewCharacter = (props, context) => {
|
||||
content="Back"
|
||||
onClick={() => setOverlay(null)} />
|
||||
}>
|
||||
<Section level={2} title="Species">
|
||||
<Box>
|
||||
{overlay.species}
|
||||
</Box>
|
||||
</Section>
|
||||
<Section level={2} title="Vore Tag">
|
||||
<Box p={1} backgroundColor={getTagColor(overlay.tag)}>
|
||||
{overlay.tag}
|
||||
@@ -149,6 +154,7 @@ const CharacterDirectoryList = (props, context) => {
|
||||
<Table>
|
||||
<Table.Row bold>
|
||||
<SortButton id="name">Name</SortButton>
|
||||
<SortButton id="species">Species</SortButton>
|
||||
<SortButton id="tag">Vore Tag</SortButton>
|
||||
<SortButton id="erptag">ERP Tag</SortButton>
|
||||
<SortButton id="eventtag">Event Pref</SortButton>
|
||||
@@ -162,6 +168,7 @@ const CharacterDirectoryList = (props, context) => {
|
||||
.map((character, i) => (
|
||||
<Table.Row key={i} backgroundColor={getTagColor(character.tag)}>
|
||||
<Table.Cell p={1}>{character.name}</Table.Cell>
|
||||
<Table.Cell>{character.species}</Table.Cell>
|
||||
<Table.Cell>{character.tag}</Table.Cell>
|
||||
<Table.Cell>{character.erptag}</Table.Cell>
|
||||
<Table.Cell>{character.eventtag}</Table.Cell>
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user