//-------------------------------------------------------------------
//
//  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 CSmallCountryHouseMesh_1
{
  string MeshFile = "Models/B_Country_1.mesh";
  string SkinFile = "Models/B_Country_1.skin";
}

class CSmallCountryHouseMesh_2
{
  string MeshFile = "Models/B_Country_2.mesh";
  string SkinFile = "Models/B_Country_2.skin";
}

class CSmallCountryHouseMesh_3
{
  string MeshFile = "Models/B_Country_3.mesh";
  string SkinFile = "Models/B_Country_3.skin";
}

class CSmallCountryHouseMesh_4
{
  string MeshFile = "Models/B_Country_4.mesh";
  string SkinFile = "Models/B_Country_4.skin";
}

class CSmallCountryHouseMesh_5
{
  string MeshFile = "Models/B_Country_5.mesh";
  string SkinFile = "Models/B_Country_5.skin";
}

class CSmallCountryHouseMesh_6
{
  string MeshFile = "Models/B_House_s.mesh";
  string SkinFile = "Models/B_House_s.skin";
}

class CSmallCountryHouseStateControl extends CUnitLifeControl
{
  void CSmallCountryHouseStateControl()
  {
    CUnitLifeControl(1500.0);
    m_DestroyPause = 20.0;
    m_ExplosionId  = "EXPLID_BuildingExplosion";
  }
}

// Building without ground control (for use in villages)
class CBaseSmallCountryHouse extends CBuilding, CUnitWithStateControl
{
  array m_MeshClassNames = array(
      "CSmallCountryHouseMesh_1",
      "CSmallCountryHouseMesh_2",
      "CSmallCountryHouseMesh_3",
      "CSmallCountryHouseMesh_4",
      "CSmallCountryHouseMesh_5",
      "CSmallCountryHouseMesh_6"
    );

  void CBaseSmallCountryHouse()
  {
    int MeshNumber = rand_int(m_MeshClassNames.size());
    InitializeModelAsStatic(m_MeshClassNames[MeshNumber]);
    CUnitWithStateControl("CSmallCountryHouseStateControl");
  }
}

// Single game object
class CMountedSmallCountryHouse extends CBaseSmallCountryHouse
{
  void CMountedSmallCountryHouse()
  {
    InitializeGroundControl();
  }
}

