View Full Version : Empty Mapscript


Vadus
Mar 07, 2009, 08:01 AM
Hi all,

is there a mapscript somewhere, which what empty (ocean) maps are generated ? I'm trying currently with a custom map script, but I can not get it to work. What I'm doing is just this:

in my custom map script, what is a copy of Pangaea.py, I've overwritten the generatePlotTypes() function:


def generatePlotTypes():
gc = CyGlobalContext()
map = gc.getMap()
mapgen = CyMapGenerator()

plotTypes = [PlotTypes.PLOT_OCEAN] * (map.getGridWidth()*map.getGridHeight())
mapgen.setPlotTypes(plotTypes)
return plotTypes


is there already something like this anywhere?

Vadus
Mar 07, 2009, 11:59 AM
ah, everything is cool for now ! I just had to change to LAND plots:


def generatePlotTypes():
global pangaea_type
gc = CyGlobalContext()
map = gc.getMap()
mapgen = CyMapGenerator()

plotTypes = [PlotTypes.PLOT_LAND] * (map.getGridWidth()*map.getGridHeight())
mapgen.setPlotTypes(plotTypes)
return plotTypes