summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-07 23:17:42 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-07 23:31:20 +0300
commit21036c157955da93485e0b4ea5d22116cfdaba33 (patch)
tree9f0ddb8baa8e6dcb7023a8f39d325b810e9ceab7 /src
parentef6869c9759246b3a0d6cc1c58a25773ccfcc858 (diff)
downloadplus-21036c157955da93485e0b4ea5d22116cfdaba33.tar.gz
plus-21036c157955da93485e0b4ea5d22116cfdaba33.tar.bz2
plus-21036c157955da93485e0b4ea5d22116cfdaba33.tar.xz
plus-21036c157955da93485e0b4ea5d22116cfdaba33.zip
Remove bot checker window.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt3
-rw-r--r--src/Makefile.am3
-rw-r--r--src/actions/windows.cpp7
-rw-r--r--src/actions/windows.h1
-rw-r--r--src/actormanager.cpp3
-rw-r--r--src/configmanager.cpp6
-rw-r--r--src/defaults.cpp2
-rw-r--r--src/game.cpp5
-rw-r--r--src/gui/models/userstablemodel.h258
-rw-r--r--src/gui/windowmenu.cpp3
-rw-r--r--src/gui/windows/botcheckerwindow.cpp216
-rw-r--r--src/gui/windows/botcheckerwindow.h92
-rw-r--r--src/input/inputaction.h2
-rw-r--r--src/input/inputactionmap.h4
-rw-r--r--src/input/pages/windows.cpp6
-rw-r--r--src/net/ea/beinghandler.cpp3
16 files changed, 9 insertions, 605 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d51f6897f..993fade24 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -302,7 +302,6 @@ SET(SRCS
gui/models/touchactionmodel.h
gui/models/typelistmodel.h
gui/models/updatetypemodel.h
- gui/models/userstablemodel.h
gui/models/updatelistmodel.h
gui/models/worldlistmodel.h
gui/models/themesmodel.h
@@ -396,8 +395,6 @@ SET(SRCS
gui/windows/okdialog.h
gui/windows/outfitwindow.cpp
gui/windows/outfitwindow.h
- gui/windows/botcheckerwindow.cpp
- gui/windows/botcheckerwindow.h
gui/windows/textcommandeditor.cpp
gui/windows/textcommandeditor.h
gui/onlineplayer.h
diff --git a/src/Makefile.am b/src/Makefile.am
index e585eab28..28e070e59 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -440,7 +440,6 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
gui/models/touchactionmodel.h \
gui/models/typelistmodel.h \
gui/models/updatetypemodel.h \
- gui/models/userstablemodel.h \
gui/models/updatelistmodel.h \
gui/models/worldlistmodel.h \
gui/models/themesmodel.h \
@@ -534,8 +533,6 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
gui/windows/okdialog.h \
gui/windows/outfitwindow.cpp \
gui/windows/outfitwindow.h \
- gui/windows/botcheckerwindow.cpp \
- gui/windows/botcheckerwindow.h \
gui/windows/textcommandeditor.cpp \
gui/windows/textcommandeditor.h \
gui/onlineplayer.h \
diff --git a/src/actions/windows.cpp b/src/actions/windows.cpp
index 04a4b59b3..6a917c5b5 100644
--- a/src/actions/windows.cpp
+++ b/src/actions/windows.cpp
@@ -36,7 +36,6 @@
#include "gui/windows/statuswindow.h"
#include "gui/windows/questswindow.h"
#include "gui/windows/whoisonline.h"
-#include "gui/windows/botcheckerwindow.h"
#include "gui/windows/chatwindow.h"
#include "gui/windows/debugwindow.h"
#include "gui/windows/didyouknowwindow.h"
@@ -252,12 +251,6 @@ impHandler0(spellShortcutWindowShow)
return true;
}
-impHandler0(botcheckerWindowShow)
-{
- showHideWindow(botCheckerWindow);
- return true;
-}
-
impHandler0(whoIsOnlineWindowShow)
{
showHideWindow(whoIsOnline);
diff --git a/src/actions/windows.h b/src/actions/windows.h
index 01727055c..a2437bb1b 100644
--- a/src/actions/windows.h
+++ b/src/actions/windows.h
@@ -46,7 +46,6 @@ namespace Actions
decHandler(dropShortcutWindowShow);
decHandler(killStatsWindowShow);
decHandler(spellShortcutWindowShow);
- decHandler(botcheckerWindowShow);
decHandler(whoIsOnlineWindowShow);
decHandler(didYouKnowWindowShow);
decHandler(questsWindowShow);
diff --git a/src/actormanager.cpp b/src/actormanager.cpp
index b9ff84adb..90c2877f4 100644
--- a/src/actormanager.cpp
+++ b/src/actormanager.cpp
@@ -36,7 +36,6 @@
#include "gui/widgets/tabs/chat/chattab.h"
-#include "gui/windows/botcheckerwindow.h"
#include "gui/windows/chatwindow.h"
#include "gui/windows/equipmentwindow.h"
#include "gui/windows/socialwindow.h"
@@ -270,8 +269,6 @@ Being *ActorManager::createBeing(const int id,
}
if (type == ActorType::Player)
{
- if (botCheckerWindow)
- botCheckerWindow->updateList();
if (socialWindow)
socialWindow->updateActiveList();
}
diff --git a/src/configmanager.cpp b/src/configmanager.cpp
index d80bddd85..b0f3a28e2 100644
--- a/src/configmanager.cpp
+++ b/src/configmanager.cpp
@@ -347,7 +347,11 @@ void ConfigManager::checkConfigVersion()
#endif
unassignKey("keyAttack", "k120");
}
- config.setValue("cfgver", 12);
+
+ if (version < 13)
+ config.setValue("keyWindowBotChecker", -1);
+
+ config.setValue("cfgver", 13);
}
#undef unassignKey
diff --git a/src/defaults.cpp b/src/defaults.cpp
index 89a16cc28..fadab98dc 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -353,7 +353,7 @@ DefaultsData* getConfigDefaults()
AddDEF("uselonglivesprites", false);
AddDEF("uselonglivesounds", true);
AddDEF("screenDensity", 0);
- AddDEF("cfgver", 12);
+ AddDEF("cfgver", 13);
AddDEF("enableDebugLog", false);
AddDEF("doubleClick", true);
AddDEF("useDiagonalSpeed", true);
diff --git a/src/game.cpp b/src/game.cpp
index 6b338ba45..e3a7932ad 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -66,7 +66,6 @@
#include "gui/windows/bankwindow.h"
#include "gui/windows/mailwindow.h"
#endif
-#include "gui/windows/botcheckerwindow.h"
#include "gui/windows/chatwindow.h"
#include "gui/windows/debugwindow.h"
#include "gui/windows/didyouknowwindow.h"
@@ -243,7 +242,6 @@ static void createGuiWindows()
bankWindow = new BankWindow;
mailWindow = new MailWindow;
#endif
- botCheckerWindow = new BotCheckerWindow;
whoIsOnline = new WhoIsOnline;
whoIsOnline->postInit();
killStats = new KillStats;
@@ -355,7 +353,6 @@ static void destroyGuiWindows()
delete2(bankWindow);
delete2(mailWindow);
#endif
- delete2(botCheckerWindow);
delete2(questsWindow);
delete2(whoIsOnline);
delete2(killStats);
@@ -615,8 +612,6 @@ void Game::slowLogic()
mValidSpeed = false;
mTime = time + 1;
- if (botCheckerWindow)
- botCheckerWindow->slowLogic();
if (debugWindow)
debugWindow->slowLogic();
if (killStats)
diff --git a/src/gui/models/userstablemodel.h b/src/gui/models/userstablemodel.h
deleted file mode 100644
index 788fcd2d0..000000000
--- a/src/gui/models/userstablemodel.h
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
- * The ManaPlus Client
- * Copyright (C) 2009-2010 Andrei Karas
- * Copyright (C) 2011-2015 The ManaPlus Developers
- *
- * This file is part of The ManaPlus Client.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef GUI_MODELS_USERSTABLEMODEL_H
-#define GUI_MODELS_USERSTABLEMODEL_H
-
-#include "gui/windows/botcheckerwindow.h"
-
-#include "gui/widgets/label.h"
-
-#include "gui/models/tablemodel.h"
-
-#include "actormanager.h"
-
-#include "being/localplayer.h"
-
-#include "utils/stringutils.h"
-
-#include "localconsts.h"
-
-const int COLUMNS_NR = 5; // name plus listbox
-const int NAME_COLUMN = 0;
-const int TIME_COLUMN = 1;
-
-const int ROW_HEIGHT = 12;
-// The following column widths really shouldn't be hardcoded but should
-// scale with the size of the widget... excep
-// that, right now, the widget doesn't exactly scale either.
-const int NAME_COLUMN_WIDTH = 185;
-const int TIME_COLUMN_WIDTH = 70;
-
-#define WIDGET_AT(row, column) (((row) * COLUMNS_NR) + column)
-
-class UsersTableModel final : public TableModel,
- public Widget2
-{
- public:
- explicit UsersTableModel(const Widget2 *const widget) :
- TableModel(),
- Widget2(widget),
- mPlayers(0),
- mWidgets()
- {
- playersUpdated();
- }
-
- A_DELETE_COPY(UsersTableModel)
-
- ~UsersTableModel()
- {
- freeWidgets();
- }
-
- int getRows() const override final
- {
- return static_cast<int>(mPlayers.size());
- }
-
- int getColumns() const override final
- {
- return COLUMNS_NR;
- }
-
- int getRowHeight() const override final
- {
- return ROW_HEIGHT;
- }
-
- int getColumnWidth(const int index) const override final
- {
- if (index == NAME_COLUMN)
- return NAME_COLUMN_WIDTH;
- else
- return TIME_COLUMN_WIDTH;
- }
-
- void playersUpdated()
- {
- signalBeforeUpdate();
-
- freeWidgets();
- mPlayers.clear();
- if (actorManager && botCheckerWindow
- && botCheckerWindow->mBotcheckerEnabled)
- {
- std::set<ActorSprite*> beings = actorManager->getAll();
- FOR_EACH (ActorSprites::iterator, i, beings)
- {
- Being *const being = dynamic_cast<Being*>(*i);
-
- if (being && being->getType() == ActorType::Player
- && being != localPlayer && !being->getName().empty())
- {
- mPlayers.push_back(being);
- }
- }
- }
-
- const unsigned int curTime = cur_time;
- const size_t sz = mPlayers.size();
- // set up widgets
- for (size_t r = 0; r < sz; ++r)
- {
- if (!mPlayers.at(r))
- continue;
-
- const Being *const player = mPlayers.at(r);
- Widget *widget = new Label(this, player->getName());
-
- mWidgets.push_back(widget);
-
- if (player->getAttackTime() != 0)
- {
- widget = new Label(this, toString(curTime
- - player->getAttackTime()));
- }
- else
- {
- widget = new Label(this, toString(curTime
- - player->getTestTime()).append("?"));
- }
- mWidgets.push_back(widget);
-
- if (player->getTalkTime() != 0)
- {
- widget = new Label(this, toString(curTime
- - player->getTalkTime()));
- }
- else
- {
- widget = new Label(this, toString(curTime
- - player->getTestTime()).append("?"));
- }
- mWidgets.push_back(widget);
-
- if (player->getMoveTime() != 0)
- {
- widget = new Label(this, toString(curTime
- - player->getMoveTime()));
- }
- else
- {
- widget = new Label(this, toString(curTime
- - player->getTestTime()).append("?"));
- }
- mWidgets.push_back(widget);
-
- std::string str;
- bool talkBot = false;
- bool moveBot = false;
- bool attackBot = false;
- bool otherBot = false;
-
- if (curTime - player->getTestTime() > 2 * 60)
- {
- const int attack = curTime - (player->getAttackTime()
- ? player->getAttackTime()
- : player->getTestTime());
- const int talk = curTime - (player->getTalkTime()
- ? player->getTalkTime()
- : player->getTestTime()) - attack;
- const int move = curTime - (player->getMoveTime()
- ? player->getMoveTime()
- : player->getTestTime()) - attack;
- const int other = curTime - (player->getOtherTime()
- ? player->getMoveTime()
- : player->getOtherTime()) - attack;
-
- if (attack < 2 * 60)
- attackBot = true;
-
- // attacking but not talking more than 2 minutes
- if (talk > 2 * 60)
- {
- talkBot = true;
- str.append(toString((talk) / 60)).append(" ");
- }
-
- // attacking but not moving more than 2 minutes
- if (move > 2 * 60)
- {
- moveBot = true;
- str.append(toString((move) / 60));
- }
-
- // attacking but not other activity more than 2 minutes
- if (move > 2 * 60 && other > 2 * 60)
- otherBot = true;
- }
-
- if (str.length() > 0)
- {
- if (attackBot && talkBot && moveBot && otherBot)
- str = "bot!! " + str;
- else if (attackBot && talkBot && moveBot)
- str = "bot! " + str;
- else if (talkBot && moveBot)
- str = "bot " + str;
- else if (talkBot || moveBot)
- str = "bot? " + str;
- }
- else
- {
- str = "ok";
- }
-
- widget = new Label(this, str);
- mWidgets.push_back(widget);
- }
-
- signalAfterUpdate();
- }
-
- void updateModelInRow(const int row A_UNUSED) const
- {
- }
-
- Widget *getElementAt(const int row,
- const int column) const override final
- {
- return mWidgets[WIDGET_AT(row, column)];
- }
-
- void freeWidgets()
- {
- for (std::vector<Widget *>::const_iterator it = mWidgets.begin();
- it != mWidgets.end(); ++it)
- {
- delete *it;
- }
-
- mWidgets.clear();
- }
-
- protected:
- std::vector<Being*> mPlayers;
- std::vector<Widget*> mWidgets;
-};
-
-#endif // GUI_MODELS_USERSTABLEMODEL_H
diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp
index 81bcd5e6b..4cf0a6b2b 100644
--- a/src/gui/windowmenu.cpp
+++ b/src/gui/windowmenu.cpp
@@ -73,9 +73,6 @@ WindowMenu::WindowMenu(const Widget2 *const widget) :
// TRANSLATORS: short button name for quests window.
addButton(N_("QE"),
_("Quests"), x, h, InputAction::WINDOW_QUESTS);
- // TRANSLATORS: short button name for bot checker window.
- addButton(N_("BC"),
- _("Bot checker"), x, h, InputAction::WINDOW_BOT_CHECKER, false);
// TRANSLATORS: short button name for kill stats window.
addButton(N_("KS"),
_("Kill stats"), x, h, InputAction::WINDOW_KILLS);
diff --git a/src/gui/windows/botcheckerwindow.cpp b/src/gui/windows/botcheckerwindow.cpp
deleted file mode 100644
index e49bd65b1..000000000
--- a/src/gui/windows/botcheckerwindow.cpp
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * The ManaPlus Client
- * Copyright (C) 2009 The Mana World Development Team
- * Copyright (C) 2009-2010 Andrei Karas
- * Copyright (C) 2011-2015 The ManaPlus Developers
- *
- * This file is part of The ManaPlus Client.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "gui/windows/botcheckerwindow.h"
-
-#include "gui/windows/setupwindow.h"
-
-#include "gui/widgets/button.h"
-#include "gui/widgets/scrollarea.h"
-#include "gui/widgets/guitable.h"
-
-#include "gui/models/userstablemodel.h"
-
-#include "client.h"
-#include "configuration.h"
-
-#include "utils/gettext.h"
-
-#include "debug.h"
-
-BotCheckerWindow *botCheckerWindow = nullptr;
-
-BotCheckerWindow::BotCheckerWindow() :
- // TRANSLATORS: bot checker window header
- Window(_("Bot Checker"), Modal_false, nullptr, "botchecker.xml"),
- ActionListener(),
- mTableModel(new UsersTableModel(this)),
- mTable(new GuiTable(this, mTableModel)),
- playersScrollArea(new ScrollArea(this, mTable, true,
- "bochecker_background.xml")),
- mPlayerTableTitleModel(new StaticTableModel(1, COLUMNS_NR)),
- mPlayerTitleTable(new GuiTable(this, mPlayerTableTitleModel)),
- // TRANSLATORS: bot checker window button
- mIncButton(new Button(this, _("Reset"), "reset", this)),
- mLastUpdateTime(0),
- mNeedUpdate(false),
- mBotcheckerEnabled(false)
-{
- const int w = 500;
- const int h = 250;
-
- setSaveVisible(true);
-
- if (setupWindow)
- setupWindow->registerWindowForReset(this);
-
- mTable->setOpaque(false);
- mTable->setLinewiseSelection(true);
- mTable->setWrappingEnabled(true);
- mTable->setActionEventId("skill");
- mTable->addActionListener(this);
-
- mPlayerTableTitleModel->fixColumnWidth(NAME_COLUMN, NAME_COLUMN_WIDTH);
-
- for (int f = 0; f < 4; f++)
- {
- mPlayerTableTitleModel->fixColumnWidth(
- TIME_COLUMN + f, TIME_COLUMN_WIDTH);
- }
-
- mPlayerTitleTable->setHeight(1);
- mPlayerTitleTable->setBackgroundColor(getThemeColor(
- Theme::TABLE_BACKGROUND));
- mPlayerTitleTable->setSelectable(false);
-
- // TRANSLATORS: bot checker window table header
- mPlayerTableTitleModel->set(0, 0, new Label(this, _("Name")));
- // TRANSLATORS: bot checker window table header
- mPlayerTableTitleModel->set(0, 1, new Label(this, _("Attack")));
- // TRANSLATORS: bot checker window table header
- mPlayerTableTitleModel->set(0, 2, new Label(this, _("Talk")));
- // TRANSLATORS: bot checker window table header
- mPlayerTableTitleModel->set(0, 3, new Label(this, _("Move")));
- // TRANSLATORS: bot checker window table header
- mPlayerTableTitleModel->set(0, 4, new Label(this, _("Result")));
-
- mPlayerTitleTable->setLinewiseSelection(true);
-
- setWindowName("BotCheckerWindow");
- setCloseButton(true);
- setStickyButtonLock(true);
- setDefaultSize(w, h, ImageRect::CENTER);
-
- playersScrollArea->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER);
- mIncButton->adjustSize();
-
- const int pad4 = mPadding * 4;
- int y = mPadding;
- mPlayerTitleTable->setPosition(mPadding, y);
- mPlayerTitleTable->setWidth(w - pad4);
- mPlayerTitleTable->setHeight(20);
-
- y += 20 + mPadding;
- playersScrollArea->setPosition(mPadding, y);
- playersScrollArea->setWidth(w - pad4);
- const int scrollHeight = h - y - mTitleBarHeight - mPadding * 3
- - mIncButton->getHeight();
- playersScrollArea->setHeight(scrollHeight);
- y += scrollHeight + mPadding;
-
- mIncButton->setPosition(mPadding, y);
-
- mLastHost += 0x1234;
-
- add(mPlayerTitleTable);
- add(playersScrollArea);
- add(mIncButton);
-
- center();
-
- setWidth(w);
- setHeight(h);
- loadWindowState();
- enableVisibleSound(true);
-
- config.addListener("enableBotCheker", this);
- mBotcheckerEnabled = config.getBoolValue("enableBotCheker");
-}
-
-BotCheckerWindow::~BotCheckerWindow()
-{
- config.removeListener("enableBotCheker", this);
- CHECKLISTENERS
-}
-
-void BotCheckerWindow::slowLogic()
-{
- BLOCK_START("BotCheckerWindow::slowLogic")
- if (mBotcheckerEnabled && mTableModel)
- {
- const unsigned int nowTime = cur_time;
- if (nowTime - mLastUpdateTime > 5 && mNeedUpdate)
- {
- mTableModel->playersUpdated();
- mNeedUpdate = false;
- mLastUpdateTime = nowTime;
- }
- else if (nowTime - mLastUpdateTime > 15)
- {
- mTableModel->playersUpdated();
- mNeedUpdate = false;
- mLastUpdateTime = nowTime;
- }
- }
- BLOCK_END("BotCheckerWindow::slowLogic")
-}
-
-void BotCheckerWindow::action(const ActionEvent &event)
-{
- if (event.getId() == "reset")
- {
- reset();
- mNeedUpdate = true;
- }
-}
-
-void BotCheckerWindow::update()
-{
-}
-
-void BotCheckerWindow::updateList()
-{
- if (mTableModel)
- mNeedUpdate = true;
-}
-
-void BotCheckerWindow::reset()
-{
- if (actorManager)
- {
- std::set<ActorSprite*> beings = actorManager->getAll();
- FOR_EACH (ActorSprites::iterator, i, beings)
- {
- if ((*i)->getType() == ActorType::Player)
- {
- Being *const being = static_cast<Being*>(*i);
- if (being != localPlayer && !being->getName().empty())
- being->resetCounters();
- }
- }
- }
-}
-
-void BotCheckerWindow::optionChanged(const std::string &name)
-{
- if (name == "enableBotCheker")
- mBotcheckerEnabled = config.getBoolValue("enableBotCheker");
-}
-
-#ifdef USE_PROFILER
-void BotCheckerWindow::logicChildren()
-{
- BLOCK_START("BotCheckerWindow::logicChildren")
- BasicContainer::logicChildren();
- BLOCK_END("BotCheckerWindow::logicChildren")
-}
-#endif
diff --git a/src/gui/windows/botcheckerwindow.h b/src/gui/windows/botcheckerwindow.h
deleted file mode 100644
index 76f06af4c..000000000
--- a/src/gui/windows/botcheckerwindow.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * The ManaPlus Client
- * Copyright (C) 2009 The Mana World Development Team
- * Copyright (C) 2009-2010 Andrei Karas
- * Copyright (C) 2011-2015 The ManaPlus Developers
- *
- * This file is part of The ManaPlus Client.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef GUI_WINDOWS_BOTCHECKERWINDOW_H
-#define GUI_WINDOWS_BOTCHECKERWINDOW_H
-
-#include "gui/widgets/window.h"
-
-#include "listeners/actionlistener.h"
-
-struct BOTCHK final
-{
- int16_t id; /**< Index into "botchecker_db" array */
- int16_t lv;
- int16_t sp;
-};
-
-class Button;
-class GuiTable;
-class ScrollArea;
-class UsersTableModel;
-class StaticTableModel;
-
-class BotCheckerWindow final : public Window,
- public ActionListener,
- public ConfigListener
-{
- public:
- friend class UsersTableModel;
-
- /**
- * Constructor.
- */
- BotCheckerWindow();
-
- A_DELETE_COPY(BotCheckerWindow)
-
- /**
- * Destructor.
- */
- ~BotCheckerWindow();
-
- void action(const ActionEvent &event) override final;
-
- void update();
-
- void slowLogic();
-
- void updateList();
-
- void reset();
-
- void optionChanged(const std::string &name) override final;
-
-#ifdef USE_PROFILER
- void logicChildren();
-#endif
-
- private:
- UsersTableModel *mTableModel;
- GuiTable *mTable;
- ScrollArea *playersScrollArea;
- StaticTableModel *mPlayerTableTitleModel;
- GuiTable *mPlayerTitleTable;
- Button *mIncButton;
- int mLastUpdateTime;
- bool mNeedUpdate;
- bool mBotcheckerEnabled;
-};
-
-extern BotCheckerWindow *botCheckerWindow;
-
-#endif // GUI_WINDOWS_BOTCHECKERWINDOW_H
diff --git a/src/input/inputaction.h b/src/input/inputaction.h
index 5faee657c..f398029e7 100644
--- a/src/input/inputaction.h
+++ b/src/input/inputaction.h
@@ -103,7 +103,7 @@ namespace InputAction
WINDOW_DROP,
WINDOW_KILLS,
WINDOW_SPELLS,
- WINDOW_BOT_CHECKER,
+ UNUSED1,
WINDOW_ONLINE,
WINDOW_DIDYOUKNOW,
WINDOW_QUESTS,
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index 71408667c..d247da765 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -623,10 +623,10 @@ static const InputActionData inputActionData[InputAction::TOTAL] = {
emptyKey,
emptyKey,
Input::GRP_DEFAULT | Input::GRP_GUI,
- &Actions::botcheckerWindowShow,
+ nullptr,
InputAction::NO_VALUE, 50,
InputCondition::GAME | InputCondition::NOTARGET,
- "botchecker|openbotchecker",
+ "",
false},
{"keyWindowOnline",
emptyKey,
diff --git a/src/input/pages/windows.cpp b/src/input/pages/windows.cpp
index 8d1f8ebc7..3f3f14462 100644
--- a/src/input/pages/windows.cpp
+++ b/src/input/pages/windows.cpp
@@ -165,12 +165,6 @@ SetupActionData setupActionDataWindows[] =
},
{
// TRANSLATORS: input action name
- N_("Bot Checker Window"),
- InputAction::WINDOW_BOT_CHECKER,
- "",
- },
- {
- // TRANSLATORS: input action name
N_("Who Is Online Window"),
InputAction::WINDOW_ONLINE,
"",
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp
index f5285e8ef..3f06c668c 100644
--- a/src/net/ea/beinghandler.cpp
+++ b/src/net/ea/beinghandler.cpp
@@ -31,7 +31,6 @@
#include "gui/viewport.h"
-#include "gui/windows/botcheckerwindow.h"
#include "gui/windows/socialwindow.h"
#include "resources/mapitemtype.h"
@@ -122,8 +121,6 @@ void BeingHandler::processBeingRemove(Net::MessageIn &msg)
{
if (dstBeing->getType() == ActorType::Player)
{
- if (botCheckerWindow)
- botCheckerWindow->updateList();
if (socialWindow)
socialWindow->updateActiveList();
}