This should fix the conflict

This commit is contained in:
Mark van Alphen
2015-08-04 00:03:14 +02:00
parent 138212e434
commit 43ec3266c8
+16 -11
View File
@@ -31,7 +31,7 @@
return "[output][and_text][input[index]]"
//Returns list element or null. Should prevent "index out of bounds" error.
proc/listgetindex(var/list/list,index)
/proc/listgetindex(var/list/list,index)
if(istype(list) && list.len)
if(isnum(index))
if(InRange(index,1,list.len))
@@ -40,19 +40,19 @@ proc/listgetindex(var/list/list,index)
return list[index]
return
proc/islist(list/list)
/proc/islist(list/list)
if(istype(list))
return 1
return 0
//Return either pick(list) or null if list is not of type /list or is empty
proc/safepick(list/list)
/proc/safepick(list/list)
if(!islist(list) || !list.len)
return
return pick(list)
//Checks if the list is empty
proc/isemptylist(list/list)
/proc/isemptylist(list/list)
if(!list.len)
return 1
return 0
@@ -65,13 +65,13 @@ proc/isemptylist(list/list)
return 0
//Empties the list by setting the length to 0. Hopefully the elements get garbage collected
proc/clearlist(list/list)
/proc/clearlist(list/list)
if(istype(list))
list.len = 0
return
//Removes any null entries from the list
proc/listclearnulls(list/list)
/proc/listclearnulls(list/list)
if(istype(list))
while(null in list)
list -= null
@@ -504,7 +504,7 @@ proc/dd_sortedObjectList(list/incoming)
return sorted_list
*/
proc/dd_sortedtextlist(list/incoming, case_sensitive = 0)
/proc/dd_sortedtextlist(list/incoming, case_sensitive = 0)
// Returns a new list with the text values sorted.
// Use binary search to order by sortValue.
// This works by going to the half-point of the list, seeing if the node in question is higher or lower cost,
@@ -563,12 +563,16 @@ proc/dd_sortedtextlist(list/incoming, case_sensitive = 0)
return sorted_text
proc/dd_sortedTextList(list/incoming)
/proc/dd_sortedTextList(list/incoming)
var/case_sensitive = 1
return dd_sortedtextlist(incoming, case_sensitive)
/proc/subtypesof(var/path) //Returns a list containing all subtypes of the given path, but not the given path itself.
if(!path || !ispath(path))
CRASH("Invalid path, failed to fetch subtypes of \"[path]\".")
return (typesof(path) - path)
datum/proc/dd_SortValue()
/datum/proc/dd_SortValue()
return "[src]"
/obj/machinery/dd_SortValue()
@@ -576,6 +580,7 @@ datum/proc/dd_SortValue()
/obj/machinery/camera/dd_SortValue()
return "[c_tag]"
/datum/alarm/dd_SortValue()
return "[sanitize(last_name)]"
return "[sanitize(last_name)]"