diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 360db2c9c978..d25b431a4942 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -2223,9 +2223,9 @@ GLOBAL_LIST_EMPTY(preferences_datums) features["naked_flavor_text"] = strip_html_simple(msg, MAX_FLAVOR_LEN, TRUE) //SPLURT edit end if("silicon_flavor_text") - var/msg = input(usr, "Set the silicon flavor text in your 'examine' verb. This can also be used for OOC notes and preferences!", "Silicon Flavor Text", features["silicon_flavor_text"]) as message|null //Skyrat edit, removed stripped_multiline_input() + var/msg = input(usr, "Set the flavor text in your 'examine' verb. This is for describing what people can tell by looking at your character.", "Silicon Flavor Text", features["silicon_flavor_text"]) as message|null if(!isnull(msg)) - features["silicon_flavor_text"] = strip_html_simple(msg, MAX_FLAVOR_LEN, TRUE) //Skyrat edit, uses strip_html_simple() + features["silicon_flavor_text"] = strip_html_simple(msg, MAX_FLAVOR_LEN, TRUE) if("ooc_notes") var/msg = stripped_multiline_input(usr, "Set always-visible OOC notes related to content preferences. THIS IS NOT FOR CHARACTER DESCRIPTIONS!", "OOC notes", html_decode(features["ooc_notes"]), MAX_FLAVOR_LEN, TRUE) diff --git a/code/modules/mob/living/silicon/examine.dm b/code/modules/mob/living/silicon/examine.dm index 0840ea1191a1..ab943fdfcfff 100644 --- a/code/modules/mob/living/silicon/examine.dm +++ b/code/modules/mob/living/silicon/examine.dm @@ -3,3 +3,16 @@ . += "[src] has the following laws:" for(var/law in laws.get_law_list(include_zeroth = TRUE)) . += law + + //SPLURT EDIT ADDITION BEGIN - CUSTOMIZATION + if(client) + var/line + if(length(client.prefs.features["silicon_flavor_text"])) + var/message = client.prefs.features["silicon_flavor_text"] + if(length_char(message) <= 40) + line = "[message]" + else + line = "[copytext_char(message, 1, 37)]... More..." + line += " \[OOC\]" + . += line + //SPLURT EDIT ADDITION END diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 054de86e9307..7eaef1084ce3 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -61,12 +61,6 @@ diag_hud_set_health() ADD_TRAIT(src, TRAIT_ASHSTORM_IMMUNE, ROUNDSTART_TRAIT) -/mob/living/silicon/ComponentInitialize() - . = ..() - AddElement(/datum/element/flavor_text, _name = "Silicon Flavor Text", _save_key = "silicon_flavor_text") - AddElement(/datum/element/flavor_text, "", "Temporary Flavor Text", "This should be used only for things pertaining to the current round!", _save_key = null) - AddElement(/datum/element/flavor_text, _name = "OOC Notes", _addendum = "Put information on ERP/vore/lewd-related preferences here. THIS SHOULD NOT CONTAIN REGULAR FLAVORTEXT!!", _save_key = "ooc_notes", _examine_no_preview = TRUE) - /mob/living/silicon/med_hud_set_health() return //we use a different hud @@ -221,8 +215,23 @@ if (href_list["laws"]) // With how my law selection code works, I changed statelaws from a verb to a proc, and call it through my law selection panel. --NeoFite statelaws() - return - + //SPLURT EDIT ADDITION BEGIN - CUSTOMIZATION + if(href_list["lookup_info"]) + switch(href_list["lookup_info"]) + if("ooc_notes") + if(client && length(client.prefs.features["ooc_notes"])) + var/datum/browser/popup = new(usr, "[name]'s ooc info", "[name]'s OOC Information", 500, 200) + popup.set_content(text("[][]", "[name]'s OOC information", replacetext(client.prefs.features["ooc_notes"], "\n", "
"))) + popup.open() + return + + if("silicon_flavor_text") + if(client && length(client.prefs.features["silicon_flavor_text"])) + var/datum/browser/popup = new(usr, "[name]'s flavor text", "[name]'s Flavor Text", 500, 200) + popup.set_content(text("[][]", "[name]'s flavor text", replacetext(client.prefs.features["silicon_flavor_text"], "\n", "
"))) + popup.open() + return + //SPLURT EDIT ADDITION END /mob/living/silicon/proc/statelaws(force = 0) diff --git a/modular_splurt/code/modules/client/preferences.dm b/modular_splurt/code/modules/client/preferences.dm index 4d58cfdec9eb..185a96762b2c 100644 --- a/modular_splurt/code/modules/client/preferences.dm +++ b/modular_splurt/code/modules/client/preferences.dm @@ -146,6 +146,7 @@ dat += "
" dat += "

Flavor Text

" + // Carbon flavor text dat += "Set Examine Text
" if(length(features["flavor_text"]) <= MAX_FLAVOR_PREVIEW_LEN) if(!length(features["flavor_text"])) @@ -165,15 +166,16 @@ else dat += "[TextPreview(html_encode(features["naked_flavor_text"]))]...
" //SPLURT edit end + // Silicon flavor text dat += "

Silicon Flavor Text

" dat += "Set Silicon Examine Text
" - if(length(features["silicon_flavor_text"]) <= MAX_FLAVOR_PREVIEW_LEN) + if(length(features["silicon_flavor_text"]) <= 40) if(!length(features["silicon_flavor_text"])) - dat += "\[...\]
" + dat += "\[...\]" else - dat += "[features["silicon_flavor_text"]]
" + dat += "[html_encode(features["silicon_flavor_text"])]" else - dat += "[TextPreview(features["silicon_flavor_text"])]...
" + dat += "[copytext(html_encode(features["silicon_flavor_text"]), 1, 40)]..." dat += "

OOC notes

" dat += "Set OOC notes
" var/ooc_notes_len = length(features["ooc_notes"])