[MIRROR] Printer Circuit Component [MDB IGNORE] (#8825)

* Printer Circuit Component (#62012)

I'm adding a circuit component that can print text string on a paper object in a variety of colors and font typefaces (currently only web-safe ones are available, maybe i'll add some fancy ones in the future but they'd need to be imported either through @ import of @ font-face in a separate CSS not imported by every tgui UI).
It's important to note that because the UI sanitizes new text inputed by users and not what's already written on the paper (so the pen_color and pen_font don't be purged in the process), we can't safely have these strings "printed" into the info variable directly, because of that these values will be stored in two new list variables, one for the text and one for font color, face and the signature. When the paper sheet UI is opened, these will be sanitized and then parsed into the text, so the next time the paper is edited we can clear these two lists.
Obviously better than a hacky byond proc - parsemarkdown() is outdated af -, albeit a bit messy... like the rest of paper code.

Requires #62033.

* Printer Circuit Component

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-10-14 21:20:22 +01:00
committed by GitHub
co-authored by Ghom
parent b16b79091a
commit 01a41bef0d
17 changed files with 334 additions and 75 deletions
+2
View File
@@ -81,6 +81,8 @@
trigger_output = add_output_port("Triggered", PORT_TYPE_SIGNAL, order = 2)
if(circuit_flags & CIRCUIT_FLAG_INSTANT)
ui_color = "orange"
if(circuit_flags & CIRCUIT_FLAG_REFUSE_MODULE)
desc += " Incompatible with module components."
/obj/item/circuit_component/Destroy()
if(parent)