a new oblect utils - enum, enum view, refactoring of mainLayout, debugging, states for sockets
This commit is contained in:
parent
46444c5fad
commit
bc4ed4a7cd
14 changed files with 260 additions and 57 deletions
|
@ -9,7 +9,7 @@ Corax* Corax::corax = 0;
|
|||
|
||||
Corax::Corax(QObject *parent):
|
||||
QObject(parent),
|
||||
started(false)
|
||||
started(false),
|
||||
server(new W::Server(W::String(u"Corax"), this)),
|
||||
logger(new W::Logger()),
|
||||
parentReporter(new W::ParentReporter()),
|
||||
|
@ -262,6 +262,7 @@ void Corax::onNodeConnected(const W::String& name)
|
|||
cout << "connected node " << name.toString() << endl;
|
||||
if (name == u"Perturabo") {
|
||||
commands->enableCommand(W::String(u"parseDirectory"), true);
|
||||
commands->enableCommand(W::String(u"givePlayer"), true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -270,6 +271,7 @@ void Corax::onNodeDisconnected(const W::String& name)
|
|||
cout << "disconnected node " << name.toString() << endl;
|
||||
if (name == u"Perturabo") {
|
||||
commands->enableCommand(W::String(u"parseDirectory"), false);
|
||||
commands->enableCommand(W::String(u"givePlayer"), false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -294,6 +296,6 @@ void Corax::h_givePlayer(const W::Event& ev)
|
|||
|
||||
W::Event res(source + W::Address{u"getPlayer"}, vc);
|
||||
res.setSenderId(id);
|
||||
connector->getConnection(id)->send(ev);
|
||||
connector->getConnection(id)->send(res);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue