def generatePlotTypes(): NiTextOut("Setting Plot Types (Python Balanced) ...") global hinted_world hinted_world = HintedWorld(16,8) mapRand = CyGlobalContext().getGame().getMapRand() numBlocks = hinted_world.w * hinted_world.h numBlocksLand = int(numBlocks*0.25) cont = hinted_world.addContinent(numBlocksLand,mapRand.get(5, "Generate Plot Types PYTHON")+4,mapRand.get(3, "Generate Plot Types PYTHON")+2) if not cont: print "Couldn't create continent! Reverting to C implementation." CyPythonMgr().allowDefaultImpl() else: for x in range(hinted_world.w): for y in (0, hinted_world.h - 1): hinted_world.setValue(x,y, 1) # force ocean at poles hinted_world.buildAllContinents() return hinted_world.generatePlotTypes(shift_plot_types=True)
def generatePlotTypes(): NiTextOut("Setting Plot Types (Python Balanced) ...") global hinted_world hinted_world = HintedWorld(16,8) mapRand = CyGlobalContext().getGame().getMapRand() numBlocks = hinted_world.w * hinted_world.h numBlocksLand = int(numBlocks*0.25) cont = hinted_world.addContinent(numBlocksLand,mapRand.get(5, "Generate Plot Types PYTHON")+4,mapRand.get(3, "Generate Plot Types PYTHON")+2) if not cont: print "Couldn't create continent! Reverting to C implementation." CyPythonMgr().allowDefaultImpl() else: for x in range(hinted_world.w): for y in (0, hinted_world.h - 1): hinted_world.setValue(x,y, 1) # force ocean at poles hinted_world.buildAllContinents() return hinted_world.generatePlotTypes(shift_plot_types=True)
def generateAndysHintedPangaea(self): NiTextOut("Setting Plot Types (Python Pangaea Hinted) ...") global hinted_world hinted_world = HintedWorld(16,8) mapRand = CyGame().getMapRand() numBlocks = hinted_world.w * hinted_world.h numBlocksLand = int(numBlocks*0.33) cont = hinted_world.addContinent(numBlocksLand,mapRand.get(5, "Generate Plot Types PYTHON")+4,mapRand.get(3, "Generate Plot Types PYTHON")+2) if not cont: # Couldn't create continent! Reverting to Soren's Hinted Pangaea return self.generateSorensHintedPangaea() else: for x in range(hinted_world.w): for y in (0, hinted_world.h - 1): hinted_world.setValue(x,y, 1) # force ocean at poles hinted_world.buildAllContinents() return hinted_world.generatePlotTypes(shift_plot_types=True)
def generateAndysHintedPangaea(self): NiTextOut("Setting Plot Types (Python Pangaea Hinted) ...") global hinted_world hinted_world = HintedWorld(16,8) mapRand = CyGlobalContext().getGame().getMapRand() numBlocks = hinted_world.w * hinted_world.h numBlocksLand = int(numBlocks*0.33) cont = hinted_world.addContinent(numBlocksLand,mapRand.get(5, "Generate Plot Types PYTHON")+4,mapRand.get(3, "Generate Plot Types PYTHON")+2) if not cont: # Couldn't create continent! Reverting to Soren's Hinted Pangaea return self.generateSorensHintedPangaea() else: for x in range(hinted_world.w): for y in (0, hinted_world.h - 1): hinted_world.setValue(x,y, 1) # force ocean at poles hinted_world.buildAllContinents() return hinted_world.generatePlotTypes(shift_plot_types=True)