Merge pull request #9649 from SamHPurp/get_area-speed

Speeds up get_area
This commit is contained in:
variableundefined
2018-10-01 08:28:56 +08:00
committed by GitHub
+4 -4
View File
@@ -8,10 +8,10 @@
return null
/proc/get_area(atom/A)
if(!istype(A))
return
for(A, A && !isarea(A), A=A.loc); //semicolon is for the empty statement
return A
if(isarea(A))
return A
var/turf/T = get_turf(A)
return T ? T.loc : null
/proc/get_area_name(N) //get area by its name
for(var/area/A in world)