mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-25 17:41:56 +00:00
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:
@@ -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"])
|
||||
|
||||
@@ -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)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user