Fixes Issue #22 - Adds a print button to request consoles.

* Print button next to each message prints that message on paper.
* Useful if you want to remember a list of stuff someone asked for.
This commit is contained in:
Leshana
2016-05-15 18:14:03 -04:00
parent 9089efbe7a
commit 9e7e8db5eb
2 changed files with 11 additions and 0 deletions

View File

@@ -176,6 +176,16 @@ var/list/obj/machinery/requests_console/allConsoles = list()
else
audible_message(text("\icon[src] *The Requests Console beeps: 'NOTICE: No server detected!'"),,4)
//Handle printing
if (href_list["print"])
var/msg = message_log[text2num(href_list["print"])];
if(msg)
msg = replacetext(msg, "<BR>", "\n")
msg = strip_html_properly(msg)
var/obj/item/weapon/paper/R = new(src.loc)
R.name = "[department] Message"
R.info = "<H3>[department] Requests Console</H3><div>[msg]</div>"
//Handle screen switching
if(href_list["setScreen"])
var/tempScreen = text2num(href_list["setScreen"])

View File

@@ -72,6 +72,7 @@ Used In File(s): \code\game\machinery\requests_console.dm
<div class="statusDisplay" style="overflow: auto;">
{{for data.message_log}}
<div class="item">{{:value}}</div>
<div class="item">{{:helper.link('Print', null, { 'print' : index + 1 })}}</div>
{{empty}}
<div class="item">No messages have been recieved.</div>
{{/for}}