Custom Link!

Allows one to set a custom link to show up in their examine text!

One thing people used the OOC notes for was to post image/flist links in the chat and get clickable links!

Since the OOC panel is a thing now, I thought it would be good to enshrine that function into something that's specifically for it.

This allows you to enter an extra 100 character string underneath your flavortext in your examine text, which can technically be anything, but it's intended to be space for links to show up and be clickable!
This commit is contained in:
VerySoft
2023-08-11 05:04:33 -04:00
parent 84d239d6ed
commit 4811dfbe6e
6 changed files with 37 additions and 1 deletions
@@ -431,6 +431,9 @@
msg += "[flavor_text]"
// VOREStation Start
if(custom_link)
msg += "Custom link: [custom_link]"
if(ooc_notes)
msg += "<span class = 'deptradio'>OOC Notes:</span> <a href='?src=\ref[src];ooc_notes=1'>\[View\]</a>"
msg += "<span class='deptradio'><a href='?src=\ref[src];vore_prefs=1'>\[Mechanical Vore Preferences\]</a></span>"
@@ -7,6 +7,7 @@
var/ooc_notes = null
var/ooc_notes_likes = null
var/ooc_notes_dislikes = null
var/custom_link = null
appearance_flags = TILE_BOUND|PIXEL_SCALE|KEEP_TOGETHER|LONG_GLIDE
var/hunger_rate = DEFAULT_HUNGER_FACTOR
//custom say verbs
+17
View File
@@ -58,6 +58,7 @@
to_chat(usr, "<span class='filter_notice'>OOC note dislikes have been updated. Don't forget to save!</span>")
log_admin("[key_name(usr)] updated their OOC note dislikes mid-round.")
ooc_notes_window(usr)
/mob/living/proc/save_ooc_panel()
if(usr != src)
return
@@ -67,6 +68,22 @@
if(client.prefs.save_character())
to_chat(usr, "<span class='filter_notice'>Character preferences saved.</span>")
/mob/living/verb/set_custom_link()
set name = "Set Custom Link"
set desc = "Set a custom link to show up with your examine text."
set category = "IC"
if(usr != src)
return
var/new_link = strip_html_simple(tgui_input_text(usr, "Enter a link to add on to your examine text! This should be a related image link/gallery, or things like your F-list. This is not the place for memes.", "Custom Link" , html_decode(custom_link), max_length = 100, encode = TRUE, prevent_enter = TRUE))
if(new_link && CanUseTopic(usr))
if(length(new_link) > 100)
to_chat(usr, "<span class = 'warning'>Your entry is too long, it must be 100 characters or less.</span>")
return
custom_link = new_link
to_chat(usr, "<span class = 'notice'>Link set: [custom_link]</span>")
log_admin("[usr]/[usr.ckey] set their custom link to [custom_link]")
/mob/living/verb/set_voice_freq()
set name = "Set Voice Frequency"