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

View File

@@ -19,8 +19,6 @@ var/global/list/side_effects = list() //list of all medical sideeffects types
var/global/list/mechas_list = list() //list of all mechs. Used by hostile mobs target tracking.
var/global/list/joblist = list() //list of all jobstypes, minus borg and AI
var/global/list/turfs = list() //list of all turfs
#define all_genders_define_list list(MALE,FEMALE,PLURAL,NEUTER,HERM) //VOREStaton Edit
#define all_genders_text_list list("Male","Female","Plural","Neuter","Herm") //VOREStation Edit