[MIRROR] Many bug fixes, QoL, and PDA notes port (now with sensible diffs) (#7588)

Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com>
Co-authored-by: Nadyr <41974248+Darlantanis@users.noreply.github.com>
Co-authored-by: Nadyr <forlirnglacignis@gmail.com>
This commit is contained in:
CHOMPStation2
2024-01-19 07:26:26 -07:00
committed by GitHub
parent 0143054b6e
commit a4280d14e1
24 changed files with 520 additions and 88 deletions

View File

@@ -178,11 +178,18 @@
if(length(notes.note) > 0)
notes.note += "<br><br>"
// Store the scanned document to the notes
notes.note += "Scanned Document. Edit to restore previous notes/delete scan.<br>----------<br>" + formatted_scan + "<br>"
// notehtml ISN'T set to allow user to get their old notes back. A better implementation would add a "scanned documents"
// feature to the PDA, which would better convey the availability of the feature, but this will work for now.
notes.note = formatted_scan
notes.notetitle = sanitize_simple(P.name, list("\n" = "", "\t" = "", "ÿ" = ""))
// update the saved note too incase we kept the pda open, this is really silly due to how the notehtml is actually what's passed to the editor's text.
// If I don't update it here, it loses the data when you edit it!
notes.storednotes[notes.currentnote] = notes.note
notes.storedtitles[notes.currentnote] = notes.notetitle
notes.notehtml = html_decode(replacetext(notes.note,"<br>", "\n"))
// Inform the user
to_chat(user, "<span class=notice>Paper scanned and OCRed to notekeeper.</span>")//concept of scanning paper copyright brainoblivion 2009
var/scannedtitle = "Paper"
if(!isnull(notes.notetitle) && notes.notetitle != "")
scannedtitle = "'[notes.notetitle]'"
to_chat(user, "<span class=notice>[scannedtitle] scanned to Notekeeper in note [alphabet_uppercase[notes.currentnote]].</span>")//concept of scanning paper copyright brainoblivion 2009
else
to_chat(user, "<span class=warning>Error scanning [A].</span>")