megamek.common.util
Class BuildingTemplate

java.lang.Object
  extended by megamek.common.util.BuildingTemplate
All Implemented Interfaces:
java.io.Serializable

public class BuildingTemplate
extends java.lang.Object
implements java.io.Serializable

Building template, for placing on the map during map generation. Currently used by mekwars to place objective buildings. Could also be used by an RMG town builder

Author:
coelocanth
See Also:
Serialized Form

Field Summary
static int BASEMENT_RANDOM
           
 
Constructor Summary
BuildingTemplate(int type, java.util.ArrayList<Coords> coords)
           
BuildingTemplate(int type, java.util.ArrayList<Coords> coords, int CF, int height, int basement)
           
 
Method Summary
 boolean containsCoords(Coords c)
           
 int getBasement()
           
 int getCF()
           
 java.util.Iterator<Coords> getCoords()
           
 int getHeight()
           
 int getType()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BASEMENT_RANDOM

public static final int BASEMENT_RANDOM
See Also:
Constant Field Values
Constructor Detail

BuildingTemplate

public BuildingTemplate(int type,
                        java.util.ArrayList<Coords> coords)

BuildingTemplate

public BuildingTemplate(int type,
                        java.util.ArrayList<Coords> coords,
                        int CF,
                        int height,
                        int basement)
Method Detail

getCoords

public java.util.Iterator<Coords> getCoords()
Returns:
vector containing Coords of all hexes the building covers

getType

public int getType()
Returns:
type of the building (Building.LIGHT - Building.HARDENED)

getCF

public int getCF()
Returns:
construction factor, used to initialise BLDG_CF

getHeight

public int getHeight()
Returns:
height of the building, used to initialise BLDG_ELEV

getBasement

public int getBasement()
Returns:
basement settings - basements arent implemented yet

containsCoords

public boolean containsCoords(Coords c)