Merge pull request #11195 from Twinmold93/tonerless_sending

Fixes Sending Faxes Using Toner
This commit is contained in:
Fox McCloud
2019-04-06 03:15:53 -04:00
committed by GitHub

View File

@@ -283,34 +283,25 @@ var/global/list/fax_blacklist = list()
use_power(200)
var/obj/item/rcvdcopy
if(istype(copyitem, /obj/item/paper))
rcvdcopy = copy(copyitem)
else if(istype(copyitem, /obj/item/photo))
rcvdcopy = photocopy(copyitem)
else if(istype(copyitem, /obj/item/paper_bundle))
rcvdcopy = bundlecopy(copyitem)
else
if(!(istype(copyitem, /obj/item/paper) || istype(copyitem, /obj/item/paper_bundle) || istype(copyitem, /obj/item/photo)))
visible_message("[src] beeps, \"Error transmitting message.\"")
return
rcvdcopy.loc = null //hopefully this shouldn't cause trouble
var/datum/fax/admin/A = new /datum/fax/admin()
A.name = rcvdcopy.name
A.name = copyitem.name
A.from_department = department
A.to_department = destination
A.origin = src
A.message = rcvdcopy
A.message = copyitem
A.sent_by = sender
A.sent_at = world.time
//message badmins that a fax has arrived
switch(destination)
if("Central Command")
message_admins(sender, "CENTCOM FAX", destination, rcvdcopy, "#006100")
message_admins(sender, "CENTCOM FAX", destination, copyitem, "#006100")
if("Syndicate")
message_admins(sender, "SYNDICATE FAX", destination, rcvdcopy, "#DC143C")
message_admins(sender, "SYNDICATE FAX", destination, copyitem, "#DC143C")
for(var/obj/machinery/photocopier/faxmachine/F in allfaxes)
if(F.department == destination)
F.receivefax(copyitem)