proc/GeneratePlots()
var
cur_y = plot_SeperationDistance
cur_x = plot_SeperationDistance
for(var/i = 1, i <= world.maxz, ++i)
for(var/rows = 0, rows < plot_Rows, ++rows)
for(var/columns = 0, columns < plot_Columns, ++columns)
CreateEmptyBoxFromBottomLeft(/obj/Utility/PlotBounds, plot_Size, cur_x, cur_y, i)
CreateFilledBoxFromBottomLeft(/obj/Grounds/Grass/Green, plot_Size+2, cur_x+1, cur_y+1, i)
cur_x = (columns == plot_Columns-1) ? (plot_SeperationDistance) : (cur_x + plot_Size + plot_SeperationDistance)
cur_y = (columns == plot_Columns-1) ? (cur_y + plot_Size + plot_SeperationDistance) : (cur_y)
proc/CreateFilledBoxFromBottomLeft(var/obj/Object, size, x, y, z)
for(var/X=x, X <= size, ++X)
for(var/Y=y, Y <= size, ++Y)
new Object(locate(X, Y, z))
Problem description:
For some reason, it'll create the first box, however, it doesn't create any of the other boxes (1/25). The PlotBounds all create properly (the sidewalks in the picture), along with the roads I have. I'm not sure what the issue is, everything looks like it should work properly.
In the picture: generated roads and sidewalks. The green is the box that is supposed to be created in the middle of them all. The brown texture is the dirt texture that is under the grass. In other words, if it's not green, the box wasn't generated.
Brown = no box
Green = box
Also to note, there's no tiles under the generated grass box.
EDIT:
"CreateFilledBoxFromBottomLeft was called 125 times."
The function is being called the proper amount of times (5 columns, 5 rows, and 5 planes). Not sure why nothing is being created at this point though.