How do you get the int domain type of a pPlot?

Jeckel

Great Reverend
Joined
Nov 16, 2005
Messages
1,637
Location
Peoria, IL
Can this be done? I've looked and searched through the API and can't seem to find a method that gives you the domain type of a plot object.

I am wanting to do something like

Code:
iPlotDomain = pPlot.?
iLandDomain = gc.getInfoTypeForString("DOMAIN_LAND")

if (iPlotDomain == iLandDomain):
          return True

Anybody got any ideas?
 
if domain LAND <-> no water ,no peak plot : you may simply test that :

Code:
if not ( plot.isWater() or plot.isPeak() ) :return True

Edit :LOL
 
Jeckel said:
Can this be done? I've looked and searched through the API and can't seem to find a method that gives you the domain type of a plot object.

I am wanting to do something like

Code:
iPlotDomain = pPlot.?
iLandDomain = gc.getInfoTypeForString("DOMAIN_LAND")

if (iPlotDomain == iLandDomain):
          return True

Anybody got any ideas?

I think you're looking for getPlotType(). You can then compare the value with PlotTypes.PLOT_LAND without having to do the getInfoTypeForString (especially since DOMAIN_LAND has to do with units and how they act / where they can go. Although this often has to do with the type of plot, plot's don't store anything relating to domains).

Edit: Of course, if it's a hill or peak, you might still consider it "land" but it's not technically a "land" type, so you're better off going with what was stated above (all in the last three minutes, coincidentally) and check for not water.
 
Ahh, thankyou all!

isWater.. dur, I searched isSea, but didn't think to use the word water. :p


And thanx for the info on getPlotType(), I wasn't sure exactly what it returned, that is good to know. :)

Thanks to all three of you again. :thanx:
 
Back
Top Bottom