mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-15 00:53:23 +01:00
Merge pull request #9649 from SamHPurp/get_area-speed
Speeds up get_area
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user