diff --git a/code/__DEFINES/text.dm b/code/__DEFINES/text.dm index 58ab98b132b..48487531d0f 100644 --- a/code/__DEFINES/text.dm +++ b/code/__DEFINES/text.dm @@ -9,3 +9,11 @@ /// Simply removes the < and > characters, and limits the length of the message. #define STRIP_HTML_SIMPLE(text, limit) (GLOB.angular_brackets.Replace(copytext(text, 1, limit), "")) + +///Index access defines for paper/var/add_info_style +#define ADD_INFO_COLOR 1 +#define ADD_INFO_FONT 2 +#define ADD_INFO_SIGN 3 + +///Adds a html style to a text string. Hacky, but that's how inputted text appear on paper sheets after going through the UI. +#define PAPER_MARK_TEXT(text, color, font) "[text]\n \n" diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 5c5d667bf85..c1bb2815720 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -526,6 +526,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai /// Trait applied when the MMI component is added to an [/obj/item/integrated_circuit] #define TRAIT_COMPONENT_MMI "component_mmi" +/// Trait applied when the MMI component is added to an [/obj/item/integrated_circuit] +#define TRAIT_COMPONENT_PRINTER "component_printer" /// If present on a [/mob/living/carbon], will make them appear to have a medium level disease on health HUDs. #define TRAIT_DISEASELIKE_SEVERITY_MEDIUM "diseaselike_severity_medium" diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index ff5563b1d8c..6b028aa5745 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -1131,11 +1131,15 @@ GLOBAL_LIST_EMPTY(PDAs) A.analyzer_act(user, src) if (!scanmode && istype(A, /obj/item/paper) && owner) - var/obj/item/paper/PP = A - if (!PP.info) + var/obj/item/paper/paper = A + if (!paper.get_info_length()) to_chat(user, span_warning("Unable to scan! Paper is blank.")) return - notehtml = PP.info + notehtml = paper.info + if(paper.add_info) + for(var/index in 1 to length(paper.add_info)) + var/list/style = paper.add_info_style[index] + notehtml += PAPER_MARK_TEXT(paper.add_info[index], style[ADD_INFO_COLOR], style[ADD_INFO_FONT]) note = replacetext(notehtml, "
", "\[br\]") note = replacetext(note, "
  • ", "\[*\]") note = replacetext(note, "