[MIRROR] Kitchen Sink P2 TGUI Prefs (#10770)

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-04-26 23:50:26 +02:00
committed by GitHub
co-authored by Cameron Lennox Kashargul
parent 77b972fed3
commit ca9de6648e
48 changed files with 222 additions and 816 deletions
@@ -62,13 +62,11 @@
. += "<br>"
. += span_bold("Biological Sex:") + " <a href='byond://?src=\ref[src];bio_gender=1'><b>[gender2text(pref.biological_gender)]</b></a><br>"
. += span_bold("Pronouns:") + " <a href='byond://?src=\ref[src];id_gender=1'><b>[genders_to_pronoun_set[pref.identifying_gender]]</b></a><br>"
. += span_bold("Age:") + " <a href='byond://?src=\ref[src];age=1'>[pref.read_preference(/datum/preference/numeric/human/age)]</a> <b>Birthday:</b> <a href='byond://?src=\ref[src];bday_month=1'>[pref.read_preference(/datum/preference/numeric/human/bday_month)]</a><b>/</b><a href='byond://?src=\ref[src];bday_day=1'>[pref.read_preference(/datum/preference/numeric/human/bday_day)]</a> - <b>Announce?:</b> <a href='byond://?src=\ref[src];bday_announce=1'>[pref.read_preference(/datum/preference/toggle/human/bday_announce) ? "Yes" : "Disabled"]</a><br>" //ChompEDIT - DISABLE the announcement
. += span_bold("Age:") + " <a href='byond://?src=\ref[src];age=1'>[pref.read_preference(/datum/preference/numeric/human/age)]</a> <b>Birthday:</b> <a href='byond://?src=\ref[src];bday_month=1'>[pref.read_preference(/datum/preference/numeric/human/bday_month)]</a><b>/</b><a href='byond://?src=\ref[src];bday_day=1'>[pref.read_preference(/datum/preference/numeric/human/bday_day)]</a> - <b>Announce?:</b> <a href='byond://?src=\ref[src];bday_announce=1'>[pref.read_preference(/datum/preference/toggle/human/bday_announce) ? "Yes" : "Disabled"]</a><br>"
. += span_bold("Spawn Point:") + " <a href='byond://?src=\ref[src];spawnpoint=1'>[pref.read_preference(/datum/preference/choiced/living/spawnpoint)]</a><br>"
if(CONFIG_GET(flag/allow_metadata))
//CHOMPEdit Start
. += span_bold("OOC Notes: <a href='byond://?src=\ref[src];edit_ooc_notes=1'>Edit</a><a href='byond://?src=\ref[src];edit_ooc_note_favs=1'>Favs</a><a href='byond://?src=\ref[src];edit_ooc_note_likes=1'>Likes</a><a href='byond://?src=\ref[src];edit_ooc_note_maybes=1'>Maybes</a><a href='byond://?src=\ref[src];edit_ooc_note_dislikes=1'>Dislikes</a>") + "<br>"
. += "Detailed field or short list system? <a href='byond://?src=\ref[src];edit_ooc_note_style=1'>[pref.read_preference(/datum/preference/toggle/living/ooc_notes_style) ? "Lists" : "Fields"]</a><br><br>"
//CHOMPEdit End
. = jointext(.,null)
/datum/category_item/player_setup_item/general/basic/OnTopic(var/href,var/list/href_list, var/mob/user)
@@ -205,15 +203,14 @@
if(new_metadata == "!clear")
new_metadata = ""
pref.update_preference_by_type(/datum/preference/text/living/ooc_notes_dislikes, new_metadata)
//CHOMPEdit Start
else if(href_list["edit_ooc_note_favs"])
var/new_metadata = strip_html_simple(tgui_input_text(user, "Enter any information you'd like others to see relating to your FAVOURITE roleplay preferences. This will not be saved permanently unless you click save in the Character Setup panel! Type \"!clear\" to empty.", "Game Preference" , html_decode(pref.read_preference(/datum/preference/text/living/ooc_notes_favs)), multiline = TRUE, prevent_enter = TRUE)) //ChompEDIT - usr removal
var/new_metadata = strip_html_simple(tgui_input_text(user, "Enter any information you'd like others to see relating to your FAVOURITE roleplay preferences. This will not be saved permanently unless you click save in the Character Setup panel! Type \"!clear\" to empty.", "Game Preference" , html_decode(pref.read_preference(/datum/preference/text/living/ooc_notes_favs)), multiline = TRUE, prevent_enter = TRUE))
if(new_metadata && CanUseTopic(user))
if(new_metadata == "!clear")
new_metadata = ""
pref.update_preference_by_type(/datum/preference/text/living/ooc_notes_favs, new_metadata)
else if(href_list["edit_ooc_note_maybes"])
var/new_metadata = strip_html_simple(tgui_input_text(user, "Enter any information you'd like others to see relating to your MAYBE roleplay preferences. This will not be saved permanently unless you click save in the Character Setup panel! Type \"!clear\" to empty.", "Game Preference" , html_decode(pref.read_preference(/datum/preference/text/living/ooc_notes_maybes)), multiline = TRUE, prevent_enter = TRUE)) //ChompEDIT - usr removal
var/new_metadata = strip_html_simple(tgui_input_text(user, "Enter any information you'd like others to see relating to your MAYBE roleplay preferences. This will not be saved permanently unless you click save in the Character Setup panel! Type \"!clear\" to empty.", "Game Preference" , html_decode(pref.read_preference(/datum/preference/text/living/ooc_notes_maybes)), multiline = TRUE, prevent_enter = TRUE))
if(new_metadata && CanUseTopic(user))
if(new_metadata == "!clear")
new_metadata = ""
@@ -221,7 +218,6 @@
else if(href_list["edit_ooc_note_style"])
pref.update_preference_by_type(/datum/preference/toggle/living/ooc_notes_style, !pref.read_preference(/datum/preference/toggle/living/ooc_notes_style))
return TOPIC_REFRESH
//CHOMPEdit End
return ..()
/datum/category_item/player_setup_item/general/basic/proc/get_genders()
@@ -33,9 +33,7 @@
pref.voice_sound = save_data["voice_sound"]
pref.custom_speech_bubble = save_data["custom_speech_bubble"]
pref.custom_footstep = save_data["custom_footstep"]
//CHOMPAdd Start
pref.species_sound = save_data["species_sound"]
//CHOMPAdd End
/datum/category_item/player_setup_item/vore/size/save_character(list/save_data)
save_data["size_multiplier"] = pref.size_multiplier
@@ -48,9 +46,7 @@
save_data["voice_sound"] = pref.voice_sound
save_data["custom_speech_bubble"] = pref.custom_speech_bubble
save_data["custom_footstep"] = pref.custom_footstep
//CHOMPAdd Start
save_data["species_sound"] = pref.species_sound
//CHOMPAdd End
/datum/category_item/player_setup_item/vore/size/sanitize_character()
pref.weight_vr = sanitize_integer(pref.weight_vr, WEIGHT_MIN, WEIGHT_MAX, initial(pref.weight_vr))
@@ -59,16 +55,16 @@
pref.fuzzy = sanitize_integer(pref.fuzzy, 0, 1, initial(pref.fuzzy))
pref.offset_override = sanitize_integer(pref.offset_override, 0, 1, initial(pref.offset_override))
if(pref.voice_freq != 0)
pref.voice_freq = sanitize_integer(pref.voice_freq, MIN_VOICE_FREQ, MAX_VOICE_FREQ, initial(pref.voice_freq)) //CHOMPEdit
pref.voice_freq = sanitize_integer(pref.voice_freq, MIN_VOICE_FREQ, MAX_VOICE_FREQ, initial(pref.voice_freq))
if(pref.size_multiplier == null || pref.size_multiplier < RESIZE_TINY || pref.size_multiplier > RESIZE_HUGE)
pref.size_multiplier = initial(pref.size_multiplier)
if(!(pref.custom_speech_bubble in GLOB.selectable_speech_bubbles))
pref.custom_speech_bubble = "default"
if(!(pref.custom_footstep))
pref.custom_footstep = "Default"
// var/datum/species/selected_species = GLOB.all_species[pref.species] // CHOMPEdit
if(!(pref.species_sound)) // CHOMPEdit // && selected_species.selects_bodytype
pref.species_sound = "Unset" // CHOMPEdit - otherwise, we leave this as null or w/e the default is
// var/datum/species/selected_species = GLOB.all_species[pref.species]
if(!(pref.species_sound))
pref.species_sound = "Unset"
/datum/category_item/player_setup_item/vore/size/copy_to_mob(var/mob/living/carbon/human/character)
character.weight = pref.weight_vr
@@ -79,7 +75,6 @@
character.voice_freq = pref.voice_freq
character.resize(pref.size_multiplier, animate = FALSE, ignore_prefs = TRUE)
//CHOMPEDIT Global voice lookup
if(!pref.voice_sound)
character.voice_sounds_list = GLOB.talk_sound
else
@@ -92,17 +87,14 @@
. += span_bold("Scale:") + " <a href='byond://?src=\ref[src];size_multiplier=1'>[round(pref.size_multiplier*100)]%</a><br>"
. += span_bold("Scaled Appearance:") + " <a [pref.fuzzy ? "" : ""] href='byond://?src=\ref[src];toggle_fuzzy=1'><b>[pref.fuzzy ? "Fuzzy" : "Sharp"]</b></a><br>"
. += span_bold("Scaling Center:") + " <a [pref.offset_override ? "" : ""] href='byond://?src=\ref[src];toggle_offset_override=1'><b>[pref.offset_override ? "Odd" : "Even"]</b></a><br>"
. += "<br>" // CHOMPEdit: Fancy:tm:
. += span_bold("Mob Speech/Noise Customization") + "" // CHOMPEdit: Fancy:tm:
. += "<br>" // CHOMPEdit
. += "<br>"
. += span_bold("Mob Speech/Noise Customization") + ""
. += "<br>"
. += span_bold("Voice Frequency:") + " <a href='byond://?src=\ref[src];voice_freq=1'>[pref.voice_freq]</a><br>"
. += span_bold("Voice Sounds:") + " <a href='byond://?src=\ref[src];voice_sounds_list=1'>[pref.voice_sound]</a><br>"
. += "<a href='byond://?src=\ref[src];voice_test=1'><b>Test Selected Voice</b></a><br>"
. += span_bold("Custom Speech Bubble:") + " <a href='byond://?src=\ref[src];customize_speech_bubble=1'>[pref.custom_speech_bubble]</a><br>"
. += span_bold("Custom Footstep Sounds:") + "<a href='byond://?src=\ref[src];customize_footsteps=1'>[pref.custom_footstep]</a><br>"
// CHOMPEdit Start: Pain/Scream/Death Custom Sounds
// var/datum/species/selected_species = GLOB.all_species[pref.species]
// if(selected_species.selects_bodytype)
. += "<br>"
. += span_bold("Species Sounds:") + " <a href='byond://?src=\ref[src];species_sound_options=1'>[pref.species_sound]</a><br>"
. += "<a href='byond://?src=\ref[src];cough_test=1'><b>Test Cough Sounds</b></a><br>"
@@ -111,7 +103,6 @@
. += "<a href='byond://?src=\ref[src];pain_test=1'><b>Test Pain Sounds</b></a><br>"
. += "<a href='byond://?src=\ref[src];gasp_test=1'><b>Test Gasp Sounds</b></a><br>"
. += "<a href='byond://?src=\ref[src];death_test=1'><b>Test Death Sounds</b></a><br>"
// CHOMPEdit End: Pain/Scream/Death Custom Sounds
. += "<br>"
. += span_bold("Relative Weight:") + " <a href='byond://?src=\ref[src];weight=1'>[pref.weight_vr]</a><br>"
. += span_bold("Weight Gain Rate:") + " <a href='byond://?src=\ref[src];weight_gain=1'>[pref.weight_gain]</a><br>"
@@ -178,7 +169,7 @@
return
choice = preset_voice_freqs[choice]
if(choice == 0)
pref.voice_freq = 42500 //CHOMPEdit
pref.voice_freq = 42500
return TOPIC_REFRESH
else if(choice == 1)
choice = tgui_input_number(user, "Choose your character's voice frequency, ranging from [MIN_VOICE_FREQ] to [MAX_VOICE_FREQ]", "Custom Voice Frequency", null, MAX_VOICE_FREQ, MIN_VOICE_FREQ)
@@ -205,12 +196,12 @@
"goon speak pugg",
"goon speak roach",
"goon speak skelly",
"xeno speak") // CHOMPedit
"xeno speak")
var/choice = tgui_input_list(user, "Which set of sounds would you like to use for your character's speech sounds?", "Voice Sounds", possible_voice_types)
if(!pref.voice_sound)
pref.voice_sound = "goon speak 1" //CHOMPEdit - Defaults voice to a less jarring sound
pref.voice_sound = "goon speak 1"
else if(!choice)
return TOPIC_REFRESH // CHOMPEdit
return TOPIC_REFRESH
else
pref.voice_sound = choice
return TOPIC_REFRESH
@@ -260,15 +251,12 @@
S = sound(pick(GLOB.goon_speak_roach_sound))
if("goon speak skelly")
S = sound(pick(GLOB.goon_speak_skelly_sound))
//CHOMPedit start.
if("xeno speak")
S = sound(pick(GLOB.xeno_speak_sound))
//CHOMPedit end.
if(S)
S.frequency = pick(pref.voice_freq)
S.volume = 50
SEND_SOUND(user, S)
// CHOMPEdit Start: Pain/Scream/Death sounds
else if(href_list["species_sound_options"]) // You shouldn't be able to see this option if you don't have the option to select a custom icon base, so we don't need to re-check for safety here.
var/list/possible_species_sound_types = species_sound_map
var/choice = tgui_input_list(user, "Which set of sounds would you like to use for your character's species sounds? (Cough, Sneeze, Scream, Pain, Gasp, Death)", "Species Sounds", possible_species_sound_types)
@@ -367,7 +355,6 @@
S.volume = 20
SEND_SOUND(user, S)
return TOPIC_REFRESH
// CHOMPEdit End
return ..();
#undef WEIGHT_CHANGE_MIN
@@ -5,10 +5,8 @@
/datum/category_item/player_setup_item/vore/misc/load_character(list/save_data)
pref.show_in_directory = save_data["show_in_directory"]
pref.directory_tag = save_data["directory_tag"]
//CHOMPAdd Start
pref.directory_gendertag = save_data["directory_gendertag"]
pref.directory_sexualitytag = save_data["directory_sexualitytag"]
//CHOMPAdd End
pref.directory_erptag = save_data["directory_erptag"]
pref.directory_ad = save_data["directory_ad"]
pref.sensorpref = save_data["sensorpref"]
@@ -19,10 +17,8 @@
/datum/category_item/player_setup_item/vore/misc/save_character(list/save_data)
save_data["show_in_directory"] = pref.show_in_directory
save_data["directory_tag"] = pref.directory_tag
//CHOMPAdd Start
save_data["directory_gendertag"] = pref.directory_gendertag
save_data["directory_sexualitytag"] = pref.directory_sexualitytag
//CHOMPAdd End
save_data["directory_erptag"] = pref.directory_erptag
save_data["directory_ad"] = pref.directory_ad
save_data["sensorpref"] = pref.sensorpref
@@ -41,8 +37,8 @@
/datum/category_item/player_setup_item/vore/misc/sanitize_character()
pref.show_in_directory = sanitize_integer(pref.show_in_directory, 0, 1, initial(pref.show_in_directory))
pref.directory_tag = sanitize_inlist(pref.directory_tag, GLOB.char_directory_tags, initial(pref.directory_tag))
pref.directory_gendertag = sanitize_inlist(pref.directory_gendertag, GLOB.char_directory_gendertags, initial(pref.directory_gendertag)) // CHOMPStation Edit: Character Directory Update
pref.directory_sexualitytag = sanitize_inlist(pref.directory_sexualitytag, GLOB.char_directory_sexualitytags, initial(pref.directory_sexualitytag)) // CHOMPStation Edit: Character Directory Update
pref.directory_gendertag = sanitize_inlist(pref.directory_gendertag, GLOB.char_directory_gendertags, initial(pref.directory_gendertag))
pref.directory_sexualitytag = sanitize_inlist(pref.directory_sexualitytag, GLOB.char_directory_sexualitytags, initial(pref.directory_sexualitytag))
pref.directory_erptag = sanitize_inlist(pref.directory_erptag, GLOB.char_directory_erptags, initial(pref.directory_erptag))
pref.sensorpref = sanitize_integer(pref.sensorpref, 1, GLOB.sensorpreflist.len, initial(pref.sensorpref))
pref.capture_crystal = sanitize_integer(pref.capture_crystal, 0, 1, initial(pref.capture_crystal))
@@ -53,8 +49,8 @@
. += "<br>"
. += span_bold("Appear in Character Directory:") + " <a [pref.show_in_directory ? "class='linkOn'" : ""] href='byond://?src=\ref[src];toggle_show_in_directory=1'><b>[pref.show_in_directory ? "Yes" : "No"]</b></a><br>"
. += span_bold("Character Directory Vore Tag:") + " <a href='byond://?src=\ref[src];directory_tag=1'><b>[pref.directory_tag]</b></a><br>"
. += span_bold("Character Directory Gender:") + " <a href='byond://?src=\ref[src];directory_gendertag=1'><b>[pref.directory_gendertag]</b></a><br>" // CHOMPStation Edit: Character Directory Update
. += span_bold("Character Directory Sexuality:") + " <a href='byond://?src=\ref[src];directory_sexualitytag=1'><b>[pref.directory_sexualitytag]</b></a><br>" // CHOMPStation Edit: Character Directory Update
. += span_bold("Character Directory Gender:") + " <a href='byond://?src=\ref[src];directory_gendertag=1'><b>[pref.directory_gendertag]</b></a><br>"
. += span_bold("Character Directory Sexuality:") + " <a href='byond://?src=\ref[src];directory_sexualitytag=1'><b>[pref.directory_sexualitytag]</b></a><br>"
. += span_bold("Character Directory ERP Tag:") + " <a href='byond://?src=\ref[src];directory_erptag=1'><b>[pref.directory_erptag]</b></a><br>"
. += span_bold("Character Directory Advertisement:") + " <a href='byond://?src=\ref[src];directory_ad=1'><b>Set Directory Ad</b></a><br>"
. += span_bold("Suit Sensors Preference:") + " <a [pref.sensorpref ? "" : ""] href='byond://?src=\ref[src];toggle_sensor_setting=1'><b>[GLOB.sensorpreflist[pref.sensorpref]]</b></a><br>"
@@ -74,7 +70,6 @@
return
pref.directory_tag = new_tag
return TOPIC_REFRESH
// CHOMPStation Edit Start: Directory Update
else if(href_list["directory_gendertag"])
var/new_gendertag = tgui_input_list(user, "Pick a new Gender tag for the character directory. This is YOUR gender, not what you prefer.", "Character Gender Tag", GLOB.char_directory_gendertags, pref.directory_gendertag)
if(!new_gendertag)
@@ -87,7 +82,6 @@
return
pref.directory_sexualitytag = new_sexualitytag
return TOPIC_REFRESH
// CHOMPStation Edit End: Directory Update
else if(href_list["directory_erptag"])
var/new_erptag = tgui_input_list(user, "Pick a new ERP tag for the character directory", "Character ERP Tag", GLOB.char_directory_erptags, pref.directory_erptag)
if(!new_erptag)
-2
View File
@@ -614,11 +614,9 @@ var/list/preferences_datums = list()
character.ooc_notes = read_preference(/datum/preference/text/living/ooc_notes)
character.ooc_notes_dislikes = read_preference(/datum/preference/text/living/ooc_notes_dislikes)
character.ooc_notes_likes = read_preference(/datum/preference/text/living/ooc_notes_likes)
// CHOMPAdd Start
character.ooc_notes_favs = read_preference(/datum/preference/text/living/ooc_notes_favs)
character.ooc_notes_maybes = read_preference(/datum/preference/text/living/ooc_notes_maybes)
character.ooc_notes_style = read_preference(/datum/preference/toggle/living/ooc_notes_style)
// CHOMPAdd End
character.weight = weight_vr
character.weight_gain = weight_gain
@@ -115,7 +115,6 @@
target.ooc_notes_dislikes = value
return
// CHOMP specific, but added here not to forget
/datum/preference/toggle/living/ooc_notes_style
category = PREFERENCE_CATEGORY_MANUALLY_RENDERED
savefile_key = "OOC_Notes_System"
@@ -124,7 +123,7 @@
can_randomize = FALSE
/datum/preference/toggle/living/ooc_notes_style/apply_to_living(mob/living/target, value)
target.ooc_notes_style = value // CHOMPEnable
target.ooc_notes_style = value
return
/datum/preference/text/living/ooc_notes_maybes
@@ -135,7 +134,7 @@
can_randomize = FALSE
/datum/preference/text/living/ooc_notes_maybes/apply_to_living(mob/living/target, value)
target.ooc_notes_maybes = value // CHOMPEnable
target.ooc_notes_maybes = value
return
/datum/preference/text/living/ooc_notes_favs
@@ -146,7 +145,7 @@
can_randomize = FALSE
/datum/preference/text/living/ooc_notes_favs/apply_to_living(mob/living/target, value)
target.ooc_notes_favs = value // CHOMPEnable
target.ooc_notes_favs = value
return
/datum/preference/toggle/human/name_is_always_random
@@ -106,3 +106,13 @@
/datum/preference/text/lastchangelog/is_accessible(datum/preferences/preferences)
..()
return FALSE
/datum/preference/toggle/random_emote_pitch
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "EMOTE_VARY"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/toggle/autotranscore
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "AUTOTRANSCORE"
savefile_identifier = PREFERENCE_PLAYER
-2
View File
@@ -2,10 +2,8 @@
var/show_in_directory = 1 //Show in Character Directory
var/directory_tag = "Unset" //Sorting tag to use in character directory
var/directory_erptag = "Unset" //ditto, but for non-vore scenes
// CHOMPStation Edit Start: Directory Update
var/directory_gendertag = "Unset" // Gender stuff!
var/directory_sexualitytag = "Unset" // Sexuality!
// CHOMPStation Edit End: Directory Update
var/directory_ad = "" //Advertisement stuff to show in character directory.
var/sensorpref = 5 //Set character's suit sensor level
var/capture_crystal = 1 //Whether or not someone is able to be caught with capture crystals
@@ -34,16 +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] //CHOMPEdit
data["personalGenderTag"] = user.mind.directory_gendertag || "Unset" // CHOMPStation Edit: Character Directory Update
data["personalSexualityTag"] = user.mind.directory_sexualitytag || "Unset" // CHOMPStation Edit: Character Directory Update
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] //CHOMPEdit
data["personalGenderTag"] = user.client.prefs.directory_gendertag || "Unset" // CHOMPStation Edit: Character Directory Update
data["personalSexualityTag"] = user.client.prefs.directory_sexualitytag || "Unset" // CHOMPStation Edit: Character Directory Update
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
@@ -61,7 +61,6 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
var/name = null
var/species = null
var/ooc_notes = null
//CHOMPEdit Start
var/ooc_notes_favs = null
var/ooc_notes_likes = null
var/ooc_notes_maybes = null
@@ -70,7 +69,6 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
var/gendertag = null
var/sexualitytag = null
var/eventtag = GLOB.vantag_choices_list[VANTAG_NONE]
//CHOMPEdit End
var/flavor_text = null
var/tag
var/erptag
@@ -79,24 +77,19 @@ 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
//CHOMPEdit Start
gendertag = C.mob.mind.directory_gendertag || "Unset"
sexualitytag = C.mob.mind.directory_sexualitytag || "Unset"
eventtag = GLOB.vantag_choices_list[C.mob.mind.vantag_preference]
//CHOMPEdit End
else
tag = C.prefs.directory_tag || "Unset"
erptag = C.prefs.directory_erptag || "Unset"
character_ad = C.prefs.directory_ad
//CHOMPEdit Start
gendertag = C.prefs.directory_gendertag || "Unset"
sexualitytag = C.prefs.directory_sexualitytag || "Unset"
eventtag = GLOB.vantag_choices_list[C.prefs.vantag_preference]
//CHOMPEdit End
if(ishuman(C.mob))
var/mob/living/carbon/human/H = C.mob
// CHOMPEdit Start
var/strangername = H.real_name
if(GLOB.data_core && GLOB.data_core.general)
if(!find_general_record("name", H.real_name))
@@ -105,7 +98,6 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
name = strangername
species = "[H.custom_species ? H.custom_species : H.species.name]"
ooc_notes = H.ooc_notes
//CHOMPEdit Start
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
@@ -124,14 +116,12 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
ooc_notes += "\n\nDISLIKES\n\n[H.ooc_notes_dislikes]"
if(LAZYLEN(H.flavor_texts))
flavor_text = H.flavor_texts["general"]
//CHOMPEdit End
if(isAI(C.mob))
var/mob/living/silicon/ai/A = C.mob
name = A.name
species = "Artificial Intelligence"
ooc_notes = A.ooc_notes
//CHOMPEdit Start
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
@@ -148,7 +138,6 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
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]"
//CHOMPEdit End
flavor_text = null // No flavor text for AIs :c
@@ -159,7 +148,6 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
name = R.name
species = "[R.modtype] [R.braintype]"
ooc_notes = R.ooc_notes
//CHOMPEdit Start
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
@@ -176,7 +164,6 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
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]"
//CHOMPEdit End
flavor_text = R.flavor_text
@@ -185,7 +172,6 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
name = P.name
species = "pAI"
ooc_notes = P.ooc_notes
// CHOMPEdit Start
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
@@ -202,13 +188,11 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
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]"
//CHOMPEdit End
flavor_text = P.flavor_text
if(isanimal(C.mob))
var/mob/living/simple_mob/S = C.mob
name = S.name
// CHOMPEdit Start
species = S.character_directory_species()
ooc_notes = S.ooc_notes
if(S.ooc_notes_style && (S.ooc_notes_favs || S.ooc_notes_likes || S.ooc_notes_maybes || S.ooc_notes_dislikes))
@@ -227,7 +211,6 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
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]"
// CHOMPEdit End
flavor_text = S.desc
// It's okay if we fail to find OOC notes and flavor text
@@ -238,7 +221,6 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
directory_mobs.Add(list(list(
"name" = name,
"species" = species,
//CHOMPEdit Start
"ooc_notes_favs" = ooc_notes_favs,
"ooc_notes_likes" = ooc_notes_likes,
"ooc_notes_maybes" = ooc_notes_maybes,
@@ -247,7 +229,6 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
"gendertag" = gendertag,
"sexualitytag" = sexualitytag,
"eventtag" = eventtag,
//CHOMPEdit End
"ooc_notes" = ooc_notes,
"tag" = tag,
"erptag" = erptag,
@@ -310,7 +291,6 @@ 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)
// CHOMPStation Edit Start: Directory Update
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)
@@ -329,7 +309,6 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
if(!new_eventtag)
return
return set_for_mind_or_prefs(user, action, names_list[new_eventtag], can_set_prefs, can_set_mind)
//CHOMPEdit end
/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
@@ -362,7 +341,6 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
if (can_set_mind)
user.mind.directory_ad = new_value
return TRUE
//CHOMPEdit Start
if ("setEventTag")
if (can_set_prefs)
user.client.prefs.vantag_preference = new_value
@@ -378,4 +356,3 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
user.client.prefs.directory_sexualitytag = new_value
if (can_set_mind)
user.mind.directory_sexualitytag = new_value
//CHOMPEdit End