Merge pull request #11186 from Putnam3145/fixed-flavor

Fixed temp flavor text (for real)
This commit is contained in:
Ghom
2020-02-22 15:09:58 +01:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -129,7 +129,7 @@ GLOBAL_VAR_INIT(miscreants_allowed, FALSE)
flavor_text_2 = new_flavor
to_chat(src, "Your temporary flavor text has been updated.")
/mob/proc/print_flavor_text(flavor)
/mob/proc/print_flavor_text(flavor,temp = FALSE)
if(!flavor)
return
// We are decoding and then encoding to not only get correct amount of characters, but also to prevent partial escaping characters being shown.
@@ -137,7 +137,7 @@ GLOBAL_VAR_INIT(miscreants_allowed, FALSE)
if(length_char(msg) <= 40)
return "<span class='notice'>[html_encode(msg)]</span>"
else
return "<span class='notice'>[html_encode(copytext_char(msg, 1, 37))]... <a href='?src=[REF(src)];flavor_more=1'>More...</span></a>"
return "<span class='notice'>[html_encode(copytext_char(msg, 1, 37))]... <a href='?src=[REF(src)];flavor[temp ? "2" : ""]_more=1'>More...</span></a>"
//LOOC toggles
/client/verb/listen_looc()
@@ -397,7 +397,7 @@
var/flavor = print_flavor_text(flavor_text)
if(flavor)
. += flavor
var/temp_flavor = print_flavor_text(flavor_text_2)
var/temp_flavor = print_flavor_text(flavor_text_2,TRUE)
if(temp_flavor)
. += temp_flavor
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .)