I'm making a little modcomp for BAT, and I ran into some confusion. I'm writing some Python routines to return plot lists and randomly selected plots based on feature or terrain type, etc.
The problem that I'm having is that I can't figure out what CyArea actually refers to, or what any of its' functions return (as in the object Area.) Would I be right in assuming that calling some of the CyArea functions returns things like the city radius?
As a simple example (From the Python API):
To get the number of tiles in an area, I use this function:
And using this function gets an object of type CyArea:
So if I just write something like (ignore the bad syntax here, it's just an example):
In the badly constructed code example above, I'm getting the number of tiles in the Area object that I am specifying with AreaID. But what does the actual Area object refer to?
I am one confused Lemon.
The problem that I'm having is that I can't figure out what CyArea actually refers to, or what any of its' functions return (as in the object Area.) Would I be right in assuming that calling some of the CyArea functions returns things like the city radius?
As a simple example (From the Python API):
To get the number of tiles in an area, I use this function:
Code:
[COLOR=Red]INT[/COLOR] getNumTiles ()
int () - Returns the number of tiles in this area
Code:
[COLOR=DarkGreen]CyArea[/COLOR] getArea (INT iID)
CyArea (iID) - get CyArea at iID
Code:
iMyTileCount = gc.getArea(AreaID).getNumTiles()
I am one confused Lemon.