diff --git a/config/rivers.json b/config/rivers.json index 666cf53cf..b9cc138dd 100644 --- a/config/rivers.json +++ b/config/rivers.json @@ -2,6 +2,7 @@ "waterRiver": { "index": 1, + "text" : "Water river", "shortIdentifier": "rw", //must be 2 characters "tilesFilename": "clrrvr", "delta": "clrdelt" @@ -9,6 +10,7 @@ "iceRiver": { "index": 2, + "text" : "Ice river", "shortIdentifier": "ri", "tilesFilename": "icyrvr", "delta": "icedelt" @@ -16,6 +18,7 @@ "mudRiver": { "index": 3, + "text" : "Mud river", "shortIdentifier": "rm", "tilesFilename": "mudrvr", "delta": "muddelt" @@ -23,6 +26,7 @@ "lavaRiver": { "index": 4, + "text" : "Lava river", "shortIdentifier": "rl", "tilesFilename": "lavrvr", "delta": "lavdelt" diff --git a/config/roads.json b/config/roads.json index 76f5f4d9d..b0fc2d79d 100644 --- a/config/roads.json +++ b/config/roads.json @@ -2,6 +2,7 @@ "dirtRoad": { "index": 1, + "text" : "Dirt road", "shortIdentifier": "pd", //must be 2 characters "tilesFilename": "dirtrd", "moveCost": 75 @@ -9,6 +10,7 @@ "gravelRoad": { "index": 2, + "text" : "Gravel road", "shortIdentifier": "pg", "tilesFilename": "gravrd", "moveCost": 65 @@ -16,6 +18,7 @@ "cobblestoneRoad": { "index": 3, + "text" : "Cobblestone road", "shortIdentifier": "pc", "tilesFilename": "cobbrd", "moveCost": 50 diff --git a/mapeditor/mainwindow.cpp b/mapeditor/mainwindow.cpp index 8e0834445..10a541abe 100644 --- a/mapeditor/mainwindow.cpp +++ b/mapeditor/mainwindow.cpp @@ -557,7 +557,7 @@ void MainWindow::loadObjectsTree() //adding roads for(auto & road : VLC->roadTypeHandler->objects) { - QPushButton *b = new QPushButton(QString::fromStdString(road->tilesFilename)); + QPushButton *b = new QPushButton(QString::fromStdString(road->getNameTranslated())); ui->roadLayout->addWidget(b); connect(b, &QPushButton::clicked, this, [this, road]{ roadOrRiverButtonClicked(road->getIndex(), true); }); } @@ -566,7 +566,7 @@ void MainWindow::loadObjectsTree() //adding rivers for(auto & river : VLC->riverTypeHandler->objects) { - QPushButton *b = new QPushButton(QString::fromStdString(river->tilesFilename)); + QPushButton *b = new QPushButton(QString::fromStdString(river->getNameTranslated())); ui->riverLayout->addWidget(b); connect(b, &QPushButton::clicked, this, [this, river]{ roadOrRiverButtonClicked(river->getIndex(), false); }); } diff --git a/mapeditor/mainwindow.h b/mapeditor/mainwindow.h index c79e0d377..2a48de091 100644 --- a/mapeditor/mainwindow.h +++ b/mapeditor/mainwindow.h @@ -4,7 +4,6 @@ #include #include #include "mapcontroller.h" -//#include "../lib/TerrainHandler.h" #include "resourceExtractor/ResourceConverter.h" class ObjectBrowser; diff --git a/mapeditor/mapcontroller.h b/mapeditor/mapcontroller.h index 5ecd6c637..338798201 100644 --- a/mapeditor/mapcontroller.h +++ b/mapeditor/mapcontroller.h @@ -13,7 +13,6 @@ #include "maphandler.h" #include "mapview.h" #include "../lib/mapping/CMap.h" -//#include "../lib/TerrainHandler.h" class MainWindow; class MapController