Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit fd7cf48

Browse files
committed
Roll it all into one for loop
1 parent 360ae58 commit fd7cf48

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

code/modules/paperwork/faxmachine.dm

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -172,19 +172,11 @@ GLOBAL_LIST_EMPTY(adminfaxes)
172172
F.recievefax(rcvdcopy)
173173

174174
//message badmins that a fax has arrived
175-
switch(destination)
176-
if ("Central Command")
177-
for(var/client/C in GLOB.permissions.admins) //linked to prayers cause we are running out of legacy toggles
178-
if(C.prefs.chat_toggles & CHAT_PRAYER_N_FAX) //if to be moved elsewhere then we must declutter legacy toggles
179-
if(C.prefs.toggles & SOUND_PRAYER_N_FAX)//if done then delete these comments
180-
SEND_SOUND(sender, sound('sound/effects/admin_fax.ogg'))
181-
send_adminmessage(sender, "CENTCOM FAX", rcvdcopy, "AdminFaxReply", "#006100")
182-
if ("Syndicate")
183-
for(var/client/C in GLOB.permissions.admins)
184-
if(C.prefs.chat_toggles & CHAT_PRAYER_N_FAX)
185-
if(C.prefs.toggles & SOUND_PRAYER_N_FAX)
186-
SEND_SOUND(sender, sound('sound/effects/admin_fax.ogg'))
187-
send_adminmessage(sender, "SYNDICATE FAX", rcvdcopy, "AdminFaxReply", "crimson") //Same colour used in redphone
175+
for(var/client/C in GLOB.permissions.admins) //linked to prayers cause we are running out of legacy toggles
176+
if(C.prefs.chat_toggles & CHAT_PRAYER_N_FAX) //if to be moved elsewhere then we must declutter legacy toggles
177+
if(C.prefs.toggles & SOUND_PRAYER_N_FAX)//if done then delete these comments
178+
SEND_SOUND(sender, sound('sound/effects/admin_fax.ogg'))
179+
send_adminmessage(sender, destination == "Syndicate" ? "SYNDICATE FAX" : "CENTCOM FAX", rcvdcopy, "AdminFaxReply", destination == "Syndicate" ? "crimson" : "#006100")
188180
sendcooldown = world.time + 1 MINUTES
189181
sleep(5 SECONDS)
190182
visible_message("[src] beeps, \"Message transmitted successfully.\"")

0 commit comments

Comments
 (0)