Examples of PlatLot


Examples of me.daddychurchill.CityWorld.Plats.PlatLot

    PlatMap platmap = gen.getPlatMap(chunkX, chunkZ);
    if (platmap == null)
      throw new IllegalArgumentException("PlatMap not found for specified chunk");
   
    // figure out the lot
    PlatLot lot = platmap.getMapLot(chunkX, chunkZ);

    // add context type to returned hashmap
    info.put("context", platmap.context.schematicFamily.toString());

    // add last part of context classname to hashmap
    classname = platmap.context.getClass().getName();
    classname = classname.substring(classname.lastIndexOf(".") + 1);
    info.put("contextclass", classname);

    // add lot style to hashmap
    info.put("lot", lot.style.toString());

    // add last part of lot style classname to hashmap
    classname = lot.getClass().getName();
    classname = classname.substring(classname.lastIndexOf(".") + 1);
    info.put("lotclass", classname);

    // Now check if lot is a clipboardlot to get schematic name
    if (lot instanceof ClipboardLot) {
View Full Code Here

Examples of me.daddychurchill.CityWorld.Plats.PlatLot

    PlatMap platmap = gen.getPlatMap(chunkX, chunkZ);
    if (platmap == null)
      throw new IllegalArgumentException("PlatMap not found for specified chunk");
   
    // figure out the lot
    PlatLot lot = platmap.getMapLot(chunkX, chunkZ);
    return lot.style.toString();
  }
View Full Code Here

Examples of me.daddychurchill.CityWorld.Plats.PlatLot

    PlatMap platmap = gen.getPlatMap(chunkX, chunkZ);
    if (platmap == null)
      throw new IllegalArgumentException("PlatMap not found for specified chunk");
   
    // figure out the lot
    PlatLot lot = platmap.getMapLot(chunkX, chunkZ);
    return lot.style;
  }
View Full Code Here

Examples of me.daddychurchill.CityWorld.Plats.PlatLot

    PlatMap platmap = gen.getPlatMap(chunkX, chunkZ);
    if (platmap == null)
      throw new IllegalArgumentException("PlatMap not found for specified chunk");
   
    // figure out the lot
    PlatLot lot = platmap.getMapLot(chunkX, chunkZ);
   
    // Now check if lot is a clipboardlot to get schematic name
    if (lot instanceof ClipboardLot) {
      ClipboardLot clot = (ClipboardLot) lot;
      name = clot.getClip().name;
View Full Code Here

Examples of me.daddychurchill.CityWorld.Plats.PlatLot

    HeightInfo heights;
   
    // 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;
 
View Full Code Here

Examples of me.daddychurchill.CityWorld.Plats.PlatLot

  @Override
  public void validateMap(WorldGenerator generator, PlatMap platmap) {
    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
        if (current != null &&
          current.trulyIsolated && !platmap.isTrulyIsolatedLot(x, z))
          platmap.recycleLot(x, z);
View Full Code Here

Examples of me.daddychurchill.CityWorld.Plats.PlatLot

    int originZ = platmap.originZ;
   
    // clean up the platmap of singletons and odd road structures
    for (int x = 0; x < PlatMap.Width; x++) {
      for (int z = 0; z < PlatMap.Width; z++) {
        PlatLot current = platmap.getLot(x, z);
       
        // something here?
        if (current == null) {
         
          // but there aren't neighbors
          if (!platmap.isEmptyLot(x - 1, z) && !platmap.isEmptyLot(x + 1, z) &&
            !platmap.isEmptyLot(x, z - 1) && !platmap.isEmptyLot(x, z + 1))
            platmap.recycleLot(x, z);
        }
       
        // look for singleton nature and roundabouts
        else {
         
          // if a single natural thing is here but surrounded by four "things"
          if (current.style == LotStyle.NATURE &&
            platmap.isEmptyLot(x - 1, z) && platmap.isEmptyLot(x + 1, z) &&
            platmap.isEmptyLot(x, z - 1) && platmap.isEmptyLot(x, z + 1))
            platmap.emptyLot(x, z);
         
          // get rid of roundabouts
          else if (current.style == LotStyle.ROUNDABOUT) {
            platmap.paveLot(x, z, false);
            platmap.emptyLot(x - 1, z - 1);
            platmap.emptyLot(x - 1, z + 1);
            platmap.emptyLot(x + 1, z - 1);
            platmap.emptyLot(x + 1, z + 1);
          }
        }
      }
    }
   
    // let the user add their stuff first
    getSchematics(generator).populate(generator, platmap);
   
    // backfill with farms and a single house
    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) {
         
          //TODO Barns and Wells
         
          // farm house here?
          if (!housePlaced && platmapOdds.playOdds(oddsOfFarmHouse) && generator.settings.includeHouses) {
            housePlaced = platmap.setLot(x, z, getHouseLot(generator, platmap, platmapOdds, originX + lastX, originZ + lastZ));
         
          // place the farm
          } else {
           
            // place the farm
            current = getFarmLot(generator, platmap, platmapOdds, originX + x, originZ + z);
           
            // see if the previous chunk is the same type
            PlatLot previous = null;
            if (x > 0 && current.isConnectable(platmap.getLot(x - 1, z))) {
              previous = platmap.getLot(x - 1, z);
            } else if (z > 0 && current.isConnectable(platmap.getLot(x, z - 1))) {
              previous = platmap.getLot(x, z - 1);
            }
View Full Code Here

Examples of me.daddychurchill.CityWorld.Plats.PlatLot

    HeightState minState = HeightState.BUILDING;
   
    // 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 chunkX = originX + x;
          int chunkZ = originZ + z;
View Full Code Here

Examples of me.daddychurchill.CityWorld.Plats.PlatLot

    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);
        if (current == null) {
         
          // what is the world location of the lot?
          int blockX = (originX + x) * SupportChunk.chunksBlockWidth;
          int blockZ = (originZ + z) * SupportChunk.chunksBlockWidth;
 
View Full Code Here

Examples of me.daddychurchill.CityWorld.Plats.PlatLot

  public void validateMap(WorldGenerator generator, PlatMap platmap) {
   
  }

  public PlatLot createRoadLot(WorldGenerator generator, PlatMap platmap, int x, int z, boolean roundaboutPart, PlatLot oldLot) {
    PlatLot result = null;
   
    // see if the old lot has a suggestion?
    if (oldLot != null)
      result = oldLot.repaveLot(generator, platmap);
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.