void MineBuild(int player, int x, int y, bool common)// x any y are the location of the command center
{
Unit cc, mine, smelt, ct1, ct2,cv1,cv2,ew1;
TethysGame::CreateUnit(smelt, map_Common_Ore_Smelter, LOCATION(x, y-4), player, map_None, 0);
TethysGame::CreateUnit(cv1, map_ConVec, LOCATION(x, y), player, map_Command_Center, 0);
cv1.DoSetLights(true);
// TethysGame::CreateUnit(cv2, map_ConVec, LOCATION(x-1, y), player, map_Common_Ore_Smelter, 0);
// cv2.DoSetLights(true);
MAP_RECT rectMineGrp(LOCATION(x-3, y-11), LOCATION(x+6, y+4));
TethysGame::CreateBeacon(map_Mining_Beacon, x+5, y-3, !common, yield_3, 1 /*variant*/);
cv1.DoBuild(map_Command_Center, LOCATION(x, y));
/* if(Player[player].IsEden())
{
TethysGame::CreateUnit(cc, map_Guard_Post,LOCATION(x-1,y),player,map_EMP,0);
}
else
{
TethysGame::CreateUnit(cc, map_Guard_Post,LOCATION(x+1,y),player,map_EMP,0);
}*/
TethysGame::CreateUnit(mine, map_Mine, LOCATION(x+5, y-3), player, map_None, 0);
if(common)
{
TethysGame::CreateUnit(cv2, map_ConVec, LOCATION(x+4, y), player, map_Common_Ore_Smelter, 0);
cv2.DoSetLights(true);
//cv2.DoBuild(map_Common_Ore_Smelter, LOCATION(x, y-4));
}
else
{
TethysGame::CreateUnit(cv2, map_ConVec, LOCATION(x+4, y), player, map_Rare_Ore_Smelter, 0);
cv2.DoSetLights(true);
// cv2.DoBuild(map_Rare_Ore_Smelter, LOCATION(x, y-4));
}
BuildingGroup &bldGrp = CreateBuildingGroup(Player[player]);
bldGrp.TakeUnit(cv1);
bldGrp.TakeUnit(cv2);
bldGrp.TakeUnit(mine);
bldGrp.RecordBuilding(LOCATION(x,y),map_Command_Center,map_None);
//bldGrp.RecordBuilding(LOCATION(x+5, y-3),map_Mine,map_None);
MiningGroup miningGrp = CreateMiningGroup(Player[player]);
miningGrp.Setup(mine, smelt, rectMineGrp);
TethysGame::CreateUnit(ct1, map_Cargo_Truck, LOCATION(x,y-6), player, map_None, 0);
TethysGame::CreateUnit(ct2, map_Cargo_Truck, LOCATION(x,y-7), player, map_None, 0);
TethysGame::CreateUnit(ew1, map_Earthworker, LOCATION(x,y-7), player, map_None, 0);
//TethysGame::CreateUnit(ew1, map_Earthworker, LOCATION(x,y-7), player, map_None, 0);
int i;
for( i =0; i <=10;i++)
{
bldGrp.RecordWall(LOCATION(x-4+i,y-7),map_Lava_Wall);
}
for( i =0; i <10;i++)
{
bldGrp.RecordWall(LOCATION(x-4,y-7+i),map_Lava_Wall);
}
for( i =0; i <=10;i++)
{
bldGrp.RecordWall(LOCATION(x-4+i,y+2),map_Lava_Wall);
}
for( i =0; i <10;i++)
{
bldGrp.RecordWall(LOCATION(x+7,y+2-i),map_Lava_Wall);
}
miningGrp.TakeUnit(ct1);
miningGrp.TakeUnit(ct2);
bldGrp.TakeUnit(ew1);
bldGrp.SetRect(MAP_RECT(x-10, y-10, x+20, y+15));
CreateTubeOrWallLine(x-4,y-7,x+7,y-7,map_Lava_Wall);
CreateTubeOrWallLine(x-4,y+2,x+7,y+2,map_Lava_Wall);
CreateTubeOrWallLine(x-4,y-7,x-4,y+2,map_Lava_Wall);
CreateTubeOrWallLine(x+7,y-7,x+7,y+2,map_Lava_Wall);
}