From 54a4143f82edada1115b5e9b02ba56d2d19fc162 Mon Sep 17 00:00:00 2001 From: Cubitect Date: Thu, 21 Apr 2022 13:45:27 +0200 Subject: [PATCH] Updates for MC 1.19: 1) added deep_dark and mangrove_swamp biomes 2) added ancient_cities to map and search 3) renamed filter dialog to condition editor to improve naming consistency 3) fixed selection of filter preset --- cubiomes | 2 +- cubiomes-viewer.pro | 6 +- rc/icons.qrc | 2 + rc/icons/ancient_city.png | Bin 0 -> 5688 bytes rc/icons/ancient_city_d.png | Bin 0 -> 5232 bytes rc/icons/hut_d.png | Bin 489 -> 703 bytes rc/icons/igloo_d.png | Bin 433 -> 636 bytes rc/icons/ruins_d.png | Bin 417 -> 665 bytes rc/icons/shipwreck_d.png | Bin 387 -> 546 bytes src/aboutdialog.h | 4 +- src/aboutdialog.ui | 16 ++-- src/{filterdialog.cpp => conditiondialog.cpp} | 69 +++++++++--------- src/{filterdialog.h => conditiondialog.h} | 18 ++--- src/{filterdialog.ui => conditiondialog.ui} | 36 ++++----- src/extgendialog.cpp | 1 + src/formconditions.cpp | 6 +- src/mainwindow.cpp | 3 +- src/mainwindow.ui | 44 +++++++++-- src/presetdialog.cpp | 8 ++ src/presetdialog.h | 1 + src/quad.cpp | 6 ++ src/quad.h | 4 + src/search.h | 40 ++++++---- 23 files changed, 165 insertions(+), 101 deletions(-) create mode 100644 rc/icons/ancient_city.png create mode 100644 rc/icons/ancient_city_d.png rename src/{filterdialog.cpp => conditiondialog.cpp} (94%) rename src/{filterdialog.h => conditiondialog.h} (91%) rename src/{filterdialog.ui => conditiondialog.ui} (97%) diff --git a/cubiomes b/cubiomes index 136e645..0933804 160000 --- a/cubiomes +++ b/cubiomes @@ -1 +1 @@ -Subproject commit 136e645ce9c54cb24c659b29a24fa6f8361a3fef +Subproject commit 0933804f15f4de107f0a1703f508521625292f87 diff --git a/cubiomes-viewer.pro b/cubiomes-viewer.pro index b9a31ac..00f5592 100644 --- a/cubiomes-viewer.pro +++ b/cubiomes-viewer.pro @@ -37,6 +37,7 @@ CONFIG += static SOURCES += \ src/aboutdialog.cpp \ src/collapsible.cpp \ + src/conditiondialog.cpp \ src/configdialog.cpp \ src/extgendialog.cpp \ src/formconditions.cpp \ @@ -45,7 +46,6 @@ SOURCES += \ src/gotodialog.cpp \ src/presetdialog.cpp \ src/protobasedialog.cpp \ - src/filterdialog.cpp \ src/quadlistdialog.cpp \ src/mapview.cpp \ src/quad.cpp \ @@ -63,6 +63,7 @@ HEADERS += \ $$CUPATH/util.h \ src/aboutdialog.h \ src/collapsible.h \ + src/conditiondialog.h \ src/configdialog.h \ src/extgendialog.h \ src/formconditions.h \ @@ -71,7 +72,6 @@ HEADERS += \ src/gotodialog.h \ src/presetdialog.h \ src/protobasedialog.h \ - src/filterdialog.h \ src/quadlistdialog.h \ src/mapview.h \ src/quad.h \ @@ -86,6 +86,7 @@ HEADERS += \ FORMS += \ src/aboutdialog.ui \ + src/conditiondialog.ui \ src/configdialog.ui \ src/extgendialog.ui \ src/formconditions.ui \ @@ -94,7 +95,6 @@ FORMS += \ src/gotodialog.ui \ src/presetdialog.ui \ src/protobasedialog.ui \ - src/filterdialog.ui \ src/quadlistdialog.ui\ src/mainwindow.ui \ src/rangedialog.ui diff --git a/rc/icons.qrc b/rc/icons.qrc index 58ce0c8..2f89bd9 100644 --- a/rc/icons.qrc +++ b/rc/icons.qrc @@ -63,5 +63,7 @@ icons/mineshaft_d.png icons/helper.png icons/reference.png + icons/ancient_city_d.png + icons/ancient_city.png diff --git a/rc/icons/ancient_city.png b/rc/icons/ancient_city.png new file mode 100644 index 0000000000000000000000000000000000000000..76cceab2724d735886f87ac5a6b6e0a664342e31 GIT binary patch literal 5688 zcmV-87RTv{P)pZ8+ue&bW&k=AaHVTW@&6?Aar?fWgumEX=VTbXo0PoX>ubuvV{NR z6mtaZ%W<%p%?;l1=Zip6qExEt?wKc=L@E~`5R1D9l4k$kzmNGBKdI$vVk$MaoGm}G z#pXL7s=Yr=|2iA>@BJq}=iJxh#^vX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~@Fl_AS{*%ZGc^NFXt}xPSpSU}RwUb`3-_FkIFREMeuxqZS+BECN~xq(1<$NIIC! z$O2*~LD&)?c6mub36QM=VkZ|Af!IJ7Gw>9J1UUoQK0vlWI)4&735lJOTAU1I#{k*U z2*2geXJD}S!oa{h5h0c|je%i%I|GBnZG@Q0LIwu@RtAP`R}f;K1Ht}f6gyLrT2TTL z@zZx?C`c?yg!_ug*a%`TER3iM0B6}THQeqQVgLXD32;bRa{vGi!TyUJdz6LT7G5IG#Cd2bLAymz%GZPuM2ca@VsVw(M zRfP8Lnv&$;%DKb*VdNCw5(1wrUnOhUC njk3h5)Y=U1vZ~P!VzD{_Sl(O?6hW<500000NkvXXu0mjfG?lM+ delta 276 zcmZ3)(#$+TvYr75Ry=aL2&7oj9eo`c7&i8E|4C#8@)eRjf_xbms?-=58d?|_egTCV zUNA6}8Za=tN?>5Hn!&&zUNC1@pbb!hsU*lRn1P{e@>vTIFUi~8h2ejD|C#+j9%q3^ zWHAE+-yslY6xHx*01C2~c>21sKdI*s6;t4R=!C_Ec3VRa#l7_a(Kyni^79m-76#a`{)Lj+0W-JX{LP85kz> RF(z{|c)I$ztaD0e0sz{xTzdcj diff --git a/src/aboutdialog.h b/src/aboutdialog.h index 11f5e4d..e1e0956 100644 --- a/src/aboutdialog.h +++ b/src/aboutdialog.h @@ -5,8 +5,8 @@ #include #define VERS_MAJOR 2 -#define VERS_MINOR 1 -#define VERS_PATCH 1 // negative patch number designates a development version +#define VERS_MINOR 2 +#define VERS_PATCH -1 // negative patch number designates a development version // returns +1 if newer, -1 if older and 0 if equal inline int cmpVers(int major, int minor, int patch) diff --git a/src/aboutdialog.ui b/src/aboutdialog.ui index d5e6f30..8a8ddf8 100644 --- a/src/aboutdialog.ui +++ b/src/aboutdialog.ui @@ -2,17 +2,13 @@ AboutDialog - - - 0 - 0 - 609 - 343 - - About + + + :/icons/map.png:/icons/map.png + @@ -30,7 +26,7 @@ - :/icons/map.png + :/icons/map.png Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop @@ -47,7 +43,7 @@ - + diff --git a/src/filterdialog.cpp b/src/conditiondialog.cpp similarity index 94% rename from src/filterdialog.cpp rename to src/conditiondialog.cpp index 99b1c1f..9f0fc70 100644 --- a/src/filterdialog.cpp +++ b/src/conditiondialog.cpp @@ -1,5 +1,5 @@ -#include "filterdialog.h" -#include "ui_filterdialog.h" +#include "conditiondialog.h" +#include "ui_conditiondialog.h" #include "mainwindow.h" #include "cutil.h" @@ -32,7 +32,7 @@ static QString getTip(int mc, int layer, int id) { uint64_t mL = 0, mM = 0; genPotential(&mL, &mM, layer, mc, id); - QString tip = FilterDialog::tr("Generates any of:"); + QString tip = ConditionDialog::tr("Generates any of:"); for (int j = 0; j < 64; j++) if (mL & (1ULL << j)) tip += QString("\n") + biome2str(mc, j); @@ -42,7 +42,7 @@ static QString getTip(int mc, int layer, int id) return tip; } -void FilterDialog::addVariant(QString name, int biome, int variant) +void ConditionDialog::addVariant(QString name, int biome, int variant) { VariantCheckBox *cb = new VariantCheckBox(name, biome, variant); ui->gridLayoutVariants->addWidget(cb, variantboxes.size(), 0); @@ -51,9 +51,9 @@ void FilterDialog::addVariant(QString name, int biome, int variant) #define WARNING_CHAR QChar(0x26A0) -FilterDialog::FilterDialog(FormConditions *parent, Config *config, int mcversion, QListWidgetItem *item, Condition *initcond) +ConditionDialog::ConditionDialog(FormConditions *parent, Config *config, int mcversion, QListWidgetItem *item, Condition *initcond) : QDialog(parent, Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint) - , ui(new Ui::FilterDialog) + , ui(new Ui::ConditionDialog) , config(config) , item(item) , mc(mcversion) @@ -204,6 +204,9 @@ FilterDialog::FilterDialog(FormConditions *parent, Config *config, int mcversion SETUP_BIOME_CHECKBOX(jagged_peaks); SETUP_BIOME_CHECKBOX(frozen_peaks); + SETUP_BIOME_CHECKBOX(deep_dark); + SETUP_BIOME_CHECKBOX(mangrove_swamp); + memset(tempsboxes, 0, sizeof(tempsboxes)); SETUP_TEMPCAT_SPINBOX(Oceanic); @@ -265,7 +268,7 @@ FilterDialog::FilterDialog(FormConditions *parent, Config *config, int mcversion QCheckBox *all = new QCheckBox(this); all->setFixedWidth(20); - all->setToolTip(tr("Require the complete range")); + all->setToolTip(tr("Require full range instead of intersection")); connect(all, SIGNAL(stateChanged(int)), this, SLOT(onClimateLimitChanged(void))); climatecomplete[climates[i].idx] = all; @@ -438,14 +441,14 @@ FilterDialog::FilterDialog(FormConditions *parent, Config *config, int mcversion updateMode(); } -FilterDialog::~FilterDialog() +ConditionDialog::~ConditionDialog() { if (item) delete item; delete ui; } -void FilterDialog::setActiveTab(QWidget *tab) +void ConditionDialog::setActiveTab(QWidget *tab) { ui->tabWidget->setEnabled(true); ui->tabWidget->setCurrentWidget(tab); @@ -455,7 +458,7 @@ void FilterDialog::setActiveTab(QWidget *tab) ui->tabVariants->setEnabled(ui->tabVariants == tab); } -void FilterDialog::updateMode() +void ConditionDialog::updateMode() { int filterindex = ui->comboBoxType->currentData().toInt(); const FilterInfo &ft = g_filterinfo.list[filterindex]; @@ -581,7 +584,7 @@ void FilterDialog::updateMode() textDescription->setText(ft.description); } -void FilterDialog::enableSet(const int *ids, int n) +void ConditionDialog::enableSet(const int *ids, int n) { for (int i = 0; i < 256; i++) { @@ -595,7 +598,7 @@ void FilterDialog::enableSet(const int *ids, int n) biomecboxes[ids[i]]->setEnabled(true); } -void FilterDialog::updateBiomeSelection() +void ConditionDialog::updateBiomeSelection() { int filterindex = ui->comboBoxType->currentData().toInt(); const FilterInfo &ft = g_filterinfo.list[filterindex]; @@ -692,7 +695,7 @@ void FilterDialog::updateBiomeSelection() } } -int FilterDialog::warnIfBad(Condition cond) +int ConditionDialog::warnIfBad(Condition cond) { const FilterInfo &ft = g_filterinfo.list[cond.type]; if (ui->scrollVariants->isEnabled()) @@ -740,12 +743,12 @@ int FilterDialog::warnIfBad(Condition cond) return QMessageBox::Ok; } -void FilterDialog::on_comboBoxType_activated(int) +void ConditionDialog::on_comboBoxType_activated(int) { updateMode(); } -void FilterDialog::on_comboBoxRelative_activated(int) +void ConditionDialog::on_comboBoxRelative_activated(int) { QPalette pal; if (ui->comboBoxRelative->currentText().contains(WARNING_CHAR)) @@ -753,7 +756,7 @@ void FilterDialog::on_comboBoxRelative_activated(int) ui->comboBoxRelative->setPalette(pal); } -void FilterDialog::on_buttonUncheck_clicked() +void ConditionDialog::on_buttonUncheck_clicked() { for (int i = 0; i < 256; i++) { @@ -763,7 +766,7 @@ void FilterDialog::on_buttonUncheck_clicked() } } -void FilterDialog::on_buttonInclude_clicked() +void ConditionDialog::on_buttonInclude_clicked() { for (int i = 0; i < 256; i++) { @@ -773,7 +776,7 @@ void FilterDialog::on_buttonInclude_clicked() } } -void FilterDialog::on_buttonExclude_clicked() +void ConditionDialog::on_buttonExclude_clicked() { for (int i = 0; i < 256; i++) { @@ -783,7 +786,7 @@ void FilterDialog::on_buttonExclude_clicked() } } -void FilterDialog::on_buttonAreaInfo_clicked() +void ConditionDialog::on_buttonAreaInfo_clicked() { QMessageBox mb(this); mb.setIcon(QMessageBox::Information); @@ -811,22 +814,22 @@ void FilterDialog::on_buttonAreaInfo_clicked() mb.exec(); } -void FilterDialog::on_checkRadius_toggled(bool) +void ConditionDialog::on_checkRadius_toggled(bool) { updateMode(); } -void FilterDialog::on_radioSquare_toggled(bool) +void ConditionDialog::on_radioSquare_toggled(bool) { updateMode(); } -void FilterDialog::on_radioCustom_toggled(bool) +void ConditionDialog::on_radioCustom_toggled(bool) { updateMode(); } -void FilterDialog::on_lineSquare_editingFinished() +void ConditionDialog::on_lineSquare_editingFinished() { int v = ui->lineSquare->text().toInt(); int area = (v+1) * (v+1); @@ -837,12 +840,12 @@ void FilterDialog::on_lineSquare_editingFinished() } } -void FilterDialog::on_buttonCancel_clicked() +void ConditionDialog::on_buttonCancel_clicked() { close(); } -void FilterDialog::on_buttonOk_clicked() +void ConditionDialog::on_buttonOk_clicked() { Condition c = cond; c.type = ui->comboBoxType->currentData().toInt(); @@ -926,20 +929,20 @@ void FilterDialog::on_buttonOk_clicked() close(); } -void FilterDialog::on_FilterDialog_finished(int result) +void ConditionDialog::on_ConditionDialog_finished(int result) { if (item) emit setCond(item, cond, result); item = 0; } -void FilterDialog::on_comboBoxCat_currentIndexChanged(int idx) +void ConditionDialog::on_comboBoxCat_currentIndexChanged(int idx) { ui->comboBoxType->setEnabled(idx != CAT_NONE); ui->comboBoxType->clear(); int slot = 0; - ui->comboBoxType->insertItem(slot, tr("Select filter"), QVariant::fromValue((int)F_SELECT)); + ui->comboBoxType->insertItem(slot, tr("Select type"), QVariant::fromValue((int)F_SELECT)); const FilterInfo *ft_list[FILTER_MAX] = {}; const FilterInfo *ft; @@ -974,12 +977,12 @@ void FilterDialog::on_comboBoxCat_currentIndexChanged(int idx) updateMode(); } -void FilterDialog::on_checkStartPiece_stateChanged(int state) +void ConditionDialog::on_checkStartPiece_stateChanged(int state) { ui->scrollVariants->setEnabled(state); } -void FilterDialog::getClimateLimits(int limok[6][2], int limex[6][2]) +void ConditionDialog::getClimateLimits(int limok[6][2], int limex[6][2]) { getClimateLimits(climaterange[0], limok); getClimateLimits(climaterange[1], limex); @@ -1006,7 +1009,7 @@ void FilterDialog::getClimateLimits(int limok[6][2], int limex[6][2]) } } -void FilterDialog::getClimateLimits(LabeledRange *ranges[6], int limits[6][2]) +void ConditionDialog::getClimateLimits(LabeledRange *ranges[6], int limits[6][2]) { for (int i = 0; i < 6; i++) { @@ -1025,7 +1028,7 @@ void FilterDialog::getClimateLimits(LabeledRange *ranges[6], int limits[6][2]) } } -void FilterDialog::setClimateLimits(LabeledRange *ranges[6], int limits[6][2], bool complete) +void ConditionDialog::setClimateLimits(LabeledRange *ranges[6], int limits[6][2], bool complete) { for (int i = 0; i < 6; i++) { @@ -1050,7 +1053,7 @@ void FilterDialog::setClimateLimits(LabeledRange *ranges[6], int limits[6][2], b } } -void FilterDialog::onClimateLimitChanged() +void ConditionDialog::onClimateLimitChanged() { int limok[6][2], limex[6][2]; char ok[256], ex[256]; diff --git a/src/filterdialog.h b/src/conditiondialog.h similarity index 91% rename from src/filterdialog.h rename to src/conditiondialog.h index 5f9d043..4064fe6 100644 --- a/src/filterdialog.h +++ b/src/conditiondialog.h @@ -1,5 +1,5 @@ -#ifndef FILTERDIALOG_H -#define FILTERDIALOG_H +#ifndef CONDITIONDIALOG_H +#define CONDITIONDIALOG_H #include #include @@ -16,7 +16,7 @@ class MainWindow; namespace Ui { -class FilterDialog; +class ConditionDialog; } class SpinExclude : public QSpinBox @@ -113,14 +113,14 @@ public: } }; -class FilterDialog : public QDialog +class ConditionDialog : public QDialog { Q_OBJECT public: - explicit FilterDialog(FormConditions *parent, Config *config, int mc, QListWidgetItem *item = 0, Condition *initcond = 0); - virtual ~FilterDialog(); + explicit ConditionDialog(FormConditions *parent, Config *config, int mc, QListWidgetItem *item = 0, Condition *initcond = 0); + virtual ~ConditionDialog(); void addVariant(QString name, int biome, int variant); void setActiveTab(QWidget *tab); @@ -158,7 +158,7 @@ private slots: void on_buttonOk_clicked(); - void on_FilterDialog_finished(int result); + void on_ConditionDialog_finished(int result); void on_comboBoxCat_currentIndexChanged(int index); @@ -167,7 +167,7 @@ private slots: void onClimateLimitChanged(); private: - Ui::FilterDialog *ui; + Ui::ConditionDialog *ui; QTextEdit *textDescription; QCheckBox *biomecboxes[256]; @@ -184,4 +184,4 @@ public: int mc; }; -#endif // FILTERDIALOG_H +#endif // CONDITIONDIALOG_H diff --git a/src/filterdialog.ui b/src/conditiondialog.ui similarity index 97% rename from src/filterdialog.ui rename to src/conditiondialog.ui index 8aff9a6..e91438c 100644 --- a/src/filterdialog.ui +++ b/src/conditiondialog.ui @@ -1,7 +1,7 @@ - FilterDialog - + ConditionDialog + 0 @@ -11,7 +11,11 @@ - New Filter + Condition Editor + + + + :/icons/map.png:/icons/map.png @@ -74,7 +78,7 @@ - Biome filter + Biomes @@ -135,7 +139,7 @@ - Select filter + Select type @@ -143,7 +147,7 @@ - Filter type: + Condition type: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -412,8 +416,8 @@ 0 0 - 648 - 377 + 640 + 362 @@ -696,8 +700,8 @@ 0 0 - 648 - 333 + 640 + 316 @@ -745,8 +749,8 @@ 0 0 - 648 - 413 + 640 + 395 @@ -787,8 +791,7 @@ - - + .. @@ -799,8 +802,7 @@ - - + .. @@ -818,7 +820,7 @@ SpinInstances QSpinBox -
src/filterdialog.h
+
src/conditiondialog.h
diff --git a/src/extgendialog.cpp b/src/extgendialog.cpp index c909f3f..be01580 100644 --- a/src/extgendialog.cpp +++ b/src/extgendialog.cpp @@ -24,6 +24,7 @@ ExtGenDialog::ExtGenDialog(QWidget *parent, ExtGenSettings *extgen) Monument, Mansion, Outpost, + Ancient_City, Ruined_Portal, Ruined_Portal_N, Treasure, diff --git a/src/formconditions.cpp b/src/formconditions.cpp index 85c6e43..c30f965 100644 --- a/src/formconditions.cpp +++ b/src/formconditions.cpp @@ -1,7 +1,7 @@ #include "formconditions.h" #include "ui_formconditions.h" -#include "filterdialog.h" +#include "conditiondialog.h" #include "mainwindow.h" #include @@ -165,7 +165,7 @@ void FormConditions::editCondition(QListWidgetItem *item) return; WorldInfo wi; parent->getSeed(&wi); - FilterDialog *dialog = new FilterDialog(this, &parent->config, wi.mc, item, (Condition*)item->data(Qt::UserRole).data()); + ConditionDialog *dialog = new ConditionDialog(this, &parent->config, wi.mc, item, (Condition*)item->data(Qt::UserRole).data()); QObject::connect(dialog, SIGNAL(setCond(QListWidgetItem*,Condition,int)), this, SLOT(addItemCondition(QListWidgetItem*,Condition,int)), Qt::QueuedConnection); dialog->show(); } @@ -224,7 +224,7 @@ void FormConditions::on_buttonAddFilter_clicked() return; WorldInfo wi; parent->getSeed(&wi); - FilterDialog *dialog = new FilterDialog(this, &parent->config, wi.mc); + ConditionDialog *dialog = new ConditionDialog(this, &parent->config, wi.mc); QObject::connect(dialog, SIGNAL(setCond(QListWidgetItem*,Condition,int)), this, SLOT(addItemCondition(QListWidgetItem*,Condition)), Qt::QueuedConnection); dialog->show(); } diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 15793fc..2224420 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -5,7 +5,7 @@ #include "quadlistdialog.h" #include "presetdialog.h" #include "aboutdialog.h" -#include "filterdialog.h" +#include "conditiondialog.h" #include "extgendialog.h" #if WITH_UPDATER @@ -123,6 +123,7 @@ MainWindow::MainWindow(QWidget *parent) addMapAction(D_SHIPWRECK, "shipwreck", tr("Show shipwrecks")); addMapAction(D_TREASURE, "treasure", tr("Show buried treasures")); addMapAction(D_OUTPOST, "outpost", tr("Show illager outposts")); + addMapAction(D_ANCIENTCITY, "ancient_city", tr("Show ancient cities")); addMapAction(D_PORTAL, "portal", tr("Show ruined portals")); ui->toolBar->addSeparator(); addMapAction(D_FORTESS, "fortress", tr("Show nether fortresses")); diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 193fc90..f577ef8 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -26,7 +26,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -107,6 +116,11 @@ 16 + + + 1.19 + + 1.18 @@ -294,7 +308,16 @@ Search - + + 0 + + + 0 + + + 0 + + 0 @@ -340,8 +363,8 @@ QToolButton { 0 0 - 1233 - 676 + 1232 + 669 @@ -666,7 +689,16 @@ QSplitter { QFrame::Raised - + + 0 + + + 0 + + + 0 + + 0 @@ -733,7 +765,7 @@ QToolButton:checked { 0 0 1280 - 23 + 22 diff --git a/src/presetdialog.cpp b/src/presetdialog.cpp index 4806b49..d172de2 100644 --- a/src/presetdialog.cpp +++ b/src/presetdialog.cpp @@ -198,6 +198,14 @@ void PresetDialog::updateSelection() } } +void PresetDialog::on_tabWidget_currentChanged(int) +{ + if (ui->tabWidget->currentWidget() == ui->tabFilters) + ui->listExamples->clearSelection(); + else + ui->listFilters->clearSelection(); +} + void PresetDialog::on_listFilters_itemSelectionChanged() { updateSelection(); diff --git a/src/presetdialog.h b/src/presetdialog.h index cca3e07..e63c443 100644 --- a/src/presetdialog.h +++ b/src/presetdialog.h @@ -38,6 +38,7 @@ public: void updateSelection(); private slots: + void on_tabWidget_currentChanged(int idx); void on_listFilters_itemSelectionChanged(); void on_listExamples_itemSelectionChanged(); diff --git a/src/quad.cpp b/src/quad.cpp index 841b9e5..11e112e 100644 --- a/src/quad.cpp +++ b/src/quad.cpp @@ -81,6 +81,10 @@ void getStructs(std::vector *out, const StructureConfig sconf, { sv = getBastionType(wi.mc, wi.seed, p.x, p.z); } + else if (sconf.structType == Ancient_City) + { + sv = getAncientCityType(wi.mc, wi.seed, p.x, p.z); + } else if (sconf.structType == Outpost && wi.mc >= MC_1_18) { sv.sx = sv.sz = 16; @@ -346,6 +350,7 @@ QWorld::QWorld(WorldInfo wi, int dim) lvs[D_SHIPWRECK] .init4struct(this, 0, 2048, D_SHIPWRECK, 1); lvs[D_TREASURE] .init4struct(this, 0, 2048, D_TREASURE, 1); lvs[D_OUTPOST] .init4struct(this, 0, 2048, D_OUTPOST, 2); + lvs[D_ANCIENTCITY] .init4struct(this, 0, 2048, D_ANCIENTCITY, 2); lvs[D_PORTAL] .init4struct(this, 0, 2048, D_PORTAL, 1); lvs[D_PORTALN] .init4struct(this,-1, 2048, D_PORTALN, 1); lvs[D_FORTESS] .init4struct(this,-1, 2048, D_FORTESS, 1); @@ -368,6 +373,7 @@ QWorld::QWorld(WorldInfo wi, int dim) icons[D_TREASURE] = QPixmap(":/icons/treasure.png"); icons[D_MINESHAFT] = QPixmap(":/icons/mineshaft.png"); icons[D_OUTPOST] = QPixmap(":/icons/outpost.png"); + icons[D_ANCIENTCITY]= QPixmap(":/icons/ancient_city.png"); icons[D_PORTAL] = QPixmap(":/icons/portal.png"); icons[D_PORTALN] = QPixmap(":/icons/portal.png"); icons[D_SPAWN] = QPixmap(":/icons/spawn.png"); diff --git a/src/quad.h b/src/quad.h index 9597f34..06ea197 100644 --- a/src/quad.h +++ b/src/quad.h @@ -30,6 +30,7 @@ enum { D_TREASURE, D_MINESHAFT, D_OUTPOST, + D_ANCIENTCITY, D_PORTAL, D_PORTALN, D_FORTESS, @@ -60,6 +61,7 @@ inline const char *mapopt2str(int opt) case D_TREASURE: return "treasure"; case D_MINESHAFT: return "mineshaft"; case D_OUTPOST: return "outpost"; + case D_ANCIENTCITY: return "ancient_city"; case D_PORTAL: return "portal"; case D_PORTALN: return "portaln"; case D_SPAWN: return "spawn"; @@ -88,6 +90,7 @@ inline int str2mapopt(const char *s) if (!strcmp(s, "treasure")) return D_TREASURE; if (!strcmp(s, "mineshaft")) return D_MINESHAFT; if (!strcmp(s, "outpost")) return D_OUTPOST; + if (!strcmp(s, "ancient_city")) return D_ANCIENTCITY; if (!strcmp(s, "portal")) return D_PORTAL; if (!strcmp(s, "portaln")) return D_PORTALN; if (!strcmp(s, "spawn")) return D_SPAWN; @@ -115,6 +118,7 @@ inline int mapopt2stype(int opt) case D_TREASURE: return Treasure; case D_MINESHAFT: return Mineshaft; case D_OUTPOST: return Outpost; + case D_ANCIENTCITY: return Ancient_City; case D_PORTAL: return Ruined_Portal; case D_PORTALN: return Ruined_Portal_N; case D_FORTESS: return Fortress; diff --git a/src/search.h b/src/search.h index c0ce699..4aefce9 100644 --- a/src/search.h +++ b/src/search.h @@ -102,6 +102,7 @@ enum F_REFERENCE_4, F_FIRST_STRONGHOLD, F_CLIMATE_NOISE, + F_ANCIENT_CITY, // new filters should be added here at the end to keep some downwards compatibility FILTER_MAX, }; @@ -250,7 +251,7 @@ static const struct FilterList list[F_BIOME] = FilterInfo{ CAT_BIOMES, 1, 1, 1, 0, L_VORONOI_1, 0, 1, 0, MC_1_0, MC_1_17, 0, 1, disp++, // disable for 1.18 ":icons/map.png", - _("Biome filter 1:1"), + _("Biomes 1:1"), _("Only seeds with the included (+) biomes in the specified area and " "discard those that have biomes that are explicitly excluded (-).") }; @@ -258,28 +259,28 @@ static const struct FilterList list[F_BIOME_4] = FilterInfo{ CAT_BIOMES, 1, 1, 1, 0, 0, 0, 4, 0, MC_1_0, MC_NEWEST, 0, 1, disp++, ":icons/map.png", - _("Biome filter 1:4"), + _("Biomes 1:4"), _("Only seeds with the included (+) biomes in the specified area and " "discard those that have biomes that are explicitly excluded (-).") }; list[F_BIOME_16] = FilterInfo{ CAT_BIOMES, 1, 1, 1, 0, 0, 0, 16, 0, MC_1_0, MC_NEWEST, 0, 1, disp++, ":icons/map.png", - _("Biome filter 1:16"), + _("Biomes 1:16"), _("Only seeds with the included (+) biomes in the specified area and " "discard those that have biomes that are explicitly excluded (-).") }; list[F_BIOME_64] = FilterInfo{ CAT_BIOMES, 1, 1, 1, 0, 0, 0, 64, 0, MC_1_0, MC_NEWEST, 0, 1, disp++, ":icons/map.png", - _("Biome filter 1:64"), + _("Biomes 1:64"), _("Only seeds with the included (+) biomes in the specified area and " "discard those that have biomes that are explicitly excluded (-).") }; list[F_BIOME_256] = FilterInfo{ CAT_BIOMES, 1, 1, 1, 0, 0, 0, 256, 0, MC_1_0, MC_NEWEST, 0, 1, disp++, ":icons/map.png", - _("Biome filter 1:256"), + _("Biomes 1:256"), _("Only seeds with the included (+) biomes in the specified area and " "discard those that have biomes that are explicitly excluded (-).") }; @@ -287,7 +288,7 @@ static const struct FilterList list[F_BIOME_4_RIVER] = FilterInfo{ CAT_BIOMES, 1, 1, 1, 0, L_RIVER_MIX_4, 0, 4, 0, MC_1_13, MC_1_17, 0, 0, disp++, ":icons/map.png", - _("Biome filter 1:4 RIVER"), + _("Biomes 1:4 RIVER"), _("Only seeds with the included (+) biomes in the specified area and " "discard those that have biomes that are explicitly excluded (-) " "at layer RIVER with scale 1:4. " @@ -296,7 +297,7 @@ static const struct FilterList list[F_BIOME_256_OTEMP] = FilterInfo{ CAT_BIOMES, 0, 1, 1, 0, L_OCEAN_TEMP_256, 0, 256, 0, MC_1_13, MC_1_17, 0, 0, disp++, ":icons/map.png", - _("Biome filter 1:256 O.TEMP"), + _("Biomes 1:256 O.TEMP"), _("Only seeds with the included (+) biomes in the specified area and " "discard those that have biomes that are explicitly excluded (-) " "at layer OCEAN TEMPERATURE with scale 1:256. " @@ -319,56 +320,56 @@ static const struct FilterList list[F_BIOME_NETHER_1] = FilterInfo{ CAT_NETHER, 1, 1, 1, 0, 0, 0, 1, 0, MC_1_16, 0, -1, 1, disp++, // disabled ":icons/nether.png", - _("Nether biome filter 1:1 (disabled)"), + _("Nether biomes 1:1 (disabled)"), _("Nether biomes after voronoi scaling to 1:1.") }; list[F_BIOME_NETHER_4] = FilterInfo{ CAT_NETHER, 0, 1, 1, 0, 0, 0, 4, 0, MC_1_16, MC_NEWEST, -1, 0, disp++, ":icons/nether.png", - _("Nether biome filter 1:4"), + _("Nether biomes 1:4"), _("Nether biomes with normal noise sampling at scale 1:4.") }; list[F_BIOME_NETHER_16] = FilterInfo{ CAT_NETHER, 0, 1, 1, 0, 0, 0, 16, 0, MC_1_16, MC_NEWEST, -1, 0, disp++, ":icons/nether.png", - _("Nether biome filter 1:16"), + _("Nether biomes 1:16"), _("Nether biomes, but only sampled at scale 1:16.") }; list[F_BIOME_NETHER_64] = FilterInfo{ CAT_NETHER, 0, 1, 1, 0, 0, 0, 64, 0, MC_1_16, MC_NEWEST, -1, 0, disp++, ":icons/nether.png", - _("Nether biome filter 1:64"), + _("Nether biomes 1:64"), _("Nether biomes, but only sampled at scale 1:64.") }; list[F_BIOME_NETHER_256] = FilterInfo{ CAT_NETHER, 0, 1, 1, 0, 0, 0, 256, 0, MC_1_16, MC_NEWEST, -1, 0, disp++, ":icons/nether.png", - _("Nether biome filter 1:256"), + _("Nether biomes 1:256"), _("Nether biomes, but only sampled at scale 1:256.") }; list[F_BIOME_END_1] = FilterInfo{ CAT_END, 1, 1, 1, 0, 0, 0, 1, 0, MC_1_9, 0, +1, 1, disp++, // disabled ":icons/the_end.png", - _("End biome filter 1:1 (disabled)"), + _("End biomes 1:1 (disabled)"), _("End biomes after voronoi scaling to 1:1.") }; list[F_BIOME_END_4] = FilterInfo{ CAT_END, 0, 1, 1, 0, 0, 0, 4, 0, MC_1_9, MC_NEWEST, +1, 0, disp++, ":icons/the_end.png", - _("End biome filter 1:4"), + _("End biomes 1:4"), _("End biomes sampled at scale 1:4. Note this is just a simple upscale of 1:16.") }; list[F_BIOME_END_16] = FilterInfo{ CAT_END, 0, 1, 1, 0, 0, 0, 16, 0, MC_1_9, MC_NEWEST, +1, 0, disp++, ":icons/the_end.png", - _("End biome filter 1:16"), + _("End biomes 1:16"), _("End biomes with normal sampling at scale 1:16. ") }; list[F_BIOME_END_64] = FilterInfo{ CAT_END, 0, 1, 1, 0, 0, 0, 64, 0, MC_1_9, MC_NEWEST, +1, 0, disp++, ":icons/the_end.png", - _("End biome filter 1:64"), + _("End biomes 1:64"), _("End biomes with lossy sampling at scale 1:64. ") }; @@ -490,6 +491,13 @@ static const struct FilterList "" }; + list[F_ANCIENT_CITY] = FilterInfo{ + CAT_STRUCT, 1, 1, 1, 1, 0, Ancient_City, 1, 1, MC_1_19, MC_NEWEST, 0, 0, disp++, + ":icons/ancient_city.png", + _("Ancient City"), + "" + }; + list[F_PORTAL] = FilterInfo{ CAT_STRUCT, 0, 1, 1, 1, 0, Ruined_Portal, 1, 1, MC_1_16, MC_NEWEST, 0, 0, disp++, ":icons/portal.png",