mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 20:17:15 +01:00
Merge remote-tracking branch 'upstream/master' into dev-freeze
Conflicts: code/game/objects/items/weapons/storage/boxes.dm code/game/objects/items/weapons/storage/storage.dm
This commit is contained in:
+11
-5
@@ -71,11 +71,17 @@ proc/isemptylist(list/list)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//Empties the list by setting the length to 0. Hopefully the elements get garbage collected
|
||||
proc/clearlist(list/list)
|
||||
if(istype(list))
|
||||
list.len = 0
|
||||
return
|
||||
/proc/instances_of_type_in_list(var/atom/A, var/list/L)
|
||||
var/instances = 0
|
||||
for(var/type in L)
|
||||
if(istype(A, type))
|
||||
instances++
|
||||
return instances
|
||||
|
||||
//Empties the list by .Cut(). Setting lenght = 0 has been confirmed to leak references.
|
||||
proc/clearlist(var/list/L)
|
||||
if(islist(L))
|
||||
L.Cut()
|
||||
|
||||
//Removes any null entries from the list
|
||||
proc/listclearnulls(list/list)
|
||||
|
||||
Reference in New Issue
Block a user