//-------------------------------------------------------------------
//
//  This code is copyright 2001 by G5 Software.
//  Any unauthorized usage, either in part or in whole of this code
//  is strictly prohibited. Violators WILL be prosecuted to the
//  maximum extent allowed by law.
//
//-------------------------------------------------------------------


class CGroundBuilding
  extends CBaseUnit, CBuildingStateControl
{
  static Array HeatJoints = [
      [ "_Thermal_Root_", 50.0, 100.0 ]
    ];

  void CGroundBuilding()
  {
    addClassificator(user, "STRUCTURE");
    addClassificator(user, "OBSTACLE");
  }

  void Construct(
      Component      _Mission,
      CPropertiesMap _PropMap
    )
  {
    // Call inherited construct
    CBaseUnit::Construct(_Mission, _PropMap);

    // Put unit on ground
    if (_PropMap.Get("PutonSurface", true))
      PutonGroundUpright();
  }

  void Initialize(
      Component       _Mission,
      CPropertiesMap  _PropMap
    )
  {
    CBaseUnit::Initialize(_Mission, _PropMap);
  }
}

class CWaterBuilding
  extends CBaseUnit, CBuildingStateControl
{
  void CWaterBuilding()
  {
    addClassificator(user, "STRUCTURE");
    addClassificator(user, "OBSTACLE");
  }

  // Water waves stability factor
  float m_WaveStability = 0.0f;

  void Construct(
      Component      _Mission,
      CPropertiesMap _PropMap
    )
  {
    // Call inherited construct
    CBaseUnit::Construct(_Mission, _PropMap);

    // Put unit on water
    if (_PropMap.Get("PutonSurface", true))
      PutonWater(m_WaveStability);
  }
}


