Adds Random Notes (#5644)

Adds SSDocs, which manages randomly spawned documents.
    These documents can be specified in a json file or in a database.
    Adds /obj/random/document and adds /obj/random/document to the loot pool of /obj/random/loot.

Actually adding the notes to spawn is up to loredevs. If there are no notes to choose from, /obj/random/document will leave a blank sheet.

The notes can have HTML in them, meaning custom CSS and images. We're giving the loredevs a good bit of responsibility here.
This commit is contained in:
MarinaGryphon
2019-07-13 09:50:19 -05:00
committed by Erki
parent 514e1f2aa4
commit 0cd61f4f48
10 changed files with 825 additions and 545 deletions

View File

@@ -126,7 +126,7 @@
if(!computer.nano_printer)
error = "Missing Hardware: Your computer does not have required hardware to complete this operation."
return 1
if(!computer.nano_printer.print_text(pencode2html(F.stored_data)))
if(!computer.nano_printer.print_text(F.stored_data))
error = "Hardware error: Printer was unable to print the file. It may be out of paper."
return 1
if(href_list["PRG_copytousb"])

View File

@@ -164,6 +164,13 @@
stored_files = null
return ..()
/obj/item/weapon/computer_hardware/hard_drive/New()
/obj/item/weapon/computer_hardware/hard_drive/Initialize(mapload)
install_default_programs()
..()
if(mapload && prob(5))
var/datum/docs_document/file = SSdocs.pick_document_by_tag(SSDOCS_MEDIUM_FILE)
if(!istype(file))
log_ss("docs", "pick_document_by_tag returned null file!")
else
var/datum/computer_file/data/F = SSdocs.create_file(file)
store_file(F)
. = ..()