def addFeatures(): map = CyMap() iW = map.getGridWidth() iH = map.getGridHeight() for plotIndex in range(iW * iH): pPlot = map.plotByIndex(plotIndex) if pPlot.isPeak() and pPlot.isCoastalLand(): pPlot.setPlotType(PlotTypes.PLOT_HILLS, true, true) NiTextOut("Adding Features ...") featuregen = FeatureGenerator() featuregen.addFeatures() return 0
def addFeatures(): # MIRRORIZE LAKES gc = CyGlobalContext() map = CyMap() userInputPlots = map.getCustomMapOption(0) iW = map.getGridWidth() iH = map.getGridHeight() if userInputPlots == 0: # Reflection reflect_x = lambda x: iW - iX - 1 reflect_y = lambda y: iY elif userInputPlots == 1: # Inversion reflect_x = lambda x: iW - iX - 1 reflect_y = lambda y: iH - iY - 1 elif userInputPlots == 2: # Copy reflect_x = lambda x: iX + (iW / 2) reflect_y = lambda y: iY else: # userInputPlots == 3: Opposite reflect_x = lambda x: iX + (iW / 2) reflect_y = lambda y: iH - iY - 1 for iX in range(iW / 2): for iY in range(iH): pPlot = map.plot(iX, iY) rPlot = map.plot(reflect_x(iX), reflect_y(iY)) if pPlot.getPlotType() != rPlot.getPlotType(): pPlot.setPlotType(rPlot.getPlotType(), false, false) # If one of the oceanic landmass types, remove all peaks along the coasts. userInputLandmass = map.getCustomMapOption(2) global terrainRoll if userInputLandmass == 0 or ( userInputLandmass == 5 and terrainRoll < 4): # "Lakes" terrain, leave all peaks intact. pass else: # Oceanic option. for plotIndex in range(iW * iH): pPlot = map.plotByIndex(plotIndex) if pPlot.isPeak() and pPlot.isCoastalLand(): # If a peak is along the coast, change to hills and recalc. pPlot.setPlotType(PlotTypes.PLOT_HILLS, false, false) # Smooth any graphical glitches these changes may have produced. map.recalculateAreas() # Now add the features. NiTextOut("Adding Features (Python Mirror) ...") featuregen = FeatureGenerator() featuregen.addFeatures() return 0
def addFeatures(): # MIRRORIZE LAKES gc = CyGlobalContext() map = CyMap() userInputPlots = map.getCustomMapOption(0) iW = map.getGridWidth() iH = map.getGridHeight() if userInputPlots == 0: # Reflection reflect_x = lambda x: iW - iX - 1 reflect_y = lambda y: iY elif userInputPlots == 1: # Inversion reflect_x = lambda x: iW - iX - 1 reflect_y = lambda y: iH - iY - 1 elif userInputPlots == 2: # Copy reflect_x = lambda x: iX + (iW / 2) reflect_y = lambda y: iY else: # userInputPlots == 3: Opposite reflect_x = lambda x: iX + (iW / 2) reflect_y = lambda y: iH - iY - 1 for iX in range(iW / 2): for iY in range(iH): pPlot = map.plot(iX, iY) rPlot = map.plot(reflect_x(iX), reflect_y(iY)) if pPlot.getPlotType() != rPlot.getPlotType(): pPlot.setPlotType(rPlot.getPlotType(), false, false) # If one of the oceanic landmass types, remove all peaks along the coasts. userInputLandmass = map.getCustomMapOption(2) global terrainRoll if userInputLandmass == 0 or (userInputLandmass == 5 and terrainRoll < 4): # "Lakes" terrain, leave all peaks intact. pass else: # Oceanic option. for plotIndex in range(iW * iH): pPlot = map.plotByIndex(plotIndex) if pPlot.isPeak() and pPlot.isCoastalLand(): # If a peak is along the coast, change to hills and recalc. pPlot.setPlotType(PlotTypes.PLOT_HILLS, false, false) # Smooth any graphical glitches these changes may have produced. map.recalculateAreas() # Now add the features. NiTextOut("Adding Features (Python Mirror) ...") featuregen = FeatureGenerator() featuregen.addFeatures() return 0
def addFeatures(): # Remove all peaks along the coasts, before adding Features, Bonuses, Goodies, etc. map = CyMap() iW = map.getGridWidth() iH = map.getGridHeight() for plotIndex in range(iW * iH): pPlot = map.plotByIndex(plotIndex) if pPlot.isPeak() and pPlot.isCoastalLand(): # If a peak is along the coast, change to hills and recalc. pPlot.setPlotType(PlotTypes.PLOT_HILLS, true, true) # Now add Features. NiTextOut("Adding Features (Python Global Highlands) ...") featuregen = FeatureGenerator() featuregen.addFeatures() return 0
def addFeatures(): # Remove all peaks along the coasts, before adding Features, Bonuses, Goodies, etc. map = CyMap() iW = map.getGridWidth() iH = map.getGridHeight() for plotIndex in range(iW * iH): pPlot = map.plotByIndex(plotIndex) if pPlot.isPeak() and pPlot.isCoastalLand(): # If a peak is along the coast, change to hills and recalc. pPlot.setPlotType(PlotTypes.PLOT_HILLS, true, true) # Now add the features. NiTextOut("Adding Features (Python Maze) ...") featuregen = FeatureGenerator() featuregen.addFeatures() return 0
def addFeatures(): NiTextOut("Adding Features (Python Terra) ...") featuregen = FeatureGenerator() featuregen.addFeatures() return 0
def addFeatures(): featuregen = FeatureGenerator() featuregen.addFeatures() return 0
def addFeatures(): NiTextOut("Adding Features (Python Custom Continents) ...") featuregen = FeatureGenerator() featuregen.addFeatures() return 0
def addFeatures(): NiTextOut("Adding Features (Python Japan) ...") featuregen = FeatureGenerator() featuregen.addFeatures() return 0
def addFeatures(): print "features" NiTextOut("Adding Features (Python Islands) ...") featuregen = FeatureGenerator() featuregen.addFeatures() return 0
def addFeatures(): FeatureGenerator().addFeatures() return 0