Paper Letterhead (#13155)

* fax letterhead 1

need to add correct paperbins on map and resize logos

* tweaks

* syndicate paper on syndicate base

* code improvements
This commit is contained in:
Ty-Omaha
2020-03-21 19:17:03 -04:00
committed by GitHub
parent de09a6011e
commit e691ea2b36
9 changed files with 64 additions and 49 deletions
+9 -3
View File
@@ -2196,9 +2196,15 @@
var/reply_to = locate(href_list["replyto"])
var/destination
var/notify
var/obj/item/paper/P = new /obj/item/paper(null) //hopefully the null loc won't cause trouble for us
var/obj/item/paper/P
var/use_letterheard = alert("Use letterhead? If so, do not add your own header or a footer. Type and format only your actual message.",,"Nanotrasen","Syndicate", "No")
switch(use_letterheard)
if("Nanotrasen")
P = new /obj/item/paper/central_command(null)
if("Syndicate")
P = new /obj/item/paper/syndicate(null)
if("No")
P = new /obj/item/paper(null)
if(!fax)
var/list/departmentoptions = GLOB.alldepartments + GLOB.hidden_departments + "All Departments"
destination = input(usr, "To which department?", "Choose a department", "") as null|anything in departmentoptions
+2 -1
View File
@@ -195,7 +195,8 @@ GLOBAL_LIST_EMPTY(asset_datums)
"large_stamp-rep.png" = 'icons/paper_icons/large_stamp-rep.png',
"large_stamp-magistrate.png"= 'icons/paper_icons/large_stamp-magistrate.png',
"talisman.png" = 'icons/paper_icons/talisman.png',
"ntlogo.png" = 'icons/paper_icons/ntlogo.png'
"ntlogo.png" = 'icons/paper_icons/ntlogo.png',
"syndielogo.png" ='icons/paper_icons/syndielogo.png'
)
/datum/asset/simple/chess
+21 -2
View File
@@ -21,7 +21,9 @@
max_integrity = 50
attack_verb = list("bapped")
dog_fashion = /datum/dog_fashion/head
var/header //Above the main body, displayed at the top
var/info //What's actually written on the paper.
var/footer //The bottom stuff before the stamp but after the body
var/info_links //A different version of the paper which includes html links at fields and EOF
var/stamps //The (text for the) stamps on the paper.
var/fields //Amount of user created fields
@@ -76,9 +78,9 @@
var/data
var/stars = (!user.say_understands(null, GLOB.all_languages["Galactic Common"]) && !forceshow) || forcestars
if(stars) //assuming all paper is written in common is better than hardcoded type checks
data = "[stars(info)][stamps]"
data = "[header][stars(info)][footer][stamps]"
else
data = "<div id='markdown'>[infolinks ? info_links : info]</div>[stamps]"
data = "[header]<div id='markdown'>[infolinks ? info_links : info]</div>[footer][stamps]"
if(view)
var/datum/browser/popup = new(user, "Paper[UID()]", , paper_width, paper_height)
popup.stylesheets = list()
@@ -587,6 +589,23 @@
/obj/item/paper/crumpled
name = "paper scrap"
icon_state = "scrap"
/obj/item/paper/syndicate
name = "paper"
header = "<p><img style='display: block; margin-left: auto; margin-right: auto;' src='syndielogo.png' width='220' height='135' /></p><hr />"
info = ""
/obj/item/paper/nanotrasen
name = "paper"
header = "<p><img style='display: block; margin-left: auto; margin-right: auto;' src='ntlogo.png' width='220' height='135' /></p><hr />"
info = ""
/obj/item/paper/central_command
name = "paper"
header ="<p><img style='display: block; margin-left: auto; margin-right: auto;' src='ntlogo.png' alt='' width='220' height='135' /></p><hr /><h3 style='text-align: center;font-family: Verdana;'><b> Nanotrasen Central Command</h3><p style='text-align: center;font-family:Verdana;'>Official Expedited Memorandum</p></b><hr />"
info = ""
footer = "<hr /><p style='font-family:Verdana;'><em>Failure to adhere appropriately to orders that may be contained herein is in violation of Space Law, and punishments may be administered appropriately upon return to Central Command.</em><br /><em>The recipient(s) of this memorandum acknowledge by reading it that they are liable for any and all damages to crew or station that may arise from ignoring suggestions or advice given herein.</em></p>"
/obj/item/paper/crumpled/update_icon()
return
+16 -2
View File
@@ -10,7 +10,8 @@
pressure_resistance = 8
var/amount = 30 //How much paper is in the bin.
var/list/papers = list() //List of papers put in the bin for reference.
var/letterhead_type
/obj/item/paper_bin/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
if(amount)
amount = 0
@@ -71,7 +72,10 @@
P = papers[papers.len]
papers.Remove(P)
else
P = new /obj/item/paper
if(letterhead_type && alert("Choose a style",,"Letterhead","Blank")=="Letterhead")
P = new letterhead_type
else
P = new /obj/item/paper
if(SSholiday.holidays && SSholiday.holidays[APRIL_FOOLS])
if(prob(30))
P.info = "<font face=\"[P.crayonfont]\" color=\"red\"><b>HONK HONK HONK HONK HONK HONK HONK<br>HOOOOOOOOOOOOOOOOOOOOOONK<br>APRIL FOOLS</b></font>"
@@ -139,3 +143,13 @@
add_fingerprint(user)
return
/obj/item/paper_bin/nanotrasen
name = "nanotrasen paper bin"
letterhead_type = /obj/item/paper/nanotrasen
/obj/item/paper_bin/syndicate
name = "syndicate paper bin"
letterhead_type = /obj/item/paper/syndicate
+2
View File
@@ -187,7 +187,9 @@
/obj/machinery/photocopier/proc/copy(var/obj/item/paper/copy)
var/obj/item/paper/c = new /obj/item/paper (loc)
c.header = copy.header
c.info = copy.info
c.footer = copy.footer
c.name = copy.name // -- Doohl
c.fields = copy.fields
c.stamps = copy.stamps