Skip to content

Commit

Permalink
Fix No Alien Containment placement
Browse files Browse the repository at this point in the history
  • Loading branch information
SupSuper committed Apr 10, 2016
1 parent 920bee5 commit c74a352
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 148 deletions.
2 changes: 0 additions & 2 deletions Makefile.am
Expand Up @@ -178,8 +178,6 @@ openxcom_SOURCES = \
src/Battlescape/MiniMapView.h \
src/Battlescape/NextTurnState.cpp \
src/Battlescape/NextTurnState.h \
src/Battlescape/NoContainmentState.cpp \
src/Battlescape/NoContainmentState.h \
src/Battlescape/Particle.cpp \
src/Battlescape/Particle.h \
src/Battlescape/Pathfinding.cpp \
Expand Down
12 changes: 6 additions & 6 deletions src/Battlescape/DebriefingState.cpp
Expand Up @@ -25,7 +25,6 @@
#include "../Interface/Text.h"
#include "../Interface/TextList.h"
#include "../Interface/Window.h"
#include "NoContainmentState.h"
#include "PromotionsState.h"
#include "CommendationState.h"
#include "CommendationLateState.h"
Expand Down Expand Up @@ -447,6 +446,11 @@ void DebriefingState::init()
{
_game->getMod()->playMusic(Mod::DEBRIEF_MUSIC_BAD);
}
if (_noContainment)
{
_game->pushState(new ErrorMessageState(tr("STR_ALIEN_DIES_NO_ALIEN_CONTAINMENT_FACILITY"), _palette, _game->getMod()->getInterface("debriefing")->getElement("errorMessage")->color, "BACK01.SCR", _game->getMod()->getInterface("debriefing")->getElement("errorPalette")->color));
_noContainment = false;
}
}

/**
Expand Down Expand Up @@ -490,10 +494,6 @@ void DebriefingState::btnOkClick(Action *)
{
_game->pushState(new CannotReequipState(_missingItems));
}
if (_noContainment)
{
_game->pushState(new NoContainmentState);
}
else if (_manageContainment)
{
_game->pushState(new ManageAlienContainmentState(_base, OPT_BATTLESCAPE));
Expand Down Expand Up @@ -1463,7 +1463,7 @@ void DebriefingState::recoverAlien(BattleUnit *from, Base *base)
return;
}
std::string type = from->getType();
if (base->getAvailableContainment() == 0)
if (base->getAvailableContainment() == 0/* && _game->getSavedGame()->getMonthsPassed() > -1*/)
{
_noContainment = true;
addStat("STR_ALIEN_CORPSES_RECOVERED", 1, from->getValue());
Expand Down
81 changes: 0 additions & 81 deletions src/Battlescape/NoContainmentState.cpp

This file was deleted.

48 changes: 0 additions & 48 deletions src/Battlescape/NoContainmentState.h

This file was deleted.

2 changes: 0 additions & 2 deletions src/CMakeLists.txt
Expand Up @@ -153,8 +153,6 @@ set ( battlescape_src
Battlescape/MiniMapView.h
Battlescape/NextTurnState.cpp
Battlescape/NextTurnState.h
Battlescape/NoContainmentState.cpp
Battlescape/NoContainmentState.h
Battlescape/Particle.cpp
Battlescape/Particle.h
Battlescape/Pathfinding.cpp
Expand Down
2 changes: 1 addition & 1 deletion src/Engine/State.cpp
Expand Up @@ -257,7 +257,7 @@ void State::init()
Window* window = dynamic_cast<Window*>(*i);
if (window)
{
window->invalidate(true);
window->invalidate();
}
}
if (_ruleInterface != 0 && !_ruleInterface->getMusic().empty())
Expand Down
2 changes: 0 additions & 2 deletions src/OpenXcom.2010.vcxproj
Expand Up @@ -279,7 +279,6 @@
<ClCompile Include="Battlescape\MiniMapState.cpp" />
<ClCompile Include="Battlescape\MiniMapView.cpp" />
<ClCompile Include="Battlescape\NextTurnState.cpp" />
<ClCompile Include="Battlescape\NoContainmentState.cpp" />
<ClCompile Include="Battlescape\Pathfinding.cpp" />
<ClCompile Include="Battlescape\PathfindingNode.cpp" />
<ClCompile Include="Battlescape\PathfindingOpenSet.cpp" />
Expand Down Expand Up @@ -601,7 +600,6 @@
<ClInclude Include="Battlescape\MiniMapState.h" />
<ClInclude Include="Battlescape\MiniMapView.h" />
<ClInclude Include="Battlescape\NextTurnState.h" />
<ClInclude Include="Battlescape\NoContainmentState.h" />
<ClInclude Include="Battlescape\Pathfinding.h" />
<ClInclude Include="Battlescape\PathfindingNode.h" />
<ClInclude Include="Battlescape\PathfindingOpenSet.h" />
Expand Down
6 changes: 0 additions & 6 deletions src/OpenXcom.2010.vcxproj.filters
Expand Up @@ -558,9 +558,6 @@
<ClCompile Include="Geoscape\PsiTrainingState.cpp">
<Filter>Geoscape</Filter>
</ClCompile>
<ClCompile Include="Battlescape\NoContainmentState.cpp">
<Filter>Battlescape</Filter>
</ClCompile>
<ClCompile Include="Savegame\WeightedOptions.cpp">
<Filter>Savegame</Filter>
</ClCompile>
Expand Down Expand Up @@ -1515,9 +1512,6 @@
<ClInclude Include="Geoscape\PsiTrainingState.h">
<Filter>Geoscape</Filter>
</ClInclude>
<ClInclude Include="Battlescape\NoContainmentState.h">
<Filter>Battlescape</Filter>
</ClInclude>
<ClInclude Include="Savegame\WeightedOptions.h">
<Filter>Savegame</Filter>
</ClInclude>
Expand Down

0 comments on commit c74a352

Please sign in to comment.