Skip to content

Commit

Permalink
Merge pull request OpenApoc#1490 from ayrtondenner/alienContainmentEx…
Browse files Browse the repository at this point in the history
…ists-logic-fix

Fixing logic at Base::alienContainmentExists
  • Loading branch information
FilmBoy84 authored Aug 12, 2024
2 parents 81855bd + d3d5e35 commit 5f18f27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion game/state/city/base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ void Base::destroyFacility(GameState &state, Vec2<int> pos)

bool Base::alienContainmentExists(GameState &state)
{
return state.current_base->getCapacityTotal(FacilityType::Capacity::Aliens) == 0;
return state.current_base->getCapacityTotal(FacilityType::Capacity::Aliens) > 0;
}

bool Base::alienContainmentIsEmpty(GameState &state)
Expand Down
2 changes: 1 addition & 1 deletion game/ui/base/basescreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void BaseScreen::begin()
FormEventType::ButtonClick,
[this](Event *)
{
if (this->state->current_base->alienContainmentExists(*state))
if (!this->state->current_base->alienContainmentExists(*state))
{
fw().stageQueueCommand(
{StageCmd::Command::PUSH,
Expand Down

0 comments on commit 5f18f27

Please sign in to comment.