Optimizes restart

Cuts 7-8 seconds
This commit is contained in:
Kelenius
2016-03-16 14:49:37 +03:00
parent f5aaefbeec
commit 1afd4af7bb
2 changed files with 4 additions and 8 deletions

View File

@@ -48,9 +48,7 @@ proc/listgetindex(var/list/list,index)
return return
proc/islist(list/list) proc/islist(list/list)
if(istype(list)) return(istype(list))
return 1
return 0
//Return either pick(list) or null if list is not of type /list or is empty //Return either pick(list) or null if list is not of type /list or is empty
proc/safepick(list/list) proc/safepick(list/list)

View File

@@ -68,13 +68,11 @@ var/global/list/map_count = list()
if(!do_not_announce) admin_notice("<span class='danger'>[capitalize(name)] failed to generate ([round(0.1*(world.timeofday-start_time),0.1)] seconds): could not produce sane map.</span>", R_DEBUG) if(!do_not_announce) admin_notice("<span class='danger'>[capitalize(name)] failed to generate ([round(0.1*(world.timeofday-start_time),0.1)] seconds): could not produce sane map.</span>", R_DEBUG)
/datum/random_map/proc/get_map_cell(var/x,var/y) /datum/random_map/proc/get_map_cell(var/x,var/y)
if(!islist(map)) if(!map)
set_map_size() set_map_size()
var/cell = ((y-1)*limit_x)+x . = ((y-1)*limit_x)+x
if((cell < 1) || (cell > map.len)) if((. < 1) || (. > map.len))
return null return null
else
return cell
/datum/random_map/proc/get_map_char(var/value) /datum/random_map/proc/get_map_char(var/value)
switch(value) switch(value)