List stuff (#2932)

changes:

Converted some list procs to macros (why the fuck was islist() a proc?!)
Removed some old sorting procs and replaced their few remaining calls with sortTim() calls.
This commit is contained in:
Lohikar
2017-07-03 04:03:14 -05:00
committed by skull132
parent 780d8805de
commit d0fcc77f31
7 changed files with 12 additions and 253 deletions
-3
View File
@@ -47,9 +47,6 @@ var/datum/admin_secrets/admin_secrets = new()
var/permissions = R_ADMIN
var/warn_before_use = 0
/datum/admin_secret_item/dd_SortValue()
return "[name]"
/datum/admin_secret_item/proc/name()
return name
+2 -2
View File
@@ -29,7 +29,7 @@
// /obj/machinery/message_server/proc/send_pda_message(var/recipient = "",var/sender = "",var/message = "")
var/obj/item/device/pda/P
var/list/viables = list()
for(var/obj/item/device/pda/check_pda in sortAtom(PDAs))
for(var/obj/item/device/pda/check_pda in PDAs)
if (!check_pda.owner||check_pda.toff||check_pda == src||check_pda.hidden)
continue
viables.Add(check_pda)
@@ -59,7 +59,7 @@
message = pick("Luxury watches for Blowout sale prices!",\
"Watches, Jewelry & Accessories, Bags & Wallets !",\
"Deposit 100$ and get 300$ totally free!",\
" 100K NT.|WOWGOLD õnly $89 <HOT>",\
" 100K NT.|WOWGOLD õnly $89 <HOT>",\
"We have been filed with a complaint from one of your customers in respect of their business relations with you.",\
"We kindly ask you to open the COMPLAINT REPORT (attached) to reply on this complaint..")
if(4)
@@ -189,7 +189,7 @@
src.ears = headset_to_add
usr << "You fit the headset onto [src]."
clearlist(available_channels)
LAZYCLEARLIST(available_channels)
for(var/ch in headset_to_add.channels)
switch(ch)
if("Engineering")
@@ -293,7 +293,7 @@
speak.Remove(pick(speak))
speak.Add(pick(speech_buffer))
clearlist(speech_buffer)
LAZYCLEARLIST(speech_buffer)
//-----SLEEPING
+1 -1
View File
@@ -21,7 +21,7 @@
player_laws = new()
init_subtypes(/datum/ai_laws, admin_laws)
admin_laws = dd_sortedObjectList(admin_laws)
sortTim(admin_laws, /proc/cmp_name_asc)
for(var/datum/ai_laws/laws in admin_laws)
if(laws.selectable)