Skip to content
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
19 changes: 17 additions & 2 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

GLOBAL_LIST_EMPTY(preferences_datums)

GLOBAL_LIST_EMPTY(chosen_names)
Expand Down Expand Up @@ -161,6 +162,7 @@ GLOBAL_LIST_EMPTY(chosen_names)
var/update_mutant_colors = TRUE

var/headshot_link
var/chatheadshot
var/ooc_extra_link
var/ooc_extra
var/list/descriptor_entries = list()
Expand Down Expand Up @@ -441,7 +443,8 @@ GLOBAL_LIST_EMPTY(chosen_names)
dat += "<br><img src='[headshot_link]' width='100px' height='100px'>"
if(is_legacy)
dat += "<br><i><font size = 1>(Legacy)<a href='?_src_=prefs;preference=legacyhelp;task=input'>(?)</a></font></i>"

dat += "<br><b>Headshots in chat?:</b> <a href='?_src_=prefs;preference=headshotchat;task=input'>[chatheadshot == 2 ? "Yes" : "No"]</a><a href='?_src_=prefs;preference=chatheadshothelp;task=input'>(?)</a>"

dat += "<br><b>[(length(flavortext) < MINIMUM_FLAVOR_TEXT) ? "<font color = '#802929'>" : ""]Flavortext:[(length(flavortext) < MINIMUM_FLAVOR_TEXT) ? "</font>" : ""]</b><a href='?_src_=prefs;preference=formathelp;task=input'>(?)</a><a href='?_src_=prefs;preference=flavortext;task=input'>Change</a>"

dat += "<br><b>[(length(ooc_notes) < MINIMUM_OOC_NOTES) ? "<font color = '#802929'>" : ""]OOC Notes:[(length(ooc_notes) < MINIMUM_OOC_NOTES) ? "</font>" : ""]</b><a href='?_src_=prefs;preference=formathelp;task=input'>(?)</a><a href='?_src_=prefs;preference=ooc_notes;task=input'>Change</a>"
Expand Down Expand Up @@ -1585,7 +1588,11 @@ Slots: [job.spawn_positions] [job.round_contrib_points ? "RCP: +[job.round_contr
headshot_link = new_headshot_link
to_chat(user, "<span class='notice'>Successfully updated headshot picture</span>")
log_game("[user] has set their Headshot image to '[headshot_link]'.")

if("headshotchat")
if(chatheadshot == 1)
chatheadshot = 2
else
chatheadshot = 1
if("legacyhelp")
var/list/dat = list()
dat += "This slot was around since before major Flavortext / OOC changes.<br>"
Expand Down Expand Up @@ -1615,6 +1622,12 @@ Slots: [job.spawn_positions] [job.round_contrib_points ? "RCP: +[job.round_contr
var/datum/browser/popup = new(user, "Formatting Help", nwidth = 400, nheight = 350)
popup.set_content(dat.Join())
popup.open(FALSE)
if("chatheadshothelp")
var/list/dat = list()
dat +="Click this option to make other's headshots appear in chat<br>"
var/datum/browser/popup = new(user, "Formatting Help", nwidth = 400, nheight = 350)
popup.set_content(dat.Join())
popup.open(FALSE)
if("flavortext")
to_chat(user, "<span class='notice'>["<span class='bold'>Flavortext should not include nonphysical nonsensory attributes such as backstory or the character's internal thoughts.</span>"]</span>")
var/new_flavortext = input(user, "Input your character description:", "Flavortext", flavortext) as message|null
Expand Down Expand Up @@ -2382,6 +2395,8 @@ Slots: [job.spawn_positions] [job.round_contrib_points ? "RCP: +[job.round_contr

character.headshot_link = headshot_link

character.chatheadshot = chatheadshot

character.statpack = statpack

character.flavortext = flavortext
Expand Down
3 changes: 2 additions & 1 deletion code/modules/client/preferences_savefile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["headshot_link"] >> headshot_link
if(!valid_headshot_link(null, headshot_link, TRUE))
headshot_link = null

S["chatheadshot"] >> chatheadshot
S["flavortext"] >> flavortext
S["flavortext_display"] >> flavortext_display
S["ooc_notes"] >> ooc_notes
Expand Down Expand Up @@ -660,6 +660,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car

WRITE_FILE(S["update_mutant_colors"] , update_mutant_colors)
WRITE_FILE(S["headshot_link"] , headshot_link)
WRITE_FILE(S["chatheadshot"] , chatheadshot)
WRITE_FILE(S["flavortext"] , html_decode(flavortext))
WRITE_FILE(S["flavortext_display"], flavortext_display)
WRITE_FILE(S["ooc_notes"] , html_decode(ooc_notes))
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/dead/new_player/preferences_setup.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
ooc_extra_link = null
ooc_extra = null
headshot_link = null
chatheadshot = 1
features = pref_species.get_random_features()
body_markings = pref_species.get_random_body_markings(features)
accessory = "Nothing"
Expand Down
6 changes: 6 additions & 0 deletions code/modules/mob/living/carbon/human/examine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
var/t_is = p_are()
var/obscure_name = FALSE
var/race_name = dna.species.name
var/mob/living/carbon/human/viewer = user
var/datum/antagonist/maniac/maniac = user.mind?.has_antag_datum(/datum/antagonist/maniac)
if(maniac && (user != src))
race_name = "disgusting pig"
Expand Down Expand Up @@ -725,6 +726,11 @@
if(heart?.inscryption && (heart.inscryption_key in maniac.key_nums))
. += span_danger("[t_He] know[p_s()] [heart.inscryption_key], I AM SURE OF IT!")

if((!obscure_name || client?.prefs.masked_examine) && (flavortext || headshot_link || ooc_notes) && (viewer?.chatheadshot == 2))
if((HAS_TRAIT(user,TRAIT_VAMPIRISM)) && (has_status_effect(/datum/status_effect/buff/veil_down)) && (valid_headshot_link(null, antag_headshot_link, TRUE)))
. += "<span class='info'><img src=[antag_headshot_link] width=100 height=100/></span>"
else if(headshot_link)
. += "<span class='info'><img src=[headshot_link] width=100 height=100/></span>"
if(Adjacent(user))
if(observer_privilege)
var/static/list/check_zones = list(
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/human/human_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
var/datum/devotion/devotion = null // Used for cleric_holder for priests

var/headshot_link = null
var/chatheadshot = null
var/flavortext = null
var/flavortext_display = null
var/ooc_notes = null
Expand Down
Loading