mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
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:
@@ -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"])
|
||||
|
||||
@@ -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}}
|
||||
|
||||
Reference in New Issue
Block a user