mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 09:54:52 +00:00
adds a missing proc for flavor text
I think we could've used a pre-existing proc but whatever
This commit is contained in:
@@ -469,3 +469,18 @@ var/list/rot13_lookup = list()
|
|||||||
t_out += char
|
t_out += char
|
||||||
|
|
||||||
return t_out
|
return t_out
|
||||||
|
|
||||||
|
//Used in preferences' SetFlavorText and human's set_flavor verb
|
||||||
|
//Previews a string of len or less length
|
||||||
|
|
||||||
|
/proc/copytext_preserve_html(var/text, var/first, var/last)
|
||||||
|
return html_encode(copytext(html_decode(text), first, last))
|
||||||
|
|
||||||
|
proc/TextPreview(var/string,var/len=40)
|
||||||
|
if(lentext(string) <= len)
|
||||||
|
if(!lentext(string))
|
||||||
|
return "\[...\]"
|
||||||
|
else
|
||||||
|
return string
|
||||||
|
else
|
||||||
|
return "[copytext(string, 1, 37)]..."
|
||||||
Reference in New Issue
Block a user