mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Minor zone/proc/Rebuild() optimization
This commit is contained in:
@@ -229,11 +229,10 @@ zone/proc/Rebuild()
|
|||||||
if(!contents.len)
|
if(!contents.len)
|
||||||
del src
|
del src
|
||||||
|
|
||||||
var/list/tried_turfs = list()
|
var/list/turfs_to_consider = contents.Copy()
|
||||||
do
|
do
|
||||||
if(sample)
|
if(sample)
|
||||||
tried_turfs |= sample
|
turfs_to_consider -= sample
|
||||||
var/list/turfs_to_consider = contents - tried_turfs
|
|
||||||
if(!turfs_to_consider.len)
|
if(!turfs_to_consider.len)
|
||||||
break
|
break
|
||||||
sample = pick(turfs_to_consider) //Nor this.
|
sample = pick(turfs_to_consider) //Nor this.
|
||||||
@@ -260,8 +259,6 @@ zone/proc/Rebuild()
|
|||||||
T.zone = null
|
T.zone = null
|
||||||
problem = 1
|
problem = 1
|
||||||
|
|
||||||
for(var/turf/T in new_contents)
|
|
||||||
|
|
||||||
if(problem)
|
if(problem)
|
||||||
//Build some new zones for stuff that wasn't included.
|
//Build some new zones for stuff that wasn't included.
|
||||||
var/list/turf/simulated/rebuild_turfs = contents - new_contents
|
var/list/turf/simulated/rebuild_turfs = contents - new_contents
|
||||||
|
|||||||
Reference in New Issue
Block a user