mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 12:13:06 +00:00
Optimizes restart
Cuts 7-8 seconds
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user