Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Admin fax panel can send faxes again #27285

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 24 additions & 14 deletions code/modules/admin/topic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2336,6 +2336,15 @@
P.stamp_overlays += stampoverlay
P.stamps += "<hr><img src='large_stamp-[stampvalue].png'>"
P.update_icon()

var/datum/fax/admin/sending = new /datum/fax/admin()
sending.name = P.name
sending.to_department = fax.department
sending.origin = "Administrator"
sending.message = P
sending.sent_by = usr
sending.sent_at = world.time

fax.receivefax(P)
if(istype(H) && H.stat == CONSCIOUS && (istype(H.l_ear, /obj/item/radio/headset) || istype(H.r_ear, /obj/item/radio/headset)))
to_chat(H, "<span class='specialnotice bold'>Your headset pings, notifying you that a reply to your fax has arrived.</span>")
Expand Down Expand Up @@ -2555,29 +2564,30 @@
P.stamp_overlays += stampoverlay
P.stamps += "<hr><i>[stampvalue]</i>"

var/datum/fax/admin/sending = new /datum/fax/admin()
sending.name = P.name
sending.from_department = faxtype
if(destination != "All Departments")
if(!fax.receivefax(P))
sending.to_department = fax.department
else
sending.to_department = "All Departments"
sending.origin = "Administrator"
sending.message = P
sending.reply_to = reply_to
sending.sent_by = usr
sending.sent_at = world.time

if(destination != "All Departments")
if(!fax.receivefax(sending))
to_chat(src.owner, "<span class='warning'>Message transmission failed.</span>")
return
else
for(var/obj/machinery/photocopier/faxmachine/F in GLOB.allfaxes)
if(is_station_level(F.z))
spawn(0)
if(!F.receivefax(P))
if(!F.receivefax(sending))
to_chat(src.owner, "<span class='warning'>Message transmission to [F.department] failed.</span>")

var/datum/fax/admin/A = new /datum/fax/admin()
A.name = P.name
A.from_department = faxtype
if(destination != "All Departments")
A.to_department = fax.department
else
A.to_department = "All Departments"
A.origin = "Administrator"
A.message = P
A.reply_to = reply_to
A.sent_by = usr
A.sent_at = world.time

to_chat(src.owner, "<span class='notice'>Message transmitted successfully.</span>")
if(notify == "Yes")
Expand Down