Speed up mapload significantly

Co-authored-by: Aronai Sieyes <arokha@arokha.com>
This commit is contained in:
ShadowLarkens
2020-03-19 00:28:27 -04:00
committed by Aronai Sieyes
parent 9250685a06
commit 2e23dcdb49
33 changed files with 199 additions and 238 deletions

View File

@@ -843,3 +843,18 @@ proc/dd_sortedTextList(list/incoming)
if(L.len)
. = L[1]
L.Cut(1,2)
//generates a list used to randomize transit animations so they aren't in lockstep
/proc/get_cross_shift_list(var/size)
var/list/result = list()
result += rand(0, 14)
for(var/i in 2 to size)
var/shifts = list(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
shifts -= result[i - 1] //consecutive shifts should not be equal
if(i == size)
shifts -= result[1] //because shift list is a ring buffer
result += pick(shifts)
return result