This repository has been archived by the owner on Aug 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed playing a sound at double volume (actually playing it twice overlapping) when you have two chars in local seeing the same alert. Fixed misparsing of questions that included 'clear' in them, such as "Is KBP clr?". BTW, KBP is never clear. Fixed "*DEBUGGING*" entries accidentally inserted in channel list.
- Loading branch information
Showing
12 changed files
with
460 additions
and
236 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ in | |
is | ||
no | ||
on | ||
pi | ||
ship | ||
ships | ||
shiptype | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Jumpbridge data should be stored in a plain text file, named the same as the | ||
map (except all lowercase). The file should be placed in the directory | ||
pointed to in settings|options|map(tab)|"Bridge Data". | ||
|
||
For instance, if your bridge data directory is set to | ||
"http://eternaldusk.com/imp/jb/", a map for Providence would be located in | ||
the file at "http://eternaldusk.com/imp/jb/providence". | ||
|
||
The contents of the file should follow this format: | ||
|
||
FirstSystem=SecondSystem:#RGBcolorInHex | ||
|
||
|
||
Example: | ||
|
||
3D-CQU=9UY4-H:#0F00FF | ||
3KB-J0=AY-YCU:#804030 | ||
49GC-R=8B-VLX:#1F00EF | ||
5KG-PY=QBL-BV:#2F00DF | ||
7YWV-S=N8XA-L:#3F00CF | ||
... | ||
|
||
You can "comment-out" bridges that are temporarily down by replacing the | ||
'=' with another character, like '?'. For instance "3D-CQU?9UY4-H:#0F00FF" | ||
would not be shown on the map and would be ignored. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
#include "eventthread.h" | ||
|
||
EventThread::EventThread(QObject *parent) : QThread(parent) | ||
{ | ||
messagesReady = false; | ||
abort = false; | ||
} | ||
|
||
EventThread::~EventThread() | ||
{ | ||
mutex.lock(); | ||
abort = true; | ||
condition.wakeOne(); | ||
mutex.unlock(); | ||
|
||
wait(); | ||
} | ||
|
||
void EventThread::run() | ||
{ | ||
forever { | ||
mutex.lock(); | ||
QList<MessageInfo> messages = this->messages; | ||
this->messages.clear(); | ||
mutex.unlock(); | ||
|
||
foreach (MessageInfo message, messages) | ||
{ | ||
|
||
} | ||
|
||
mutex.lock(); | ||
if (!messagesReady) | ||
condition.wait(&mutex); | ||
messagesReady = false; | ||
mutex.unlock(); | ||
} | ||
} | ||
|
||
|
||
void EventThread::handleEvents(QList<MessageInfo> messages) | ||
{ | ||
QMutexLocker locker(&mutex); | ||
|
||
this->messages.append(messages); | ||
|
||
if (!isRunning()) { | ||
start(LowPriority); | ||
} | ||
else { | ||
messagesReady = true; | ||
condition.wakeOne(); | ||
} | ||
} | ||
|
||
/* | ||
void EventThread::initParsing() | ||
{ | ||
chatModel->removeRows(0,chatModel->rowCount()); | ||
if(parser != NULL) | ||
{ | ||
parser->deleteLater(); | ||
} | ||
parser = new Parser(++parserGeneration, this); | ||
parser->setMap(*regionMap); | ||
connect(parser, &Parser::newMessages, this, &MainWindow::receiveMessages); | ||
if(lc != NULL) | ||
{ | ||
lc->deleteLater(); | ||
} | ||
lc = new LogCatcher(&options); | ||
lc->setLogDir(options.getLogPath()); | ||
#ifdef USE_FALLBACK_POLLER | ||
lc->setPollerRefresh(options.getPollerRefresh()); | ||
#endif | ||
connect(lc, &LogCatcher::fileChanged, | ||
this, &MainWindow::fileChanged); | ||
// Initialize with last session if not old... | ||
foreach(QString absoluteFilePath, lc->files()) | ||
{ | ||
if((options.getIntelChannels().contains(shortName(absoluteFilePath)) && | ||
options.getInitOldIntel()) || | ||
parser->getLocalChannels().contains(shortName(absoluteFilePath))) | ||
{ | ||
fileChanged(absoluteFilePath); | ||
} | ||
} | ||
} | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#ifndef EVENTTHREAD_H | ||
#define EVENTTHREAD_H | ||
|
||
#include <QDateTime> | ||
#include <QList> | ||
#include <QMap> | ||
#include <QMutex> | ||
#include <QObject> | ||
#include <QThread> | ||
#include <QWaitCondition> | ||
|
||
#include "msg.h" // MessageInfo definition | ||
|
||
class EventThread : public QThread | ||
{ | ||
Q_OBJECT | ||
public: | ||
explicit EventThread(QObject *parent = nullptr); | ||
~EventThread(); | ||
|
||
void handleEvents(QList<MessageInfo> messages); | ||
void initParsing(); | ||
|
||
signals: | ||
|
||
public slots: | ||
|
||
protected: | ||
void run() override; | ||
|
||
private: | ||
|
||
// Thread Control | ||
bool abort; | ||
bool messagesReady; | ||
QMutex mutex; | ||
QWaitCondition condition; | ||
|
||
QList<MessageInfo> messages; | ||
QMap<QString, QDateTime> soundLastPlayed; | ||
}; | ||
|
||
#endif // EVENTTHREAD_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.