@@ -357,7 +357,7 @@ void BattlescapeGenerator::run()
357357 {
358358 _worldShade = ruleDeploy->getShade ();
359359 }
360-
360+
361361 const std::vector<MapScript*> *script = _game->getRuleset ()->getMapScript (_terrain->getScript ());
362362 if (_game->getRuleset ()->getMapScript (ruleDeploy->getScript ()))
363363 {
@@ -468,7 +468,7 @@ void BattlescapeGenerator::deployXCOM()
468468 _save->setSelectedUnit (unit);
469469 }
470470 }
471-
471+
472472 if (_save->getUnits ()->empty ())
473473 {
474474 throw Exception (" Map generator encountered an error: no xcom units could be placed on the map." );
@@ -556,7 +556,7 @@ void BattlescapeGenerator::deployXCOM()
556556 continue ;
557557 placeItemByLayout (*i);
558558 }
559-
559+
560560
561561 // auto-equip soldiers (only soldiers without layout)
562562 for (int pass = 0 ; pass != 4 ; ++pass)
@@ -590,7 +590,7 @@ void BattlescapeGenerator::deployXCOM()
590590 default :
591591 break ;
592592 }
593-
593+
594594 if (add)
595595 {
596596 for (std::vector<BattleUnit*>::iterator i = _save->getUnits ()->begin (); i != _save->getUnits ()->end (); ++i)
@@ -773,9 +773,9 @@ BattleUnit *BattlescapeGenerator::addXCOMUnit(BattleUnit *unit)
773773bool BattlescapeGenerator::canPlaceXCOMUnit (Tile *tile)
774774{
775775 // to spawn an xcom soldier, there has to be a tile, with a floor, with the starting point attribute and no object in the way
776- if (tile &&
777- tile->getMapData (MapData::O_FLOOR ) &&
778- tile->getMapData (MapData::O_FLOOR )->getSpecialType () == START_POINT &&
776+ if (tile &&
777+ tile->getMapData (MapData::O_FLOOR ) &&
778+ tile->getMapData (MapData::O_FLOOR )->getSpecialType () == START_POINT &&
779779 !tile->getMapData (MapData::O_OBJECT ) &&
780780 tile->getMapData (MapData::O_FLOOR )->getTUCost (MT_WALK ) < 255 )
781781 {
@@ -828,7 +828,7 @@ void BattlescapeGenerator::deployAliens(AlienDeployment *deployment)
828828 std::string alienName = race->getMember ((*d).alienRank );
829829
830830 int quantity;
831-
831+
832832 if (_game->getSavedGame ()->getDifficulty () < DIFF_VETERAN )
833833 quantity = (*d).lowQty + RNG::generate (0 , (*d).dQty ); // beginner/experienced
834834 else if (_game->getSavedGame ()->getDifficulty () < DIFF_SUPERHUMAN )
@@ -1297,7 +1297,7 @@ int BattlescapeGenerator::loadMAP(MapBlock *mapblock, int xoff, int yoff, RuleTe
12971297 throw Exception (ss.str ());
12981298 }
12991299
1300- if (sizex != mapblock->getSizeX () ||
1300+ if (sizex != mapblock->getSizeX () ||
13011301 sizey != mapblock->getSizeY ())
13021302 {
13031303 ss <<" Map block is not of the size specified " + filename.str () + " is " << sizex << " x" << sizey << " , expected: " << mapblock->getSizeX () << " x" << mapblock->getSizeY ();
@@ -1366,7 +1366,7 @@ int BattlescapeGenerator::loadMAP(MapBlock *mapblock, int xoff, int yoff, RuleTe
13661366 }
13671367
13681368 mapFile.close ();
1369-
1369+
13701370 if (_generateFuel)
13711371 {
13721372 // if one of the mapBlocks has an items array defined, don't deploy fuel algorithmically
@@ -1456,7 +1456,7 @@ void BattlescapeGenerator::fuelPowerSources()
14561456{
14571457 for (int i = 0 ; i < _save->getMapSizeXYZ (); ++i)
14581458 {
1459- if (_save->getTiles ()[i]->getMapData (MapData::O_OBJECT )
1459+ if (_save->getTiles ()[i]->getMapData (MapData::O_OBJECT )
14601460 && _save->getTiles ()[i]->getMapData (MapData::O_OBJECT )->getSpecialType () == UFO_POWER_SOURCE )
14611461 {
14621462 BattleItem *alienFuel = new BattleItem (_game->getRuleset ()->getItem (_game->getRuleset ()->getAlienFuel ()), _save->getCurrentItemId ());
@@ -1687,7 +1687,7 @@ void BattlescapeGenerator::generateMap(const std::vector<MapScript*> *script)
16871687 _save->getMapDataSets ()->push_back (*i);
16881688 mapDataSetIDOffset++;
16891689 }
1690-
1690+
16911691 // lets generate the map now and store it inside the tile objects
16921692
16931693 // this mission type is "hard-coded" in terms of map layout
@@ -1899,7 +1899,7 @@ void BattlescapeGenerator::generateMap(const std::vector<MapScript*> *script)
18991899 {
19001900 throw Exception (" Map failed to fully generate." );
19011901 }
1902-
1902+
19031903 loadNodes ();
19041904
19051905 if (ufoMap)
@@ -2245,7 +2245,7 @@ bool BattlescapeGenerator::addCraft(MapBlock *craftMap, MapScript *command, SDL_
22452245 craftPos.h = craftMap->getSizeY ();
22462246 bool placed = false ;
22472247 int x, y;
2248-
2248+
22492249 placed = selectPosition (command->getRects (), x, y, craftPos.w , craftPos.h );
22502250 // if ok, allocate it
22512251 if (placed)
@@ -2449,7 +2449,7 @@ void BattlescapeGenerator::drillModules(TunnelData* data, const std::vector<SDL_
24492449 }
24502450 }
24512451 }
2452-
2452+
24532453 if (nWall)
24542454 {
24552455 md = _terrain->getMapDataSets ()->at (nWall->set )->getObjects ()->at (nWall->entry );
@@ -2458,7 +2458,7 @@ void BattlescapeGenerator::drillModules(TunnelData* data, const std::vector<SDL_
24582458 tile = _save->getTile (Position ((i*10 )+9 , (j*10 )+rect.y +rect.h , data->level ));
24592459 tile->setMapData (md, nWall->entry , nWall->set , MapData::O_NORTHWALL );
24602460 }
2461-
2461+
24622462 if (corner)
24632463 {
24642464 md = _terrain->getMapDataSets ()->at (corner->set )->getObjects ()->at (corner->entry );
@@ -2497,7 +2497,7 @@ void BattlescapeGenerator::drillModules(TunnelData* data, const std::vector<SDL_
24972497 }
24982498 }
24992499 }
2500-
2500+
25012501 if (wWall)
25022502 {
25032503 md = _terrain->getMapDataSets ()->at (wWall->set )->getObjects ()->at (wWall->entry );
@@ -2506,7 +2506,7 @@ void BattlescapeGenerator::drillModules(TunnelData* data, const std::vector<SDL_
25062506 tile = _save->getTile (Position ((i*10 )+rect.x +rect.w , (j*10 )+9 , data->level ));
25072507 tile->setMapData (md, wWall->entry , wWall->set , MapData::O_WESTWALL );
25082508 }
2509-
2509+
25102510 if (corner)
25112511 {
25122512 md = _terrain->getMapDataSets ()->at (corner->set )->getObjects ()->at (corner->entry );
0 commit comments