@@ -74,33 +74,33 @@ Actual Adjacent procs :
7474 return b. f - a. f
7575
7676// wrapper that returns an empty list if A* failed to find a path
77- / proc / get_path_to(caller , end, dist, maxnodes, maxnodedepth = 30 , mintargetdist, adjacent = / turf / proc / reachableTurftest, id= null , turf / exclude= null , simulated_only = TRUE , get_best_attempt = FALSE )
78- var /l = SSpathfinder. mobs. getfree(caller )
77+ / proc / get_path_to(caller_but_not_a_byond_built_in_proc , end, dist, maxnodes, maxnodedepth = 30 , mintargetdist, adjacent = / turf / proc / reachableTurftest, id= null , turf / exclude= null , simulated_only = TRUE , get_best_attempt = FALSE )
78+ var /l = SSpathfinder. mobs. getfree(caller_but_not_a_byond_built_in_proc )
7979 while (! l)
8080 stoplag (3 )
81- l = SSpathfinder. mobs. getfree(caller )
82- var /list /path = AStar(caller , end, dist, maxnodes, maxnodedepth, mintargetdist, adjacent,id, exclude, simulated_only, get_best_attempt)
81+ l = SSpathfinder. mobs. getfree(caller_but_not_a_byond_built_in_proc )
82+ var /list /path = AStar(caller_but_not_a_byond_built_in_proc , end, dist, maxnodes, maxnodedepth, mintargetdist, adjacent,id, exclude, simulated_only, get_best_attempt)
8383 SSpathfinder. mobs. found(l)
8484 if (! path)
8585 path = list ()
8686 return path
8787
88- / proc / cir_get_path_to(caller , end, dist, maxnodes, maxnodedepth = 30 , mintargetdist, adjacent = / turf / proc / reachableTurftest, id= null , turf / exclude= null , simulated_only = TRUE )
89- var /l = SSpathfinder. circuits. getfree(caller )
88+ / proc / cir_get_path_to(caller_but_not_a_byond_built_in_proc , end, dist, maxnodes, maxnodedepth = 30 , mintargetdist, adjacent = / turf / proc / reachableTurftest, id= null , turf / exclude= null , simulated_only = TRUE )
89+ var /l = SSpathfinder. circuits. getfree(caller_but_not_a_byond_built_in_proc )
9090 while (! l)
9191 stoplag (3 )
92- l = SSpathfinder. circuits. getfree(caller )
93- var /list /path = AStar(caller , end, dist, maxnodes, maxnodedepth, mintargetdist, adjacent,id, exclude, simulated_only)
92+ l = SSpathfinder. circuits. getfree(caller_but_not_a_byond_built_in_proc )
93+ var /list /path = AStar(caller_but_not_a_byond_built_in_proc , end, dist, maxnodes, maxnodedepth, mintargetdist, adjacent,id, exclude, simulated_only)
9494 SSpathfinder. circuits. found(l)
9595 if (! path)
9696 path = list ()
9797 return path
9898
9999// / Pathfinding for bots
100- / proc / AStar(caller , _end, dist, maxnodes, maxnodedepth = 30 , mintargetdist, adjacent = / turf / proc / reachableTurftest, id= null , turf / exclude= null , simulated_only = TRUE , get_best_attempt = FALSE )
100+ / proc / AStar(caller_but_not_a_byond_built_in_proc , _end, dist, maxnodes, maxnodedepth = 30 , mintargetdist, adjacent = / turf / proc / reachableTurftest, id= null , turf / exclude= null , simulated_only = TRUE , get_best_attempt = FALSE )
101101 // sanitation
102102 var /turf /end = get_turf(_end)
103- var /turf /start = get_turf(caller )
103+ var /turf /start = get_turf(caller_but_not_a_byond_built_in_proc )
104104 if (! start || ! end)
105105 stack_trace (" Invalid A* start or destination" )
106106 return FALSE
@@ -150,12 +150,12 @@ Actual Adjacent procs :
150150 // is already in open list, check if it's a better way from the current turf
151151 CN . bf &= 15 ^ r // we have no closed, so just cut off exceed dir.00001111 ^ reverse_dir.We don't need to expand to checked turf.
152152 if ((newg < CN . g) )
153- if (call (cur. source,adjacent)(caller , T, id, simulated_only))
153+ if (call (cur. source,adjacent)(caller_but_not_a_byond_built_in_proc , T, id, simulated_only))
154154 CN . setp(cur,newg,CN . h,cur. nt+ 1 )
155155 open. ReSort(CN )// reorder the changed element in the list
156156 else
157157 // is not already in open list, so add it
158- if (call (cur. source,adjacent)(caller , T, id, simulated_only))
158+ if (call (cur. source,adjacent)(caller_but_not_a_byond_built_in_proc , T, id, simulated_only))
159159 CN = new (T,cur,newg,call (T,dist)(end),cur. nt+ 1 ,15 ^ r)
160160 open. Insert(CN )
161161 openc[T] = CN
@@ -179,8 +179,8 @@ Actual Adjacent procs :
179179// Returns adjacent turfs in cardinal directions that are reachable
180180// simulated_only controls whether only simulated turfs are considered or not
181181
182- // / Returns a list the src/caller can cross into
183- / turf / proc / reachableAdjacentTurfs(caller , ID , simulated_only)
182+ // / Returns a list the src/caller_but_not_a_byond_built_in_proc can cross into
183+ / turf / proc / reachableAdjacentTurfs(caller_but_not_a_byond_built_in_proc , ID , simulated_only)
184184 var /list /L = new ()
185185 var /turf /T
186186 var /static /space_type_cache = typecacheof(/ turf / open/ space)
@@ -189,20 +189,20 @@ Actual Adjacent procs :
189189 T = get_step(src ,GLOB . cardinals[k])
190190 if (! T || (simulated_only && space_type_cache[T. type]))
191191 continue
192- if (! T. density && ! LinkBlockedWithAccess(T,caller , ID ))
192+ if (! T. density && ! LinkBlockedWithAccess(T,caller_but_not_a_byond_built_in_proc , ID ))
193193 L. Add(T)
194194 return L
195195
196- / turf / proc / reachableTurftest(caller , turf / T, ID , simulated_only)
197- if (T && ! T. density && ! (simulated_only && SSpathfinder. space_type_cache[T. type]) && ! LinkBlockedWithAccess(T,caller , ID ))
196+ / turf / proc / reachableTurftest(caller_but_not_a_byond_built_in_proc , turf / T, ID , simulated_only)
197+ if (T && ! T. density && ! (simulated_only && SSpathfinder. space_type_cache[T. type]) && ! LinkBlockedWithAccess(T,caller_but_not_a_byond_built_in_proc , ID ))
198198 return TRUE
199199
200200// / Returns adjacent turfs in cardinal directions that are reachable via atmos
201201/ turf / proc / reachableAdjacentAtmosTurfs()
202202 return atmos_adjacent_turfs
203203
204204// / Check if there is a door that needs access in its way
205- / turf / proc / LinkBlockedWithAccess( turf / T, caller , ID )
205+ / turf / proc / LinkBlockedWithAccess( turf / T, caller_but_not_a_byond_built_in_proc , ID )
206206 var /adir = get_dir(src , T)
207207 var /rdir = ((adir & MASK_ODD )<< 1 )| ((adir & MASK_EVEN )>> 1 )
208208 for (var /obj /structure/window/W in src )
@@ -212,29 +212,29 @@ Actual Adjacent procs :
212212 if (! W. CanAStarPass(ID , adir))
213213 return TRUE
214214 for (var /obj /machinery/M in src )
215- if (! M. CanAStarPass(ID , adir, caller ))
215+ if (! M. CanAStarPass(ID , adir, caller_but_not_a_byond_built_in_proc ))
216216 return TRUE
217217 for (var /obj /machinery/door/firedoor/border_only/W in src )
218- if (! W. CanAStarPass(ID , adir, caller ))
218+ if (! W. CanAStarPass(ID , adir, caller_but_not_a_byond_built_in_proc ))
219219 return TRUE
220220 for (var /obj /O in T)
221- if (! O. CanAStarPass(ID , rdir, caller ))
221+ if (! O. CanAStarPass(ID , rdir, caller_but_not_a_byond_built_in_proc ))
222222 return TRUE
223223
224224 return FALSE
225225
226226// yog procs
227- / turf / proc / reachableTurftestPlayer(caller , turf / T, ID , simulated_only)
228- if (T && ! T. density && ! LinkBlockedWithAccess(T, caller , ID ) && ! (simulated_only && SSpathfinder. space_type_cache[T. type]))
227+ / turf / proc / reachableTurftestPlayer(caller_but_not_a_byond_built_in_proc , turf / T, ID , simulated_only)
228+ if (T && ! T. density && ! LinkBlockedWithAccess(T, caller_but_not_a_byond_built_in_proc , ID ) && ! (simulated_only && SSpathfinder. space_type_cache[T. type]))
229229 return TRUE
230230
231- / turf / proc / reachableTurftestdensity(caller , turf / T, ID , simulated_only) // used for the sake of pathfinding while excluding turfs with dense objects
232- if (T && ! T. density && ! (simulated_only && SSpathfinder. space_type_cache[T. type]) && ! LinkBlockedWithAccess(T,caller , ID ))
231+ / turf / proc / reachableTurftestdensity(caller_but_not_a_byond_built_in_proc , turf / T, ID , simulated_only) // used for the sake of pathfinding while excluding turfs with dense objects
232+ if (T && ! T. density && ! (simulated_only && SSpathfinder. space_type_cache[T. type]) && ! LinkBlockedWithAccess(T,caller_but_not_a_byond_built_in_proc , ID ))
233233 for (var /obj /D in T)
234234 if (! istype(D, / obj / structure/ window) && D. density) // had to do it silly like this so rwindows didn't stop it outright
235235 return FALSE
236236 return TRUE
237237
238- / turf / proc / wiringTurfTest(caller , turf / T, ID , simulated_only)
238+ / turf / proc / wiringTurfTest(caller_but_not_a_byond_built_in_proc , turf / T, ID , simulated_only)
239239 if (T && ! T. density && ! istype(T. loc, / area / space))
240240 return TRUE
0 commit comments