diff --git a/appOPHD/States/MapViewState.cpp b/appOPHD/States/MapViewState.cpp index 907dd5596..14a03cd16 100644 --- a/appOPHD/States/MapViewState.cpp +++ b/appOPHD/States/MapViewState.cpp @@ -28,6 +28,7 @@ #include +#include #include #include #include @@ -139,7 +140,7 @@ namespace { notificationArea.push({ "Aging Robot", - "Robot '" + robot->name() + "' at location " + std::string{position.xy} + " is approaching its maximum age.", + "Robot '" + robot->name() + "' at location " + NAS2D::stringFrom(position.xy) + " is approaching its maximum age.", position, NotificationArea::NotificationType::Warning}); } @@ -147,7 +148,7 @@ namespace { notificationArea.push({ "Aging Robot", - "Robot '" + robot->name() + "' at location " + std::string{position.xy} + " will fail in a few turns. Replace immediately.", + "Robot '" + robot->name() + "' at location " + NAS2D::stringFrom(position.xy) + " will fail in a few turns. Replace immediately.", position, NotificationArea::NotificationType::Critical}); } @@ -1111,7 +1112,7 @@ void MapViewState::placeRobodigger(Tile& tile) const auto position = tile.xy(); mNotificationArea.push({ "Mine destroyed", - "Digger destroyed a Mine at " + std::string{position} + ".", + "Digger destroyed a Mine at " + NAS2D::stringFrom(position) + ".", tile.xyz(), NotificationArea::NotificationType::Information}); mTileMap->removeMineLocation(position); @@ -1293,14 +1294,14 @@ void MapViewState::updateRobots() { mNotificationArea.push({ "Robot Self-Destructed", - robot->name() + " at location " + std::string{position.xy} + " self destructed.", + robot->name() + " at location " + NAS2D::stringFrom(position.xy) + " self destructed.", position, NotificationArea::NotificationType::Critical }); } else if (robot->type() != Robot::Type::Miner) { - const auto text = "Your " + robot->name() + " at location " + std::string{position.xy} + " has broken down. It will not be able to complete its task and will be removed from your inventory."; + const auto text = "Your " + robot->name() + " at location " + NAS2D::stringFrom(position.xy) + " 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}); robot->abortTask(*tile); } @@ -1323,7 +1324,7 @@ void MapViewState::updateRobots() mNotificationArea.push({ "Robot Task Completed", - robot->name() + " completed its task at " + std::string{tile->xy()} + ".", + robot->name() + " completed its task at " + NAS2D::stringFrom(tile->xy()) + ".", tile->xyz(), NotificationArea::NotificationType::Success }); @@ -1338,7 +1339,7 @@ void MapViewState::updateRobots() mNotificationArea.push({ "Robot Task Canceled", - robot->name() + " canceled its task at " + std::string{tile->xy()} + ".", + robot->name() + " canceled its task at " + NAS2D::stringFrom(tile->xy()) + ".", tile->xyz(), NotificationArea::NotificationType::Information }); diff --git a/appOPHD/UI/Reports/MineReport.cpp b/appOPHD/UI/Reports/MineReport.cpp index fd490a670..694a4827b 100644 --- a/appOPHD/UI/Reports/MineReport.cpp +++ b/appOPHD/UI/Reports/MineReport.cpp @@ -21,6 +21,7 @@ #include +#include #include #include @@ -38,7 +39,7 @@ namespace { const auto& structureManager = NAS2D::Utility::get(); const auto& surfaceLocation = structureManager.tileFromStructure(&structure).xy(); - return structure.name() + " at " + std::string{surfaceLocation}; + return structure.name() + " at " + NAS2D::stringFrom(surfaceLocation); } } diff --git a/appOPHD/UI/TileInspector.cpp b/appOPHD/UI/TileInspector.cpp index 2b5f4dd69..e5dcec84c 100644 --- a/appOPHD/UI/TileInspector.cpp +++ b/appOPHD/UI/TileInspector.cpp @@ -8,6 +8,8 @@ #include +#include + #include #include @@ -60,7 +62,7 @@ void TileInspector::update() auto position = mRect.position + NAS2D::Vector{5, 25}; const auto tilePosition = mTile->xy(); - drawLabelAndValue(position, "Location: ", std::string{tilePosition}); + drawLabelAndValue(position, "Location: ", NAS2D::stringFrom(tilePosition)); position.y += lineSpacing; drawLabelAndValue(position, "Terrain: ", terrainTypeStringTable.at(mTile->index())); diff --git a/libControls/Control.h b/libControls/Control.h index c1ce1136d..0a0f47509 100644 --- a/libControls/Control.h +++ b/libControls/Control.h @@ -4,6 +4,8 @@ #include #include +#include + namespace NAS2D { diff --git a/nas2d-core b/nas2d-core index 8a291877e..0a5d78e7b 160000 --- a/nas2d-core +++ b/nas2d-core @@ -1 +1 @@ -Subproject commit 8a291877e5e68ff39b3e0275bec2cb8ed7824d77 +Subproject commit 0a5d78e7b67d6dedf01cc0b2f94d120124eababf