From 20fca6d7d86163d61659b1be63940cdafcd54c9a Mon Sep 17 00:00:00 2001 From: ldicker83 Date: Sun, 26 Sep 2021 21:25:20 -0400 Subject: [PATCH 1/7] Update changelog and version strings --- CHANGELOG.md | 24 ++++++++++++++++++++++++ OPHD/Constants/Strings.h | 2 +- OPHD/ophd.rc | 8 ++++---- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e506557a..fcce62a84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,30 @@ # Change Log This is the changelog for OutpostHD. +## [0.8.5] - 2021-09-26 + +Introduces integrity decay and the Maintenance Facility. + +### Added +- Maintenance Facility +- Structure Integrity & Decay +- Criminal Activity + +### Changed +- Structures will now slowly lose integrity (decay) over time +- Decayed roads will negatively affect route traversal times +- Maintenance Facility required to repair decaying buildings +- Improved descriptions of criminal activity + +### Fixed +- Factories will no longer push new products into warehouses that aren't operational +- Fixed misreported warehouse usage in full-screen warehouse UI +- Fixed display of tilemap overlays being cleared when turns are run +- Fixed a mistake in route cost calculation that caused extremely low movement of resources +- Fixed an issue that made it impossible to place robots before the Command Center was built +- Fixed an issue that caused roads to be set to an incorrect animation state during loading + + ## [0.8.3] - 2021-06-6 Introduces the NotificationArea UI element to inform users of non-critical issues or notifications that don't interrupt gameplay and the user can look at and respond to at their leisure. diff --git a/OPHD/Constants/Strings.h b/OPHD/Constants/Strings.h index 1a533aec9..676c3160c 100644 --- a/OPHD/Constants/Strings.h +++ b/OPHD/Constants/Strings.h @@ -19,7 +19,7 @@ namespace constants // ===================================== // = MISCELLANEOUS // ===================================== - const std::string Version = "v0.8.3"; + const std::string Version = "v0.8.5"; const std::string EmptyString = ""; /**< Used in a few places to return an empty string without having to create one. */ const std::string TileBulldozed = "Bulldozed"; diff --git a/OPHD/ophd.rc b/OPHD/ophd.rc index 8cbef2355..7ec73652f 100644 --- a/OPHD/ophd.rc +++ b/OPHD/ophd.rc @@ -61,8 +61,8 @@ IDI_ICON1 ICON "outpost.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,8,3,0 - PRODUCTVERSION 0,8,3,0 + FILEVERSION 0,8,5,0 + PRODUCTVERSION 0,8,5,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -79,12 +79,12 @@ BEGIN BEGIN VALUE "CompanyName", "LairWorks Entertainment, LLC" VALUE "FileDescription", "OutpostHD" - VALUE "FileVersion", "0.8.3.0" + VALUE "FileVersion", "0.8.5.0" VALUE "InternalName", "OutpostHD" VALUE "LegalCopyright", "Copyright © 2015 - 2021, Leeor Dicker" VALUE "OriginalFilename", "OPHD.EXE" VALUE "ProductName", "OutpostHD" - VALUE "ProductVersion", "0.8.3.0" + VALUE "ProductVersion", "0.8.5.0" END END BLOCK "VarFileInfo" From 303b65a44a23b900d8b218352d75abff0879c9a6 Mon Sep 17 00:00:00 2001 From: ldicker83 Date: Sun, 26 Sep 2021 21:25:35 -0400 Subject: [PATCH 2/7] Rebalance cost of structures --- OPHD/StructureCatalogue.cpp | 40 ++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/OPHD/StructureCatalogue.cpp b/OPHD/StructureCatalogue.cpp index 435965ebb..d92ef523e 100644 --- a/OPHD/StructureCatalogue.cpp +++ b/OPHD/StructureCatalogue.cpp @@ -262,34 +262,34 @@ bool StructureCatalogue::canBuild(const StorableResources& source, StructureID t void StructureCatalogue::buildCostTable() { // RESOURCES: CommonMetals | CommonMinerals | RareMetals | RareMinerals - mStructureCostTable[StructureID::SID_AGRIDOME] = {20, 10, 5, 0}; - mStructureCostTable[StructureID::SID_CHAP] = {50, 10, 20, 5}; + mStructureCostTable[StructureID::SID_AGRIDOME] = {12, 8, 3, 0}; + mStructureCostTable[StructureID::SID_CHAP] = {25, 10, 8, 5}; mStructureCostTable[StructureID::SID_COMMAND_CENTER] = {100, 75, 65, 35}; - mStructureCostTable[StructureID::SID_COMMERCIAL] = {25, 5, 2, 0}; - mStructureCostTable[StructureID::SID_COMM_TOWER] = {30, 10, 5, 5}; - mStructureCostTable[StructureID::SID_FUSION_REACTOR] = {75, 25, 50, 30}; - mStructureCostTable[StructureID::SID_HOT_LABORATORY] = {45, 10, 15, 5}; + mStructureCostTable[StructureID::SID_COMMERCIAL] = {20, 5, 2, 0}; + mStructureCostTable[StructureID::SID_COMM_TOWER] = {10, 5, 5, 3}; + mStructureCostTable[StructureID::SID_FUSION_REACTOR] = {50, 30, 25, 15}; + mStructureCostTable[StructureID::SID_HOT_LABORATORY] = {30, 10, 15, 5}; mStructureCostTable[StructureID::SID_LABORATORY] = {20, 10, 10, 5}; mStructureCostTable[StructureID::SID_MAINTENANCE_FACILITY] = {15, 10, 2, 1}; - mStructureCostTable[StructureID::SID_MEDICAL_CENTER] = {25, 5, 2, 0}; - mStructureCostTable[StructureID::SID_NURSERY] = {20, 10, 5, 0}; - mStructureCostTable[StructureID::SID_PARK] = {25, 5, 2, 0}; - mStructureCostTable[StructureID::SID_SURFACE_POLICE] = {25, 5, 2, 0}; - mStructureCostTable[StructureID::SID_UNDERGROUND_POLICE] = {25, 5, 2, 0}; - mStructureCostTable[StructureID::SID_RECREATION_CENTER] = {25, 5, 2, 0}; - mStructureCostTable[StructureID::SID_RECYCLING] = {20, 10, 8, 3}; - mStructureCostTable[StructureID::SID_RED_LIGHT_DISTRICT] = {20, 5, 2, 0}; - mStructureCostTable[StructureID::SID_RESIDENCE] = {25, 5, 2, 0}; + mStructureCostTable[StructureID::SID_MEDICAL_CENTER] = {15, 5, 5, 3}; + mStructureCostTable[StructureID::SID_NURSERY] = {15, 5, 5, 3}; + mStructureCostTable[StructureID::SID_PARK] = {15, 5, 2, 2}; + mStructureCostTable[StructureID::SID_SURFACE_POLICE] = {25, 5, 8, 2}; + mStructureCostTable[StructureID::SID_UNDERGROUND_POLICE] = {25, 5, 8, 2}; + mStructureCostTable[StructureID::SID_RECREATION_CENTER] = {18, 5, 2, 0}; + mStructureCostTable[StructureID::SID_RECYCLING] = {15, 10, 8, 3}; + mStructureCostTable[StructureID::SID_RED_LIGHT_DISTRICT] = {20, 10, 10, 3}; + mStructureCostTable[StructureID::SID_RESIDENCE] = {15, 5, 2, 0}; mStructureCostTable[StructureID::SID_ROAD] = {10, 15, 0, 0}; - mStructureCostTable[StructureID::SID_ROBOT_COMMAND] = {75, 50, 45, 25}; + mStructureCostTable[StructureID::SID_ROBOT_COMMAND] = {50, 30, 25, 10}; mStructureCostTable[StructureID::SID_SMELTER] = {30, 20, 10, 5}; mStructureCostTable[StructureID::SID_SOLAR_PANEL1] = {10, 20, 5, 5}; mStructureCostTable[StructureID::SID_SOLAR_PLANT] = {50, 25, 50, 20}; - mStructureCostTable[StructureID::SID_STORAGE_TANKS] = {15, 5, 6, 1}; - mStructureCostTable[StructureID::SID_SURFACE_FACTORY] = {20, 10, 10, 5}; - mStructureCostTable[StructureID::SID_UNDERGROUND_FACTORY] = {20, 10, 10, 5}; + mStructureCostTable[StructureID::SID_STORAGE_TANKS] = {10, 5, 6, 1}; + mStructureCostTable[StructureID::SID_SURFACE_FACTORY] = {25, 10, 10, 5}; + mStructureCostTable[StructureID::SID_UNDERGROUND_FACTORY] = {25, 10, 10, 5}; mStructureCostTable[StructureID::SID_UNIVERSITY] = {20, 10, 10, 5}; - mStructureCostTable[StructureID::SID_WAREHOUSE] = {15, 5, 6, 1}; + mStructureCostTable[StructureID::SID_WAREHOUSE] = {10, 8, 5, 5}; } From fcbb666fe434491efbe27930fceee1ed8d544b87 Mon Sep 17 00:00:00 2001 From: ldicker83 Date: Sun, 26 Sep 2021 21:26:11 -0400 Subject: [PATCH 3/7] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fcce62a84..9793d1f09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ Introduces integrity decay and the Maintenance Facility. - Decayed roads will negatively affect route traversal times - Maintenance Facility required to repair decaying buildings - Improved descriptions of criminal activity +- Adjusted cost of structures to make it a little less punishing ### Fixed - Factories will no longer push new products into warehouses that aren't operational From 0be2549324e80a0094d28fbef311163de268e241 Mon Sep 17 00:00:00 2001 From: ldicker83 Date: Mon, 27 Sep 2021 05:20:38 -0400 Subject: [PATCH 4/7] Additional balancing --- OPHD/StructureCatalogue.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/OPHD/StructureCatalogue.cpp b/OPHD/StructureCatalogue.cpp index d92ef523e..ab38302b2 100644 --- a/OPHD/StructureCatalogue.cpp +++ b/OPHD/StructureCatalogue.cpp @@ -262,10 +262,10 @@ bool StructureCatalogue::canBuild(const StorableResources& source, StructureID t void StructureCatalogue::buildCostTable() { // RESOURCES: CommonMetals | CommonMinerals | RareMetals | RareMinerals - mStructureCostTable[StructureID::SID_AGRIDOME] = {12, 8, 3, 0}; - mStructureCostTable[StructureID::SID_CHAP] = {25, 10, 8, 5}; + mStructureCostTable[StructureID::SID_AGRIDOME] = {12, 10, 2, 2}; + mStructureCostTable[StructureID::SID_CHAP] = {25, 10, 10, 5}; mStructureCostTable[StructureID::SID_COMMAND_CENTER] = {100, 75, 65, 35}; - mStructureCostTable[StructureID::SID_COMMERCIAL] = {20, 5, 2, 0}; + mStructureCostTable[StructureID::SID_COMMERCIAL] = {15, 8, 5, 2}; mStructureCostTable[StructureID::SID_COMM_TOWER] = {10, 5, 5, 3}; mStructureCostTable[StructureID::SID_FUSION_REACTOR] = {50, 30, 25, 15}; mStructureCostTable[StructureID::SID_HOT_LABORATORY] = {30, 10, 15, 5}; @@ -273,15 +273,15 @@ void StructureCatalogue::buildCostTable() mStructureCostTable[StructureID::SID_MAINTENANCE_FACILITY] = {15, 10, 2, 1}; mStructureCostTable[StructureID::SID_MEDICAL_CENTER] = {15, 5, 5, 3}; mStructureCostTable[StructureID::SID_NURSERY] = {15, 5, 5, 3}; - mStructureCostTable[StructureID::SID_PARK] = {15, 5, 2, 2}; - mStructureCostTable[StructureID::SID_SURFACE_POLICE] = {25, 5, 8, 2}; - mStructureCostTable[StructureID::SID_UNDERGROUND_POLICE] = {25, 5, 8, 2}; - mStructureCostTable[StructureID::SID_RECREATION_CENTER] = {18, 5, 2, 0}; + mStructureCostTable[StructureID::SID_PARK] = {10, 10, 3, 2}; + mStructureCostTable[StructureID::SID_SURFACE_POLICE] = {15, 5, 8, 2}; + mStructureCostTable[StructureID::SID_UNDERGROUND_POLICE] = {15, 5, 8, 2}; + mStructureCostTable[StructureID::SID_RECREATION_CENTER] = {20, 5, 2, 0}; mStructureCostTable[StructureID::SID_RECYCLING] = {15, 10, 8, 3}; mStructureCostTable[StructureID::SID_RED_LIGHT_DISTRICT] = {20, 10, 10, 3}; mStructureCostTable[StructureID::SID_RESIDENCE] = {15, 5, 2, 0}; mStructureCostTable[StructureID::SID_ROAD] = {10, 15, 0, 0}; - mStructureCostTable[StructureID::SID_ROBOT_COMMAND] = {50, 30, 25, 10}; + mStructureCostTable[StructureID::SID_ROBOT_COMMAND] = {35, 20, 25, 10}; mStructureCostTable[StructureID::SID_SMELTER] = {30, 20, 10, 5}; mStructureCostTable[StructureID::SID_SOLAR_PANEL1] = {10, 20, 5, 5}; mStructureCostTable[StructureID::SID_SOLAR_PLANT] = {50, 25, 50, 20}; @@ -331,8 +331,8 @@ void StructureCatalogue::buildPopulationRequirementsTable() mPopulationRequirementsTable[StructureID::SID_MEDICAL_CENTER] = {1, 2}; mPopulationRequirementsTable[StructureID::SID_NURSERY] = {1, 1}; mPopulationRequirementsTable[StructureID::SID_PARK] = {1, 0}; - mPopulationRequirementsTable[StructureID::SID_SURFACE_POLICE] = {5, 0}; - mPopulationRequirementsTable[StructureID::SID_UNDERGROUND_POLICE] = {5, 0}; + mPopulationRequirementsTable[StructureID::SID_SURFACE_POLICE] = {3, 0}; + mPopulationRequirementsTable[StructureID::SID_UNDERGROUND_POLICE] = {3, 0}; mPopulationRequirementsTable[StructureID::SID_RECREATION_CENTER] = {2, 0}; mPopulationRequirementsTable[StructureID::SID_RECYCLING] = {1, 1}; mPopulationRequirementsTable[StructureID::SID_RED_LIGHT_DISTRICT] = {2, 0}; @@ -340,7 +340,7 @@ void StructureCatalogue::buildPopulationRequirementsTable() mPopulationRequirementsTable[StructureID::SID_SEED_FACTORY] = {2, 0}; mPopulationRequirementsTable[StructureID::SID_SEED_SMELTER] = {2, 0}; mPopulationRequirementsTable[StructureID::SID_SMELTER] = {4, 0}; - mPopulationRequirementsTable[StructureID::SID_SOLAR_PANEL1] = {1, 0}; + mPopulationRequirementsTable[StructureID::SID_SOLAR_PANEL1] = {0, 0}; mPopulationRequirementsTable[StructureID::SID_SURFACE_FACTORY] = {4, 0}; mPopulationRequirementsTable[StructureID::SID_UNDERGROUND_FACTORY] = {2, 0}; mPopulationRequirementsTable[StructureID::SID_UNIVERSITY] = {1, 3}; From c9c2bee1112bcdd07adac425a343c0a735826cba Mon Sep 17 00:00:00 2001 From: ldicker83 Date: Mon, 27 Sep 2021 05:23:49 -0400 Subject: [PATCH 5/7] Adjust structure inspector window size --- OPHD/UI/StructureInspector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OPHD/UI/StructureInspector.cpp b/OPHD/UI/StructureInspector.cpp index aa4f716f4..cb786fe6f 100644 --- a/OPHD/UI/StructureInspector.cpp +++ b/OPHD/UI/StructureInspector.cpp @@ -19,7 +19,7 @@ StructureInspector::StructureInspector() : btnClose{"Close", {this, &StructureInspector::onClose}}, mIcons{imageCache.load("ui/icons.png")} { - size({350, 240}); + size({350, 250}); btnClose.size({50, 20}); add(btnClose, {rect().width - btnClose.rect().width - 5, rect().height - btnClose.rect().height - 5,}); From 8631b2b60fe0e0ec61be6bf3e5b8eb31457870bb Mon Sep 17 00:00:00 2001 From: ldicker83 Date: Mon, 27 Sep 2021 06:18:08 -0400 Subject: [PATCH 6/7] Add depth parameter to notification --- OPHD/States/CrimeExecution.cpp | 3 +++ OPHD/States/MapViewState.cpp | 11 ++++++++--- OPHD/States/MapViewState.h | 2 +- OPHD/States/MapViewStateTurn.cpp | 15 ++++++++++++--- OPHD/States/MapViewStateUi.cpp | 3 ++- OPHD/UI/NotificationArea.cpp | 4 ++-- OPHD/UI/NotificationArea.h | 3 ++- OPHD/UI/NotificationWindow.cpp | 2 +- OPHD/UI/NotificationWindow.h | 2 +- 9 files changed, 32 insertions(+), 13 deletions(-) diff --git a/OPHD/States/CrimeExecution.cpp b/OPHD/States/CrimeExecution.cpp index cdc386f3d..8ba26398f 100644 --- a/OPHD/States/CrimeExecution.cpp +++ b/OPHD/States/CrimeExecution.cpp @@ -58,6 +58,7 @@ void CrimeExecution::stealFood(FoodProduction& structure) "Food Stolen", NAS2D::stringFrom(foodStolen) + " units of food was pilfered from a " + structure.name() + ". " + getReasonForStealing() + ".", structureTile.position(), + structureTile.depth(), NotificationArea::NotificationType::Warning); } } @@ -100,6 +101,7 @@ void CrimeExecution::stealResources(Structure& structure, const std::array buildAreaRectFromTile(const Tile& centerTile, int r } -static void pushAgingRobotMessage(const Robot* robot, const Point position, NotificationArea& notificationArea) +static void pushAgingRobotMessage(const Robot* robot, const Point position, int depth, NotificationArea& notificationArea) { const auto robotLocationText = "(" + std::to_string(position.x) + ", " + std::to_string(position.y) + ")"; @@ -97,6 +97,7 @@ static void pushAgingRobotMessage(const Robot* robot, const Point position, "Aging Robot", "Robot '" + robot->name() + "' at location " + robotLocationText + " is approaching its maximum age.", position, + depth, NotificationArea::NotificationType::Warning); } else if (robot->fuelCellAge() == 195) /// \fixme magic number @@ -105,6 +106,7 @@ static void pushAgingRobotMessage(const Robot* robot, const Point position, "Aging Robot", "Robot '" + robot->name() + "' at location " + robotLocationText + " will fail in a few turns. Replace immediately.", position, + depth, NotificationArea::NotificationType::Critical); } } @@ -1326,7 +1328,9 @@ void MapViewState::updateRobots() robot->update(); const auto position = tile->position(); - pushAgingRobotMessage(robot, position, mNotificationArea); + const auto depth = tile->depth(); + + pushAgingRobotMessage(robot, position, depth, mNotificationArea); if (robot->dead()) { @@ -1340,12 +1344,13 @@ void MapViewState::updateRobots() "Robot Self-Destructed", robot->name() + " at location " + robotLocationText + " self destructed.", position, + depth, NotificationArea::NotificationType::Critical); } else if (robot->type() != Robot::Type::Miner) { const auto text = "Your " + robot->name() + " at location " + robotLocationText + " has broken down. It will not be able to complete its task and will be removed from your inventory."; - mNotificationArea.push("Robot Broke Down", text, position, NotificationArea::NotificationType::Critical); + mNotificationArea.push("Robot Broke Down", text, position, depth, NotificationArea::NotificationType::Critical); resetTileIndexFromDozer(robot, tile); } diff --git a/OPHD/States/MapViewState.h b/OPHD/States/MapViewState.h index bc2d35736..a5396eb64 100644 --- a/OPHD/States/MapViewState.h +++ b/OPHD/States/MapViewState.h @@ -248,7 +248,7 @@ class MapViewState : public Wrapper void onFileIoAction(const std::string& filePath, FileIo::FileOperation fileOp); - void onNotificationWindowTakeMeThere(NAS2D::Point position); + void onNotificationWindowTakeMeThere(NAS2D::Point position, int depth); private: MainReportsUiState& mMainReportsState; diff --git a/OPHD/States/MapViewStateTurn.cpp b/OPHD/States/MapViewStateTurn.cpp index 3bf4222da..468f639b5 100644 --- a/OPHD/States/MapViewStateTurn.cpp +++ b/OPHD/States/MapViewStateTurn.cpp @@ -237,6 +237,7 @@ void MapViewState::updateMorale() "Baby Born", std::to_string(birthCount) + (birthCount > 1 ? " babies were born." : " baby was born."), {-1, -1}, + 0, NotificationArea::NotificationType::Information); } @@ -246,6 +247,7 @@ void MapViewState::updateMorale() "Colonist Died", std::to_string(deathCount) + (birthCount > 1 ? " colonists met their demise." : " colonist met their demise."), {-1, -1}, + 0, NotificationArea::NotificationType::Warning); } } @@ -530,12 +532,15 @@ void MapViewState::checkAgingStructures() for (auto structure : structures) { + const auto& structureTile = NAS2D::Utility::get().tileFromStructure(structure); + if (structure->age() == structure->maxAge() - 10) { mNotificationArea.push( "Aging Structure", structure->name() + " is getting old. You should replace it soon.", - NAS2D::Utility::get().tileFromStructure(structure).position(), + structureTile.position(), + structureTile.depth(), NotificationArea::NotificationType::Warning); } else if (structure->age() == structure->maxAge() - 5) @@ -543,7 +548,8 @@ void MapViewState::checkAgingStructures() mNotificationArea.push( "Aging Structure", structure->name() + " is about to collapse. You should replace it right away or consider demolishing it.", - NAS2D::Utility::get().tileFromStructure(structure).position(), + structureTile.position(), + structureTile.depth(), NotificationArea::NotificationType::Critical); } } @@ -556,10 +562,13 @@ void MapViewState::checkNewlyBuiltStructures() for (auto structure : structures) { + const auto& structureTile = NAS2D::Utility::get().tileFromStructure(structure); + mNotificationArea.push( "Construction Finished", structure->name() + " completed construction.", - NAS2D::Utility::get().tileFromStructure(structure).position(), + structureTile.position(), + structureTile.depth(), NotificationArea::NotificationType::Information); } } diff --git a/OPHD/States/MapViewStateUi.cpp b/OPHD/States/MapViewStateUi.cpp index 7d3f8aee7..8a722d490 100644 --- a/OPHD/States/MapViewStateUi.cpp +++ b/OPHD/States/MapViewStateUi.cpp @@ -705,9 +705,10 @@ void MapViewState::onFileIoAction(const std::string& filePath, FileIo::FileOpera } -void MapViewState::onNotificationWindowTakeMeThere(NAS2D::Point position) +void MapViewState::onNotificationWindowTakeMeThere(NAS2D::Point position, int depth) { mTileMap->centerMapOnTile(&mTileMap->getTile(position)); + mTileMap->currentDepth(depth); } diff --git a/OPHD/UI/NotificationArea.cpp b/OPHD/UI/NotificationArea.cpp index 4996a57b6..9738b2c00 100644 --- a/OPHD/UI/NotificationArea.cpp +++ b/OPHD/UI/NotificationArea.cpp @@ -77,9 +77,9 @@ NotificationArea::~NotificationArea() } -void NotificationArea::push(const std::string& brief, const std::string& message, NAS2D::Point position, NotificationType type) +void NotificationArea::push(const std::string& brief, const std::string& message, NAS2D::Point position, int depth, NotificationType type) { - mNotificationList.emplace_back(Notification{brief, message, position, type}); + mNotificationList.emplace_back(Notification{brief, message, position, depth, type}); const int posX = positionX() + (Width / 2) - 16; const int posY = positionY() + size().y - (Offset * static_cast(mNotificationList.size())); diff --git a/OPHD/UI/NotificationArea.h b/OPHD/UI/NotificationArea.h index 29f98b056..bdea2bb6b 100644 --- a/OPHD/UI/NotificationArea.h +++ b/OPHD/UI/NotificationArea.h @@ -27,6 +27,7 @@ class NotificationArea : public Control std::string brief{""}; std::string message{""}; NAS2D::Point position{-1, -1}; + int depth{0}; NotificationType type{NotificationType::Information}; }; @@ -38,7 +39,7 @@ class NotificationArea : public Control NotificationArea(); ~NotificationArea() override; - void push(const std::string& brief, const std::string& message, NAS2D::Point position, NotificationType type); + void push(const std::string& brief, const std::string& message, NAS2D::Point position, int depth, NotificationType type); void clear() { diff --git a/OPHD/UI/NotificationWindow.cpp b/OPHD/UI/NotificationWindow.cpp index 76df17c16..00f3ccd1b 100644 --- a/OPHD/UI/NotificationWindow.cpp +++ b/OPHD/UI/NotificationWindow.cpp @@ -48,7 +48,7 @@ void NotificationWindow::btnOkayClicked() void NotificationWindow::btnTakeMeThereClicked() { - mTakeMeThereClicked(mNotification.position); + mTakeMeThereClicked(mNotification.position, mNotification.depth); hide(); } diff --git a/OPHD/UI/NotificationWindow.h b/OPHD/UI/NotificationWindow.h index 3c147ecda..f82481dc8 100644 --- a/OPHD/UI/NotificationWindow.h +++ b/OPHD/UI/NotificationWindow.h @@ -11,7 +11,7 @@ class NotificationWindow : public Window { public: - using Signal = NAS2D::Signal>; + using Signal = NAS2D::Signal, int>; public: NotificationWindow(); From 62193dbb03e312da3ba55ed9ace8938efba9e712 Mon Sep 17 00:00:00 2001 From: ldicker83 Date: Mon, 27 Sep 2021 06:18:57 -0400 Subject: [PATCH 7/7] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9793d1f09..109e0e635 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ Introduces integrity decay and the Maintenance Facility. - Fixed a mistake in route cost calculation that caused extremely low movement of resources - Fixed an issue that made it impossible to place robots before the Command Center was built - Fixed an issue that caused roads to be set to an incorrect animation state during loading +- Fixed an issue where the "Take Me There" button on the Notification Window failed to set the tilemap depth ## [0.8.3] - 2021-06-6