[MIRROR] Replaces a portion of C-style for loops with the more commonplace for loops, which are faster. [MDB IGNORE] (#9298)

* Replaces a portion of C-style for loops with the more commonplace for loops, which are faster.

* Update code/modules/projectiles/boxes_magazines/_box_magazine.dm

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: jjpark-kb <55967837+jjpark-kb@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-11-08 10:50:29 -05:00
committed by GitHub
co-authored by Ghom jjpark-kb
parent f44a214a2f
commit 98428cdfb5
49 changed files with 124 additions and 125 deletions
@@ -68,10 +68,10 @@
var/list/point_grid[conf_set_len*2+1][conf_set_len*2+1]
var/list/grid = list()
var/datum/space_transition_point/P
for(var/i = 1, i<=conf_set_len*2+1, i++)
for(var/j = 1, j<=conf_set_len*2+1, j++)
P = new/datum/space_transition_point(i,j, point_grid)
point_grid[i][j] = P
for(var/x in 1 to conf_set_len*2+1)
for(var/y in 1 to conf_set_len*2+1)
P = new/datum/space_transition_point(x, y, point_grid)
point_grid[x][y] = P
grid.Add(P)
for(var/datum/space_transition_point/pnt in grid)
pnt.set_neigbours(point_grid)
@@ -125,7 +125,7 @@
S.destination_x = x_pos_transition[side] == 1 ? S.x : x_pos_transition[side]
S.destination_y = y_pos_transition[side] == 1 ? S.y : y_pos_transition[side]
S.destination_z = zdestination
// Mirage border code
var/mirage_dir
if(S.x == 1 + TRANSITIONEDGE)