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

class CRedHouseMesh_2
{
  string MeshFile = "Models/B_House_b.mesh";
  string SkinFile = "Models/B_House_b.skin";
}

class CRedHouseStateControl extends CUnitLifeControl
{
  void CRedHouseStateControl()
  {
    CUnitLifeControl(5000.0);
    m_DestroyPause = 20.0;
    m_ExplosionId  = "EXPLID_BuildingExplosion";
  }
}

// Building without ground control (for use in villages)
class CBaseRedHouse extends CBuilding, CUnitWithStateControl
{
  array m_MeshClassNames = array(
      "CRedHouseMesh_1",
      "CRedHouseMesh_2"
    );

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

// Single game object
class CMountedRedHouse extends CBaseRedHouse
{
  void CMountedRedHouse()
  {
    InitializeGroundControl();
  }
}

// Building without ground control (for use in villages)
class CBaseSovietRedHouse extends CBaseRedHouse
{
  void CBaseSovietRedHouse()
  {
    Core_AddClassificator("Russian");
    Core_AddClassificator("GroundUnit");
  }
}

// Single game object
class CMountedSovietRedHouse extends CBaseSovietRedHouse
{
  void CMountedSovietRedHouse()
  {
    InitializeGroundControl();
  }
}


