megamek.common
Class BattleArmorHandlesTank

java.lang.Object
  extended by megamek.common.BattleArmorHandles
      extended by megamek.common.BattleArmorHandlesTank
All Implemented Interfaces:
java.io.Serializable, Transporter
Direct Known Subclasses:
ClampMountTank

public class BattleArmorHandlesTank
extends BattleArmorHandles

See Also:
Serialized Form

Field Summary
 
Fields inherited from class megamek.common.BattleArmorHandles
troopers
 
Constructor Summary
BattleArmorHandlesTank()
           
 
Method Summary
protected  int[] getExteriorLocs(boolean isRear)
          Get the exterior locations that a loaded squad covers.
 boolean isWeaponBlockedAt(int loc, boolean isRear)
          Determine if transported units prevent a weapon in the given location from firing.
 
Methods inherited from class megamek.common.BattleArmorHandles
canLoad, getCargoMpReduction, getExteriorUnitAt, getExternalUnits, getLoadedUnits, getUnusedString, getVacancyString, load, unload
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BattleArmorHandlesTank

public BattleArmorHandlesTank()
Method Detail

getExteriorLocs

protected int[] getExteriorLocs(boolean isRear)
Get the exterior locations that a loaded squad covers.

Sub-classes are encouraged to override this method.

Overrides:
getExteriorLocs in class BattleArmorHandles
Parameters:
isRear - - a boolean value stating if the given location is rear facing; if false, the location is front facing.
Returns:
an array of int listing the exterior locations.

isWeaponBlockedAt

public final boolean isWeaponBlockedAt(int loc,
                                       boolean isRear)
Determine if transported units prevent a weapon in the given location from firing.

Sub-classes should override the getBlockedLocs method.

Specified by:
isWeaponBlockedAt in interface Transporter
Overrides:
isWeaponBlockedAt in class BattleArmorHandles
Parameters:
loc - - the int location attempting to fire.
isRear - - a boolean value stating if the given location is rear facing; if false, the location is front facing.
Returns:
true if a transported unit is in the way, false if the weapon can fire.
See Also:
megamek.common.BattleArmorHandles#getBlockedLocs(boolean)