diff --git a/code/__DEFINES/text_defines.dm b/code/__DEFINES/text_defines.dm index cd4b28b6d75..e45e0787f0e 100644 --- a/code/__DEFINES/text_defines.dm +++ b/code/__DEFINES/text_defines.dm @@ -6,6 +6,7 @@ #define MAX_CHARACTERS_PER_BOOKPAGE 5000 #define MAX_SUMMARY_LEN 1500 #define MAX_NAME_LEN 50 //diona names can get loooooooong +#define MAX_FLAVORTEXT_PRINT 400 //Amount of flavor text characters to print before cutting off. /// Removes characters incompatible with file names. #define SANITIZE_FILENAME(text) (GLOB.filename_forbidden_chars.Replace(text, "")) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 50d8d884316..0062176085c 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -793,10 +793,10 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ /mob/proc/print_flavor_text(shrink = TRUE) if(flavor_text && flavor_text != "") var/msg = dna?.flavor_text ? replacetext(dna.flavor_text, "\n", " ") : replacetext(flavor_text, "\n", " ") - if(length(msg) <= 40 || !shrink) + if(length(msg) <= MAX_FLAVORTEXT_PRINT || !shrink) return "[msg]" // There is already encoded by tgui_input else - return "[copytext_preserve_html(msg, 1, 37)]... More..." + return "[copytext_preserve_html(msg, 1, MAX_FLAVORTEXT_PRINT - 3)]... More..." /mob/proc/is_dead() return stat == DEAD