Package me.daddychurchill.CityWorld.Support

Examples of me.daddychurchill.CityWorld.Support.Odds


  protected abstract PlatLot getBackfillLot(WorldGenerator generator, PlatMap platmap, Odds odds, int chunkX, int chunkZ);
 
  @Override
  public void validateMap(WorldGenerator generator, PlatMap platmap) {
    Odds platmapOdds = platmap.getOddsGenerator();
    for (int x = 0; x < PlatMap.Width; x++) {
      for (int z = 0; z < PlatMap.Width; z++) {
        PlatLot current = platmap.getLot(x, z);
       
        // if we are trulyIsolated and one of our neighbors are as well then recycle the lot
View Full Code Here


    //TODO, This doesn't handle schematics quite right yet
    // let the user add their stuff first, then plug any remaining holes with our stuff
    //mapsSchematics.populate(generator, platmap);
   
    // random fluff
    Odds odds = platmap.getOddsGenerator();
   
    // where it all begins
    int originX = platmap.originX;
    int originZ = platmap.originZ;
    HeightInfo heights;
    boolean addingBases = false;
   
    // is this natural or buildable?
    for (int x = 0; x < PlatMap.Width; x++) {
      for (int z = 0; z < PlatMap.Width; z++) {
        PlatLot current = platmap.getLot(x, z);
        if (current == null) {
         
          // what is the world location of the lot?
          int blockX = (originX + x) * SupportChunk.chunksBlockWidth;
          int blockZ = (originZ + z) * SupportChunk.chunksBlockWidth;
         
          // get the height info for this chunk
          heights = HeightInfo.getHeightsFaster(generator, blockX, blockZ);
          if (!heights.anyEmpties && heights.averageHeight < generator.seaLevel - 8) {
            if (!addingBases)
              addingBases = odds.playOdds(oddsOfIsolatedLots);
           
            if (addingBases) {
              if (odds.playOdds(oddsOfUnfinishedBuildings))
                current = new AstralTownEmptyLot(platmap, originX + x, originZ + z);
             
              else {
                switch (odds.getRandomInt(7)) {
                case 1:
                  current = new AstralTownBuildingLot(platmap, originX + x, originZ + z, BunkerType.BALLSY);
                  break;
                case 2:
                  current = new AstralTownBuildingLot(platmap, originX + x, originZ + z, BunkerType.FLOORED);
View Full Code Here

    schematicFamily = SchematicFamily.NEIGHBORHOOD;
  }
 
  @Override
  public void populateMap(WorldGenerator generator, PlatMap platmap) {
    Odds platmapOdds = platmap.getOddsGenerator();
   
    // let the user add their stuff first, then plug any remaining holes with our stuff
    getSchematics(generator).populate(generator, platmap);
   
    /// do we check for roads?
View Full Code Here

   
    // where it all begins
    int originX = platmap.originX;
    int originZ = platmap.originZ;
    HeightInfo heights;
    Odds odds = platmap.getOddsGenerator();
   
    // is this natural or buildable?
    for (int x = 0; x < PlatMap.Width; x++) {
      for (int z = 0; z < PlatMap.Width; z++) {
        PlatLot current = platmap.getLot(x, z);
View Full Code Here

TOP

Related Classes of me.daddychurchill.CityWorld.Support.Odds

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.