Rewrote request console code to use a proc when generating a message on a target console

Redemption machine now sends a message to chemistry, too.
This commit is contained in:
scoopscoop
2014-08-12 13:56:02 +03:00
parent 9d47d2c98e
commit b14535344b
2 changed files with 50 additions and 82 deletions
+2 -2
View File
@@ -36,8 +36,8 @@
stack_list[processed_sheet] = s
if(s.name != "glass" && s.name != "metal") //we can get these from cargo anyway
var/msg = "[capitalize(s.name)] sheets are now available in the Cargo Bay."
for(var/obj/machinery/requests_console/D in world) //this will only happen a few times per round
if(D.department == "Science" || D.department == "Robotics" || D.department == "Research Director's Desk")
for(var/obj/machinery/requests_console/D in allConsoles)
if(D.department == "Science" || D.department == "Robotics" || D.department == "Research Director's Desk" || (D.department == "Chemistry" && (s.name == "uranium" || s.name == "solid plasma")))
D.createmessage("Ore Redemption Machine", "New minerals available!", msg, 1, 0)
var/obj/item/stack/sheet/storage = stack_list[processed_sheet]
storage.amount += 1 //Stack the sheets