mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 14:07:51 +01:00
Add send time to fax, fix nest issue
This commit is contained in:
@@ -1744,16 +1744,22 @@
|
||||
stampvalue = input(src.owner, "Pick a stamp icon.", "Stamp Icon") as null|anything in list("cent","ok","deny","clown")
|
||||
else if(stamptype == "text")
|
||||
stampvalue = input(src.owner, "What should the stamp say?", "Stamp Text") as text|null
|
||||
else
|
||||
else if(stamptype == "none")
|
||||
stamptype = ""
|
||||
sendername = input(src.owner, "What organization does the fax come from? This determines the prefix of the paper (i.e. Central Command- Title).", "Organization") as text|null
|
||||
else
|
||||
del(P)
|
||||
return
|
||||
|
||||
sendername = input(src.owner, "What organization does the fax come from? This determines the prefix of the paper (i.e. Central Command- Title). This is optional.", "Organization") as text|null
|
||||
|
||||
if(sender)
|
||||
notify = alert(src.owner, "Would you like to inform the original sender that a fax has arrived?","Notify Sender","Yes","No")
|
||||
|
||||
// Create the reply message
|
||||
|
||||
P.name = "[sendername]- [customname]"
|
||||
if(sendername)
|
||||
P.name = "[sendername]- [customname]"
|
||||
else
|
||||
P.name = "[customname]"
|
||||
P.info = input
|
||||
P.update_icon()
|
||||
P.x = rand(-2, 0)
|
||||
@@ -1806,6 +1812,7 @@
|
||||
A.message = P
|
||||
A.reply_to = reply_to
|
||||
A.sent_by = usr
|
||||
A.sent_at = world.time
|
||||
|
||||
src.owner << "\blue Message transmitted successfully."
|
||||
if(notify == "Yes")
|
||||
|
||||
@@ -9,6 +9,7 @@ var/list/adminfaxes = list()
|
||||
var/origin = null
|
||||
var/message = null
|
||||
var/sent_by = null
|
||||
var/sent_at = null
|
||||
|
||||
/datum/fax/New()
|
||||
faxes += src
|
||||
@@ -35,12 +36,13 @@ var/list/adminfaxes = list()
|
||||
html += "<div class='block'>"
|
||||
html += "<h2>Admin Faxes</h2>"
|
||||
html += "<table>"
|
||||
html += "<tr style='font-weight:bold;'><td width='150px'>Name</td><td width='150px'>From Department</td><td width='150px'>To Department</td><td width='150px'>Sent By</td><td width='50px'>View</td><td width='50px'>Reply</td><td width='75px'>Replied To</td></td></tr>"
|
||||
html += "<tr style='font-weight:bold;'><td width='150px'>Name</td><td width='150px'>From Department</td><td width='150px'>To Department</td><td width='75px'>Sent At</td><td width='150px'>Sent By</td><td width='50px'>View</td><td width='50px'>Reply</td><td width='75px'>Replied To</td></td></tr>"
|
||||
for(var/datum/fax/admin/A in adminfaxes)
|
||||
html += "<tr>"
|
||||
html += "<td>[A.name]</td>"
|
||||
html += "<td>[A.from_department]</td>"
|
||||
html += "<td>[A.to_department]</td>"
|
||||
html += "<td>[worldtime2text(A.sent_at)]</td>"
|
||||
if(A.sent_by)
|
||||
var/mob/living/S = A.sent_by
|
||||
html += "<td><A HREF='?_src_=holder;adminplayeropts=\ref[A.sent_by]'>[S.name]</A></td>"
|
||||
@@ -63,12 +65,13 @@ var/list/adminfaxes = list()
|
||||
html += "<div class='block'>"
|
||||
html += "<h2>Departmental Faxes</h2>"
|
||||
html += "<table>"
|
||||
html += "<tr style='font-weight:bold;'><td width='150px'>Name</td><td width='150px'>From Department</td><td width='150px'>To Department</td><td width='150px'>Sent By</td><td width='175px'>View</td></td></tr>"
|
||||
html += "<tr style='font-weight:bold;'><td width='150px'>Name</td><td width='150px'>From Department</td><td width='150px'>To Department</td><td width='75px'>Sent At</td><td width='150px'>Sent By</td><td width='175px'>View</td></td></tr>"
|
||||
for(var/datum/fax/F in faxes)
|
||||
html += "<tr>"
|
||||
html += "<td>[F.name]</td>"
|
||||
html += "<td>[F.from_department]</td>"
|
||||
html += "<td>[F.to_department]</td>"
|
||||
html += "<td>[worldtime2text(F.sent_at)]</td>"
|
||||
if(F.sent_by)
|
||||
var/mob/living/S = F.sent_by
|
||||
html += "<td><A HREF='?_src_=holder;adminplayeropts=\ref[F.sent_by]'>[S.name]</A></td>"
|
||||
@@ -79,7 +82,7 @@ var/list/adminfaxes = list()
|
||||
html += "</table>"
|
||||
html += "</div>"
|
||||
|
||||
var/datum/browser/popup = new(user, "fax_panel", "Fax Panel", 900, 450)
|
||||
var/datum/browser/popup = new(user, "fax_panel", "Fax Panel", 950, 450)
|
||||
popup.set_content(html)
|
||||
popup.open()
|
||||
|
||||
@@ -190,6 +190,7 @@ var/list/alldepartments = list()
|
||||
F.origin = src
|
||||
F.message = copyitem
|
||||
F.sent_by = sender
|
||||
F.sent_at = world.time
|
||||
|
||||
visible_message("[src] beeps, \"Message transmitted successfully.\"")
|
||||
//sendcooldown = 600
|
||||
@@ -247,6 +248,7 @@ var/list/alldepartments = list()
|
||||
A.origin = src
|
||||
A.message = rcvdcopy
|
||||
A.sent_by = sender
|
||||
A.sent_at = world.time
|
||||
|
||||
//message badmins that a fax has arrived
|
||||
switch(destination)
|
||||
|
||||
Reference in New Issue
Block a user