Adds helpers to avoid << use

This commit is contained in:
CitadelStationBot
2017-08-08 22:28:16 -05:00
parent 41f42aabca
commit cc7ad81f79
85 changed files with 241 additions and 217 deletions
+14 -14
View File
@@ -109,14 +109,14 @@ GLOBAL_PROTECT(Banlist)
else
GLOB.Banlist.dir.Add("[ckey][computerid]")
GLOB.Banlist.cd = "/base/[ckey][computerid]"
GLOB.Banlist["key"] << ckey
GLOB.Banlist["id"] << computerid
GLOB.Banlist["ip"] << address
GLOB.Banlist["reason"] << reason
GLOB.Banlist["bannedby"] << bannedby
GLOB.Banlist["temp"] << temp
WRITE_FILE(GLOB.Banlist["key"], ckey)
WRITE_FILE(GLOB.Banlist["id"], computerid)
WRITE_FILE(GLOB.Banlist["ip"], address)
WRITE_FILE(GLOB.Banlist["reason"], reason)
WRITE_FILE(GLOB.Banlist["bannedby"], bannedby)
WRITE_FILE(GLOB.Banlist["temp"], temp)
if (temp)
GLOB.Banlist["minutes"] << bantimestamp
WRITE_FILE(GLOB.Banlist["minutes"], bantimestamp)
if(!temp)
create_message("note", ckey, bannedby, "Permanently banned - [reason]", null, null, 0, 0)
else
@@ -211,17 +211,17 @@ GLOBAL_PROTECT(Banlist)
GLOB.Banlist.cd = "/base"
GLOB.Banlist.dir.Add("trash[i]trashid[i]")
GLOB.Banlist.cd = "/base/trash[i]trashid[i]"
GLOB.Banlist["key"] << "trash[i]"
WRITE_FILE(GLOB.Banlist["key"], "trash[i]")
else
GLOB.Banlist.cd = "/base"
GLOB.Banlist.dir.Add("[last]trashid[i]")
GLOB.Banlist.cd = "/base/[last]trashid[i]"
GLOB.Banlist["key"] << last
GLOB.Banlist["id"] << "trashid[i]"
GLOB.Banlist["reason"] << "Trashban[i]."
GLOB.Banlist["temp"] << a
GLOB.Banlist["minutes"] << GLOB.CMinutes + rand(1,2000)
GLOB.Banlist["bannedby"] << "trashmin"
WRITE_FILE(GLOB.Banlist["key"], last)
WRITE_FILE(GLOB.Banlist["id"], "trashid[i]")
WRITE_FILE(GLOB.Banlist["reason"], "Trashban[i].")
WRITE_FILE(GLOB.Banlist["temp"], a)
WRITE_FILE(GLOB.Banlist["minutes"], GLOB.CMinutes + rand(1,2000))
WRITE_FILE(GLOB.Banlist["bannedby"], "trashmin")
last = "trash[i]"
GLOB.Banlist.cd = "/base"
+1 -1
View File
@@ -595,7 +595,7 @@
log_admin("[key_name(usr)] delayed the round start.")
else
to_chat(world, "<b>The game will start in [newtime] seconds.</b>")
world << 'sound/ai/attention.ogg'
SEND_SOUND(world, sound('sound/ai/attention.ogg'))
log_admin("[key_name(usr)] set the pre-game delay to [newtime] seconds.")
SSblackbox.add_details("admin_verb","Delay Game Start") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -0,0 +1,10 @@
diff a/code/modules/admin/admin_investigate.dm b/code/modules/admin/admin_investigate.dm (rejected hunks)
@@ -2,7 +2,7 @@
if(!message || !subject)
return
var/F = file("[GLOB.log_directory]/[subject].html")
- F << "<small>[time_stamp()] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
+ WRITE_FILE(F, "<small>[time_stamp()] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>")
/client/proc/investigate_show(subject in list("hrefs","notes, memos, watchlist", INVESTIGATE_PORTAL, INVESTIGATE_SINGULO, INVESTIGATE_WIRES, INVESTIGATE_TELESCI, INVESTIGATE_GRAVITY, INVESTIGATE_RECORDS, INVESTIGATE_CARGO, INVESTIGATE_SUPERMATTER, INVESTIGATE_ATMOS, INVESTIGATE_EXPERIMENTOR, INVESTIGATE_BOTANY, INVESTIGATE_HALLUCINATIONS) )
+2 -2
View File
@@ -142,7 +142,7 @@ GLOBAL_PROTECT(admin_ranks)
else
if(!SSdbcore.Connect())
log_world("Failed to connect to database in load_admin_ranks(). Reverting to legacy system.")
GLOB.world_game_log << "Failed to connect to database in load_admin_ranks(). Reverting to legacy system."
WRITE_FILE(GLOB.world_game_log, "Failed to connect to database in load_admin_ranks(). Reverting to legacy system.")
config.admin_legacy_system = 1
load_admin_ranks()
return
@@ -220,7 +220,7 @@ GLOBAL_PROTECT(admin_ranks)
else
if(!SSdbcore.Connect())
log_world("Failed to connect to database in load_admins(). Reverting to legacy system.")
GLOB.world_game_log << "Failed to connect to database in load_admins(). Reverting to legacy system."
WRITE_FILE(GLOB.world_game_log, "Failed to connect to database in load_admins(). Reverting to legacy system.")
config.admin_legacy_system = 1
load_admins()
return
+1 -1
View File
@@ -390,7 +390,7 @@
SSblackbox.add_details("admin_secrets_fun_used","Chinese Cartoons")
message_admins("[key_name_admin(usr)] made everything kawaii.")
for(var/mob/living/carbon/human/H in GLOB.mob_list)
H << sound('sound/ai/animes.ogg')
SEND_SOUND(H, sound('sound/ai/animes.ogg'))
if(H.dna.species.id == "human")
if(H.dna.features["tail_human"] == "None" || H.dna.features["ears"] == "None")
+5 -5
View File
@@ -506,10 +506,10 @@
ban_unban_log_save("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]</span>")
GLOB.Banlist.cd = "/base/[banfolder]"
GLOB.Banlist["reason"] << reason
GLOB.Banlist["temp"] << temp
GLOB.Banlist["minutes"] << minutes
GLOB.Banlist["bannedby"] << usr.ckey
WRITE_FILE(GLOB.Banlist["reason"], reason)
WRITE_FILE(GLOB.Banlist["temp"], temp)
WRITE_FILE(GLOB.Banlist["minutes"], minutes)
WRITE_FILE(GLOB.Banlist["bannedby"], usr.ckey)
GLOB.Banlist.cd = "/base"
SSblackbox.inc("ban_edit",1)
unbanpanel()
@@ -1697,7 +1697,7 @@
message_admins("[key_name(H)] got their cookie, spawned by [key_name(src.owner)].")
SSblackbox.inc("admin_cookies_spawned",1)
to_chat(H, "<span class='adminnotice'>Your prayers have been answered!! You received the <b>best cookie</b>!</span>")
H << 'sound/effects/pray_chaplain.ogg'
SEND_SOUND(H, sound('sound/effects/pray_chaplain.ogg'))
else if(href_list["adminsmite"])
if(!check_rights(R_ADMIN|R_FUN))
+1 -1
View File
@@ -28,7 +28,7 @@
if(text)
var/F = file("broken_icons.txt")
fdel(F)
F << text
WRITE_FILE(F, text)
to_chat(world, "Completely successfully and written to [F]")
+2 -2
View File
@@ -258,7 +258,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
for(var/client/X in GLOB.admins)
if(X.prefs.toggles & SOUND_ADMINHELP)
X << 'sound/effects/adminhelp.ogg'
SEND_SOUND(X, sound('sound/effects/adminhelp.ogg'))
window_flash(X, ignorepref = TRUE)
to_chat(X, chat_msg)
@@ -346,7 +346,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
if(initiator)
initiator.giveadminhelpverb()
initiator << 'sound/effects/adminhelp.ogg'
SEND_SOUND(initiator, sound('sound/effects/adminhelp.ogg'))
to_chat(initiator, "<font color='red' size='4'><b>- AdminHelp Rejected! -</b></font>")
to_chat(initiator, "<font color='red'><b>Your admin help was rejected.</b> The adminhelp verb has been returned to you so that you may try again.</font>")
+3 -3
View File
@@ -167,7 +167,7 @@
//play the recieving admin the adminhelp sound (if they have them enabled)
if(recipient.prefs.toggles & SOUND_ADMINHELP)
recipient << 'sound/effects/adminhelp.ogg'
SEND_SOUND(recipient, sound('sound/effects/adminhelp.ogg'))
else
if(holder) //sender is an admin but recipient is not. Do BIG RED TEXT
@@ -182,7 +182,7 @@
admin_ticket_log(recipient, "<font color='blue'>PM From [key_name_admin(src)]: [keywordparsedmsg]</font>")
//always play non-admin recipients the adminhelp sound
recipient << 'sound/effects/adminhelp.ogg'
SEND_SOUND(recipient, sound('sound/effects/adminhelp.ogg'))
//AdminPM popup for ApocStation and anybody else who wants to use it. Set it with POPUP_ADMIN_PM in config.txt ~Carn
if(config.popup_admin_pm)
@@ -301,7 +301,7 @@
window_flash(C, ignorepref = TRUE)
//always play non-admin recipients the adminhelp sound
C << 'sound/effects/adminhelp.ogg'
SEND_SOUND(C, 'sound/effects/adminhelp.ogg')
C.ircreplyamount = IRCREPLYCOUNT
+2 -2
View File
@@ -30,7 +30,7 @@
for(var/mob/M in GLOB.player_list)
if(M.client.prefs.toggles & SOUND_MIDI)
M << admin_sound
SEND_SOUND(M, admin_sound)
SSblackbox.add_details("admin_verb","Play Global Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -68,5 +68,5 @@
message_admins("[key_name_admin(src)] stopped all currently playing sounds.")
for(var/mob/M in GLOB.player_list)
if(M.client)
M << sound(null)
SEND_SOUND(M, sound(null))
SSblackbox.add_details("admin_verb","Stop All Playing Sounds") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+1 -1
View File
@@ -40,7 +40,7 @@
to_chat(C, msg)
if(C.prefs.toggles & SOUND_PRAYERS)
if(usr.job == "Chaplain")
C << 'sound/effects/pray.ogg'
SEND_SOUND(C, sound('sound/effects/pray.ogg'))
to_chat(usr, "Your prayers have been received by the gods.")
SSblackbox.add_details("admin_verb","Prayer") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!