1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Remove deprecated objects from map editor

This commit is contained in:
nordsoft 2023-05-01 15:52:35 +04:00 committed by Nordsoft91
parent fdac1d66d8
commit a507a4c1ec

View File

@ -540,19 +540,16 @@ void MainWindow::addGroupIntoCatalog(const std::string & groupName, bool useCust
//create object to extract name //create object to extract name
std::unique_ptr<CGObjectInstance> temporaryObj(factory->create(templ)); std::unique_ptr<CGObjectInstance> temporaryObj(factory->create(templ));
QString translated = useCustomName ? tr(temporaryObj->getObjectName().c_str()) : subGroupName; QString translated = useCustomName ? tr(temporaryObj->getObjectName().c_str()) : subGroupName;
itemType->setText(translated);
//do not have extra level //do not have extra level
if(singleTemplate) if(singleTemplate)
{ {
if(useCustomName)
itemType->setText(translated);
itemType->setIcon(QIcon(preview)); itemType->setIcon(QIcon(preview));
itemType->setData(data); itemType->setData(data);
} }
else else
{ {
if(useCustomName)
itemType->setText(translated);
auto * item = new QStandardItem(QIcon(preview), QString::fromStdString(templ->stringID)); auto * item = new QStandardItem(QIcon(preview), QString::fromStdString(templ->stringID));
item->setData(data); item->setData(data);
itemType->appendRow(item); itemType->appendRow(item);
@ -623,9 +620,7 @@ void MainWindow::loadObjectsTree()
addGroupIntoCatalog("TOWNS", true, false, Obj::SHIPYARD); addGroupIntoCatalog("TOWNS", true, false, Obj::SHIPYARD);
addGroupIntoCatalog("TOWNS", true, false, Obj::GARRISON); addGroupIntoCatalog("TOWNS", true, false, Obj::GARRISON);
addGroupIntoCatalog("TOWNS", true, false, Obj::GARRISON2); addGroupIntoCatalog("TOWNS", true, false, Obj::GARRISON2);
addGroupIntoCatalog("OBJECTS", true, false, Obj::ALTAR_OF_SACRIFICE);
addGroupIntoCatalog("OBJECTS", true, false, Obj::ARENA); addGroupIntoCatalog("OBJECTS", true, false, Obj::ARENA);
addGroupIntoCatalog("OBJECTS", true, false, Obj::BLACK_MARKET);
addGroupIntoCatalog("OBJECTS", true, false, Obj::BUOY); addGroupIntoCatalog("OBJECTS", true, false, Obj::BUOY);
addGroupIntoCatalog("OBJECTS", true, false, Obj::CARTOGRAPHER); addGroupIntoCatalog("OBJECTS", true, false, Obj::CARTOGRAPHER);
addGroupIntoCatalog("OBJECTS", true, false, Obj::SWAN_POND); addGroupIntoCatalog("OBJECTS", true, false, Obj::SWAN_POND);
@ -662,17 +657,13 @@ void MainWindow::loadObjectsTree()
addGroupIntoCatalog("OBJECTS", true, false, Obj::TAVERN); addGroupIntoCatalog("OBJECTS", true, false, Obj::TAVERN);
addGroupIntoCatalog("OBJECTS", true, false, Obj::TEMPLE); addGroupIntoCatalog("OBJECTS", true, false, Obj::TEMPLE);
addGroupIntoCatalog("OBJECTS", true, false, Obj::DEN_OF_THIEVES); addGroupIntoCatalog("OBJECTS", true, false, Obj::DEN_OF_THIEVES);
addGroupIntoCatalog("OBJECTS", true, false, Obj::TRADING_POST);
addGroupIntoCatalog("OBJECTS", true, false, Obj::TRADING_POST_SNOW);
addGroupIntoCatalog("OBJECTS", true, false, Obj::LEARNING_STONE); addGroupIntoCatalog("OBJECTS", true, false, Obj::LEARNING_STONE);
addGroupIntoCatalog("OBJECTS", true, false, Obj::TREE_OF_KNOWLEDGE); addGroupIntoCatalog("OBJECTS", true, false, Obj::TREE_OF_KNOWLEDGE);
addGroupIntoCatalog("OBJECTS", true, false, Obj::UNIVERSITY);
addGroupIntoCatalog("OBJECTS", true, false, Obj::WAGON); addGroupIntoCatalog("OBJECTS", true, false, Obj::WAGON);
addGroupIntoCatalog("OBJECTS", true, false, Obj::SCHOOL_OF_WAR); addGroupIntoCatalog("OBJECTS", true, false, Obj::SCHOOL_OF_WAR);
addGroupIntoCatalog("OBJECTS", true, false, Obj::WAR_MACHINE_FACTORY); addGroupIntoCatalog("OBJECTS", true, false, Obj::WAR_MACHINE_FACTORY);
addGroupIntoCatalog("OBJECTS", true, false, Obj::WARRIORS_TOMB); addGroupIntoCatalog("OBJECTS", true, false, Obj::WARRIORS_TOMB);
addGroupIntoCatalog("OBJECTS", true, false, Obj::WITCH_HUT); addGroupIntoCatalog("OBJECTS", true, false, Obj::WITCH_HUT);
addGroupIntoCatalog("OBJECTS", true, false, Obj::FREELANCERS_GUILD);
addGroupIntoCatalog("OBJECTS", true, false, Obj::SANCTUARY); addGroupIntoCatalog("OBJECTS", true, false, Obj::SANCTUARY);
addGroupIntoCatalog("OBJECTS", true, false, Obj::MARLETTO_TOWER); addGroupIntoCatalog("OBJECTS", true, false, Obj::MARLETTO_TOWER);
addGroupIntoCatalog("HEROES", true, false, Obj::PRISON); addGroupIntoCatalog("HEROES", true, false, Obj::PRISON);