Printing Fixes (#1476)

Refactors machines to use /obj/machinery/proc/print() to print things to reduce redundant code.
Fixes #1433.
Fixes #1454.
This commit is contained in:
Lohikar
2017-01-08 16:44:42 -06:00
committed by skull132
parent b96f954762
commit 465b982eeb
29 changed files with 299 additions and 253 deletions

View File

@@ -417,17 +417,17 @@ won't update every console in existence) but it's more of a hassle to do. Also,
screen = 0.5
spawn(20)
var/obj/item/weapon/paper/PR = new/obj/item/weapon/paper
PR.name = "list of researched technologies"
PR.info = "<center><b>[station_name()] Science Laboratories</b>"
PR.info += "<h2>[ (text2num(href_list["print"]) == 2) ? "Detailed" : ] Research Progress Report</h2>"
PR.info += "<i>report prepared at [worldtime2text()] station time</i></center><br>"
var/pname = "list of researched technologies"
var/info = "<center><b>[station_name()] Science Laboratories</b>"
info += "<h2>[ (text2num(href_list["print"]) == 2) ? "Detailed" : ] Research Progress Report</h2>"
info += "<i>report prepared at [worldtime2text()] station time</i></center><br>"
if(text2num(href_list["print"]) == 2)
PR.info += GetResearchListInfo()
info += GetResearchListInfo()
else
PR.info += GetResearchLevelsInfo()
PR.info_links = PR.info
PR.icon_state = "paper_words"
PR.loc = src.loc
info += GetResearchLevelsInfo()
PR.set_content_unsafe(pname, info)
print(PR)
spawn(10)
screen = ((text2num(href_list["print"]) == 2) ? 5.0 : 1.1)
updateUsrDialog()

View File

@@ -74,12 +74,14 @@
src.visible_message("<b>[name]</b> states, \"Scanning complete.\"")
var/obj/item/weapon/paper/P = new(src.loc)
P.name = "[src] report #[++report_num]"
P.info = "<b>[src] analysis report #[report_num]</b><br>"
P.info += "<br>"
P.info += "\icon[scanned_object] [results]"
var/pname = "[src] report #[++report_num]"
var/info = "<b>[src] analysis report #[report_num]</b><br>"
info += "<br>"
info += "\icon[scanned_object] [results]"
P.stamped = list(/obj/item/weapon/stamp)
P.overlays = list("paper_stamped")
P.set_content_unsafe(pname, info)
print(P)
if(scanned_object && istype(scanned_object, /obj/machinery/artifact))
var/obj/machinery/artifact/A = scanned_object