mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-15 00:54:16 +01:00
Kitchen Sink P2 TGUI Prefs (#17579)
* Kitchen Sink V2 * tsx * Update vorestation.dme * Update 01_basic.dm * Update 01_basic.dm * Deletes the character directory * F & M tags * Flexible * Update misc.dm * ICP * more fixes * missing sounds
This commit is contained in:
@@ -34,10 +34,16 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
|
||||
data["personalVisibility"] = user.mind.show_in_directory
|
||||
data["personalTag"] = user.mind.directory_tag || "Unset"
|
||||
data["personalErpTag"] = user.mind.directory_erptag || "Unset"
|
||||
data["personalEventTag"] = GLOB.vantag_choices_list[user.mind.vantag_preference]
|
||||
data["personalGenderTag"] = user.mind.directory_gendertag || "Unset"
|
||||
data["personalSexualityTag"] = user.mind.directory_sexualitytag || "Unset"
|
||||
else if (user?.client?.prefs)
|
||||
data["personalVisibility"] = user.client.prefs.show_in_directory
|
||||
data["personalTag"] = user.client.prefs.directory_tag || "Unset"
|
||||
data["personalErpTag"] = user.client.prefs.directory_erptag || "Unset"
|
||||
data["personalEventTag"] = GLOB.vantag_choices_list[user.client.prefs.vantag_preference]
|
||||
data["personalGenderTag"] = user.client.prefs.directory_gendertag || "Unset"
|
||||
data["personalSexualityTag"] = user.client.prefs.directory_sexualitytag || "Unset"
|
||||
|
||||
return data
|
||||
|
||||
@@ -55,6 +61,14 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
|
||||
var/name = null
|
||||
var/species = null
|
||||
var/ooc_notes = null
|
||||
var/ooc_notes_favs = null
|
||||
var/ooc_notes_likes = null
|
||||
var/ooc_notes_maybes = null
|
||||
var/ooc_notes_dislikes = null
|
||||
var/ooc_notes_style = null
|
||||
var/gendertag = null
|
||||
var/sexualitytag = null
|
||||
var/eventtag = GLOB.vantag_choices_list[VANTAG_NONE]
|
||||
var/flavor_text = null
|
||||
var/tag
|
||||
var/erptag
|
||||
@@ -63,35 +77,67 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
|
||||
tag = C.mob.mind.directory_tag || "Unset"
|
||||
erptag = C.mob.mind.directory_erptag || "Unset"
|
||||
character_ad = C.mob.mind.directory_ad
|
||||
gendertag = C.mob.mind.directory_gendertag || "Unset"
|
||||
sexualitytag = C.mob.mind.directory_sexualitytag || "Unset"
|
||||
eventtag = GLOB.vantag_choices_list[C.mob.mind.vantag_preference]
|
||||
else
|
||||
tag = C.prefs.directory_tag || "Unset"
|
||||
erptag = C.prefs.directory_erptag || "Unset"
|
||||
character_ad = C.prefs.directory_ad
|
||||
gendertag = C.prefs.directory_gendertag || "Unset"
|
||||
sexualitytag = C.prefs.directory_sexualitytag || "Unset"
|
||||
eventtag = GLOB.vantag_choices_list[C.prefs.vantag_preference]
|
||||
|
||||
if(ishuman(C.mob))
|
||||
var/mob/living/carbon/human/H = C.mob
|
||||
//if(data_core && GLOB.data_core.general)
|
||||
// if(!find_general_record("name", H.real_name))
|
||||
// if(!find_record("name", H.real_name, data_core.hidden_general))
|
||||
// continue
|
||||
name = H.real_name
|
||||
var/strangername = H.real_name
|
||||
if(GLOB.data_core && GLOB.data_core.general)
|
||||
if(!find_general_record("name", H.real_name))
|
||||
if(!find_record("name", H.real_name, GLOB.data_core.hidden_general))
|
||||
strangername = "unknown"
|
||||
name = strangername
|
||||
species = "[H.custom_species ? H.custom_species : H.species.name]"
|
||||
ooc_notes = H.ooc_notes
|
||||
if(H.ooc_notes_likes)
|
||||
ooc_notes += "\n\nLIKES\n\n[H.ooc_notes_likes]"
|
||||
if(H.ooc_notes_dislikes)
|
||||
ooc_notes += "\n\nDISLIKES\n\n[H.ooc_notes_dislikes]"
|
||||
flavor_text = H.flavor_texts["general"]
|
||||
if(H.ooc_notes_style && (H.ooc_notes_favs || H.ooc_notes_likes || H.ooc_notes_maybes || H.ooc_notes_dislikes))
|
||||
ooc_notes = H.ooc_notes + "\n\n"
|
||||
ooc_notes_favs = H.ooc_notes_favs
|
||||
ooc_notes_likes = H.ooc_notes_likes
|
||||
ooc_notes_maybes = H.ooc_notes_maybes
|
||||
ooc_notes_dislikes = H.ooc_notes_dislikes
|
||||
ooc_notes_style = H.ooc_notes_style
|
||||
else
|
||||
if(H.ooc_notes_favs)
|
||||
ooc_notes += "\n\nFAVOURITES\n\n[H.ooc_notes_favs]"
|
||||
if(H.ooc_notes_likes)
|
||||
ooc_notes += "\n\nLIKES\n\n[H.ooc_notes_likes]"
|
||||
if(H.ooc_notes_maybes)
|
||||
ooc_notes += "\n\nMAYBES\n\n[H.ooc_notes_maybes]"
|
||||
if(H.ooc_notes_dislikes)
|
||||
ooc_notes += "\n\nDISLIKES\n\n[H.ooc_notes_dislikes]"
|
||||
if(LAZYLEN(H.flavor_texts))
|
||||
flavor_text = H.flavor_texts["general"]
|
||||
|
||||
if(isAI(C.mob))
|
||||
var/mob/living/silicon/ai/A = C.mob
|
||||
name = A.name
|
||||
species = "Artificial Intelligence"
|
||||
ooc_notes = A.ooc_notes
|
||||
if(A.ooc_notes_likes)
|
||||
ooc_notes += "\n\nLIKES\n\n[A.ooc_notes_likes]"
|
||||
if(A.ooc_notes_dislikes)
|
||||
ooc_notes += "\n\nDISLIKES\n\n[A.ooc_notes_dislikes]"
|
||||
if(A.ooc_notes_style && (A.ooc_notes_favs || A.ooc_notes_likes || A.ooc_notes_maybes || A.ooc_notes_dislikes))
|
||||
ooc_notes = A.ooc_notes + "\n\n"
|
||||
ooc_notes_favs = A.ooc_notes_favs
|
||||
ooc_notes_likes = A.ooc_notes_likes
|
||||
ooc_notes_maybes = A.ooc_notes_maybes
|
||||
ooc_notes_dislikes = A.ooc_notes_dislikes
|
||||
ooc_notes_style = A.ooc_notes_style
|
||||
else
|
||||
if(A.ooc_notes_favs)
|
||||
ooc_notes += "\n\nFAVOURITES\n\n[A.ooc_notes_favs]"
|
||||
if(A.ooc_notes_likes)
|
||||
ooc_notes += "\n\nLIKES\n\n[A.ooc_notes_likes]"
|
||||
if(A.ooc_notes_maybes)
|
||||
ooc_notes += "\n\nMAYBES\n\n[A.ooc_notes_maybes]"
|
||||
if(A.ooc_notes_dislikes)
|
||||
ooc_notes += "\n\nDISLIKES\n\n[A.ooc_notes_dislikes]"
|
||||
|
||||
flavor_text = null // No flavor text for AIs :c
|
||||
|
||||
@@ -102,10 +148,22 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
|
||||
name = R.name
|
||||
species = "[R.modtype] [R.braintype]"
|
||||
ooc_notes = R.ooc_notes
|
||||
if(R.ooc_notes_likes)
|
||||
ooc_notes += "\n\nLIKES\n\n[R.ooc_notes_likes]"
|
||||
if(R.ooc_notes_dislikes)
|
||||
ooc_notes += "\n\nDISLIKES\n\n[R.ooc_notes_dislikes]"
|
||||
if(R.ooc_notes_style && (R.ooc_notes_favs || R.ooc_notes_likes || R.ooc_notes_maybes || R.ooc_notes_dislikes))
|
||||
ooc_notes = R.ooc_notes + "\n\n"
|
||||
ooc_notes_favs = R.ooc_notes_favs
|
||||
ooc_notes_likes = R.ooc_notes_likes
|
||||
ooc_notes_maybes = R.ooc_notes_maybes
|
||||
ooc_notes_dislikes = R.ooc_notes_dislikes
|
||||
ooc_notes_style = R.ooc_notes_style
|
||||
else
|
||||
if(R.ooc_notes_favs)
|
||||
ooc_notes += "\n\nFAVOURITES\n\n[R.ooc_notes_favs]"
|
||||
if(R.ooc_notes_likes)
|
||||
ooc_notes += "\n\nLIKES\n\n[R.ooc_notes_likes]"
|
||||
if(R.ooc_notes_maybes)
|
||||
ooc_notes += "\n\nMAYBES\n\n[R.ooc_notes_maybes]"
|
||||
if(R.ooc_notes_dislikes)
|
||||
ooc_notes += "\n\nDISLIKES\n\n[R.ooc_notes_dislikes]"
|
||||
|
||||
flavor_text = R.flavor_text
|
||||
|
||||
@@ -114,23 +172,45 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
|
||||
name = P.name
|
||||
species = "pAI"
|
||||
ooc_notes = P.ooc_notes
|
||||
if(P.ooc_notes_likes)
|
||||
ooc_notes += "\n\nLIKES\n\n[P.ooc_notes_likes]"
|
||||
if(P.ooc_notes_dislikes)
|
||||
ooc_notes += "\n\nDISLIKES\n\n[P.ooc_notes_dislikes]"
|
||||
|
||||
if(P.ooc_notes_style && (P.ooc_notes_favs || P.ooc_notes_likes || P.ooc_notes_maybes || P.ooc_notes_dislikes))
|
||||
ooc_notes = P.ooc_notes + "\n\n"
|
||||
ooc_notes_favs = P.ooc_notes_favs
|
||||
ooc_notes_likes = P.ooc_notes_likes
|
||||
ooc_notes_maybes = P.ooc_notes_maybes
|
||||
ooc_notes_dislikes = P.ooc_notes_dislikes
|
||||
ooc_notes_style = P.ooc_notes_style
|
||||
else
|
||||
if(P.ooc_notes_favs)
|
||||
ooc_notes += "\n\nFAVOURITES\n\n[P.ooc_notes_favs]"
|
||||
if(P.ooc_notes_likes)
|
||||
ooc_notes += "\n\nLIKES\n\n[P.ooc_notes_likes]"
|
||||
if(P.ooc_notes_maybes)
|
||||
ooc_notes += "\n\nMAYBES\n\n[P.ooc_notes_maybes]"
|
||||
if(P.ooc_notes_dislikes)
|
||||
ooc_notes += "\n\nDISLIKES\n\n[P.ooc_notes_dislikes]"
|
||||
flavor_text = P.flavor_text
|
||||
|
||||
if(isanimal(C.mob))
|
||||
var/mob/living/simple_mob/S = C.mob
|
||||
name = S.name
|
||||
species = initial(S.name)
|
||||
species = S.character_directory_species()
|
||||
ooc_notes = S.ooc_notes
|
||||
if(S.ooc_notes_likes)
|
||||
ooc_notes += "\n\nLIKES\n\n[S.ooc_notes_likes]"
|
||||
if(S.ooc_notes_dislikes)
|
||||
ooc_notes += "\n\nDISLIKES\n\n[S.ooc_notes_dislikes]"
|
||||
|
||||
if(S.ooc_notes_style && (S.ooc_notes_favs || S.ooc_notes_likes || S.ooc_notes_maybes || S.ooc_notes_dislikes))
|
||||
ooc_notes = S.ooc_notes + "\n\n"
|
||||
ooc_notes_favs = S.ooc_notes_favs
|
||||
ooc_notes_likes = S.ooc_notes_likes
|
||||
ooc_notes_maybes = S.ooc_notes_maybes
|
||||
ooc_notes_dislikes = S.ooc_notes_dislikes
|
||||
ooc_notes_style = S.ooc_notes_style
|
||||
else
|
||||
if(S.ooc_notes_favs)
|
||||
ooc_notes += "\n\nFAVOURITES\n\n[S.ooc_notes_favs]"
|
||||
if(S.ooc_notes_likes)
|
||||
ooc_notes += "\n\nLIKES\n\n[S.ooc_notes_likes]"
|
||||
if(S.ooc_notes_maybes)
|
||||
ooc_notes += "\n\nMAYBES\n\n[S.ooc_notes_maybes]"
|
||||
if(S.ooc_notes_dislikes)
|
||||
ooc_notes += "\n\nDISLIKES\n\n[S.ooc_notes_dislikes]"
|
||||
flavor_text = S.desc
|
||||
|
||||
// It's okay if we fail to find OOC notes and flavor text
|
||||
@@ -141,6 +221,14 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
|
||||
directory_mobs.Add(list(list(
|
||||
"name" = name,
|
||||
"species" = species,
|
||||
"ooc_notes_favs" = ooc_notes_favs,
|
||||
"ooc_notes_likes" = ooc_notes_likes,
|
||||
"ooc_notes_maybes" = ooc_notes_maybes,
|
||||
"ooc_notes_dislikes" = ooc_notes_dislikes,
|
||||
"ooc_notes_style" = ooc_notes_style,
|
||||
"gendertag" = gendertag,
|
||||
"sexualitytag" = sexualitytag,
|
||||
"eventtag" = eventtag,
|
||||
"ooc_notes" = ooc_notes,
|
||||
"tag" = tag,
|
||||
"erptag" = erptag,
|
||||
@@ -203,6 +291,24 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
|
||||
if(isnull(new_ad))
|
||||
return
|
||||
return set_for_mind_or_prefs(user, action, new_ad, can_set_prefs, can_set_mind)
|
||||
if("setGenderTag")
|
||||
var/list/new_gendertag = tgui_input_list(usr, "Pick a new Gender tag for the character directory. This is YOUR gender, not what you prefer.", "Character Gender Tag", GLOB.char_directory_gendertags)
|
||||
if(!new_gendertag)
|
||||
return
|
||||
return set_for_mind_or_prefs(user, action, new_gendertag, can_set_prefs, can_set_mind)
|
||||
if("setSexualityTag")
|
||||
var/list/new_sexualitytag = tgui_input_list(usr, "Pick a new Sexuality/Orientation tag for the character directory", "Character Sexuality/Orientation Tag", GLOB.char_directory_sexualitytags)
|
||||
if(!new_sexualitytag)
|
||||
return
|
||||
return set_for_mind_or_prefs(user, action, new_sexualitytag, can_set_prefs, can_set_mind)
|
||||
if("setEventTag")
|
||||
var/list/names_list = list()
|
||||
for(var/C in GLOB.vantag_choices_list)
|
||||
names_list[GLOB.vantag_choices_list[C]] = C
|
||||
var/list/new_eventtag = tgui_input_list(usr, "Pick your preference for event involvement", "Event Preference Tag", usr?.client?.prefs?.vantag_preference, names_list)
|
||||
if(!new_eventtag)
|
||||
return
|
||||
return set_for_mind_or_prefs(user, action, names_list[new_eventtag], can_set_prefs, can_set_mind)
|
||||
|
||||
/datum/character_directory/proc/set_for_mind_or_prefs(mob/user, action, new_value, can_set_prefs, can_set_mind)
|
||||
can_set_prefs &&= !!user.client.prefs
|
||||
@@ -235,3 +341,18 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
|
||||
if (can_set_mind)
|
||||
user.mind.directory_ad = new_value
|
||||
return TRUE
|
||||
if ("setEventTag")
|
||||
if (can_set_prefs)
|
||||
user.client.prefs.vantag_preference = new_value
|
||||
if (can_set_mind)
|
||||
user.mind.vantag_preference = new_value
|
||||
if ("setGenderTag")
|
||||
if (can_set_prefs)
|
||||
user.client.prefs.directory_gendertag = new_value
|
||||
if (can_set_mind)
|
||||
user.mind.directory_gendertag = new_value
|
||||
if ("setSexualityTag")
|
||||
if (can_set_prefs)
|
||||
user.client.prefs.directory_sexualitytag = new_value
|
||||
if (can_set_mind)
|
||||
user.mind.directory_sexualitytag = new_value
|
||||
|
||||
Reference in New Issue
Block a user