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
2
cubiomes
@ -1 +1 @@
|
||||
Subproject commit 136e645ce9c54cb24c659b29a24fa6f8361a3fef
|
||||
Subproject commit 0933804f15f4de107f0a1703f508521625292f87
|
@ -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
|
||||
|
@ -63,5 +63,7 @@
|
||||
<file>icons/mineshaft_d.png</file>
|
||||
<file>icons/helper.png</file>
|
||||
<file>icons/reference.png</file>
|
||||
<file>icons/ancient_city_d.png</file>
|
||||
<file>icons/ancient_city.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
BIN
rc/icons/ancient_city.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
rc/icons/ancient_city_d.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 489 B After Width: | Height: | Size: 703 B |
Before Width: | Height: | Size: 433 B After Width: | Height: | Size: 636 B |
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 665 B |
Before Width: | Height: | Size: 387 B After Width: | Height: | Size: 546 B |
@ -5,8 +5,8 @@
|
||||
#include <QString>
|
||||
|
||||
#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)
|
||||
|
@ -2,17 +2,13 @@
|
||||
<ui version="4.0">
|
||||
<class>AboutDialog</class>
|
||||
<widget class="QDialog" name="AboutDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>609</width>
|
||||
<height>343</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>About</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="../rc/icons.qrc">
|
||||
<normaloff>:/icons/map.png</normaloff>:/icons/map.png</iconset>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="1">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
@ -30,7 +26,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../icons.qrc">:/icons/map.png</pixmap>
|
||||
<pixmap resource="../rc/icons.qrc">:/icons/map.png</pixmap>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
@ -47,7 +43,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../icons.qrc"/>
|
||||
<include location="../rc/icons.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
|
@ -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];
|
@ -1,5 +1,5 @@
|
||||
#ifndef FILTERDIALOG_H
|
||||
#define FILTERDIALOG_H
|
||||
#ifndef CONDITIONDIALOG_H
|
||||
#define CONDITIONDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QCheckBox>
|
||||
@ -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
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FilterDialog</class>
|
||||
<widget class="QDialog" name="FilterDialog">
|
||||
<class>ConditionDialog</class>
|
||||
<widget class="QDialog" name="ConditionDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@ -11,7 +11,11 @@
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>New Filter</string>
|
||||
<string>Condition Editor</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="../rc/icons.qrc">
|
||||
<normaloff>:/icons/map.png</normaloff>:/icons/map.png</iconset>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
@ -74,7 +78,7 @@
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Biome filter</string>
|
||||
<string>Biomes</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../rc/icons.qrc">
|
||||
@ -135,7 +139,7 @@
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Select filter</string>
|
||||
<string>Select type</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
@ -143,7 +147,7 @@
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="labelFilterType">
|
||||
<property name="text">
|
||||
<string>Filter type:</string>
|
||||
<string>Condition type:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
@ -412,8 +416,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>648</width>
|
||||
<height>377</height>
|
||||
<width>640</width>
|
||||
<height>362</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
@ -696,8 +700,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>648</width>
|
||||
<height>333</height>
|
||||
<width>640</width>
|
||||
<height>316</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
@ -745,8 +749,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>648</width>
|
||||
<height>413</height>
|
||||
<width>640</width>
|
||||
<height>395</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
@ -787,8 +791,7 @@
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="dialog-cancel">
|
||||
<normaloff/>
|
||||
</iconset>
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -799,8 +802,7 @@
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="dialog-ok">
|
||||
<normaloff/>
|
||||
</iconset>
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -818,7 +820,7 @@
|
||||
<customwidget>
|
||||
<class>SpinInstances</class>
|
||||
<extends>QSpinBox</extends>
|
||||
<header>src/filterdialog.h</header>
|
||||
<header>src/conditiondialog.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
@ -24,6 +24,7 @@ ExtGenDialog::ExtGenDialog(QWidget *parent, ExtGenSettings *extgen)
|
||||
Monument,
|
||||
Mansion,
|
||||
Outpost,
|
||||
Ancient_City,
|
||||
Ruined_Portal,
|
||||
Ruined_Portal_N,
|
||||
Treasure,
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "formconditions.h"
|
||||
#include "ui_formconditions.h"
|
||||
|
||||
#include "filterdialog.h"
|
||||
#include "conditiondialog.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
@ -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();
|
||||
}
|
||||
|
@ -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"));
|
||||
|
@ -26,7 +26,16 @@
|
||||
</property>
|
||||
<widget class="QFrame" name="controlFrame">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
@ -107,6 +116,11 @@
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1.19</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1.18</string>
|
||||
@ -294,7 +308,16 @@
|
||||
<string>Search</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
@ -340,8 +363,8 @@ QToolButton {
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1233</width>
|
||||
<height>676</height>
|
||||
<width>1232</width>
|
||||
<height>669</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -666,7 +689,16 @@ QSplitter {
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
@ -733,7 +765,7 @@ QToolButton:checked {
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1280</width>
|
||||
<height>23</height>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuMap">
|
||||
|
@ -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();
|
||||
|
@ -38,6 +38,7 @@ public:
|
||||
void updateSelection();
|
||||
|
||||
private slots:
|
||||
void on_tabWidget_currentChanged(int idx);
|
||||
void on_listFilters_itemSelectionChanged();
|
||||
void on_listExamples_itemSelectionChanged();
|
||||
|
||||
|
@ -81,6 +81,10 @@ void getStructs(std::vector<VarPos> *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");
|
||||
|
@ -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;
|
||||
|
40
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",
|
||||
|