Skip to content

Commit

Permalink
Bulldozer placement now does a transfer simulation and warns the user…
Browse files Browse the repository at this point in the history
… if there isn't enough storage space for transferring all products in the bulldozed warehouse. If the user clicks the "No" button the bulldozer placement is canceled. Closes issue #42
  • Loading branch information
ldicker83 committed Jan 21, 2019
1 parent b7cf593 commit 7b76344
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Change Log
This is the changelog for OutpostHD.

## [0.7.9] - UNKNOWN
## [0.7.9] - 2019-01-20

User interface overhaul.
User interface overhaul and maintenance.

### Added
- CheckBox Control.
Expand All @@ -21,6 +21,7 @@ User interface overhaul.
- Setting minimum resolution to 1000x700. I know, kind of a weird one but this is intended mostly for windowed modes to run properly on low-resolution displays (1366x768).
- Structures that are disabled now indicate why they were disabled.
- Buldozing a mine facility on top of a completely exhausted mine will also remove all of the mine shafts underneath.
- Bulldozing a Warehouse will ask the user to confirm if there isn't enough storage space to move products to other Warehouses.

### Fixed
- Fixed an issue that prevented the planet description from displaying.
Expand Down
6 changes: 5 additions & 1 deletion src/States/MapViewState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,11 @@ void MapViewState::placeRobot()

if (_s->isRobotCommand()) { deleteRobotsInRCC(r, static_cast<RobotCommand*>(_s), mRobotPool, mRobotList, tile); }
if (_s->isFactory() && static_cast<Factory*>(_s) == mFactoryProduction.factory()) { mFactoryProduction.hide(); }
if (_s->isWarehouse()) { moveProducts(static_cast<Warehouse*>(_s)); }
if (_s->isWarehouse())
{
if (simulateMoveProducts(static_cast<Warehouse*>(_s))) { moveProducts(static_cast<Warehouse*>(_s)); }
else { return; } // Don't continue with the bulldoze if the user says no.
}

/**
* \fixme Since the StructureTranslator class will be deprecated in the future, there needs to be a better
Expand Down

0 comments on commit 7b76344

Please sign in to comment.