orlanth
Storm God. Yarr!
- Joined
- Nov 17, 2001
- Messages
- 1,805
Hmm.. thanks TC01; like you said, it seems like it should be a simple matter to add a line to generatePlotTypes that stores a latitude value for that XY map coordinate into a 2D global array whenever it places a land plot.
Then you'd just change the getLatitudeAtPlot function to one line that gets the value for that XY map coordinate from your array, and you'd be done, & wouldn't need to mess with the terrain or feature generator since they take their latitude values from there.
It *seems* like it should be that simple, but after searching I can't seem how to find how to use a 2D global array in python, which seems weird to me.
Do you know if it's possible to use such an array; or alternately maybe a global hash structure that directly associates each plot object with a value for latitude? (sorry, as you can probably tell I've got barely any programming experience, and that was years ago
)
PHP:
if fDistance > iRadius:
self.plotTypes[i] = PlotTypes.PLOT_OCEAN
else:
global latitudes[x][y] = (y - iCenterY) / iRadius
It *seems* like it should be that simple, but after searching I can't seem how to find how to use a 2D global array in python, which seems weird to me.

