forked from RepoMirrors/baritone
tenor dependency on comms
This commit is contained in:
parent
c5ecb9bb9b
commit
806c2a4af1
|
@ -58,9 +58,11 @@ sourceSets {
|
||||||
launch {
|
launch {
|
||||||
compileClasspath += main.compileClasspath + main.runtimeClasspath + main.output
|
compileClasspath += main.compileClasspath + main.runtimeClasspath + main.output
|
||||||
}
|
}
|
||||||
tenor {}
|
tenor {
|
||||||
|
compileClasspath += comms.compileClasspath + comms.output
|
||||||
|
}
|
||||||
main {
|
main {
|
||||||
compileClasspath += tenor.compileClasspath
|
compileClasspath += tenor.compileClasspath + tenor.output
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,10 +17,28 @@
|
||||||
|
|
||||||
package tenor;
|
package tenor;
|
||||||
|
|
||||||
public class Bot {
|
import comms.IConnection;
|
||||||
|
import comms.IMessageListener;
|
||||||
|
import comms.upward.MessageStatus;
|
||||||
|
|
||||||
|
public class Bot implements IMessageListener {
|
||||||
public final BotTaskRegistry taskRegistry = new BotTaskRegistry(this);
|
public final BotTaskRegistry taskRegistry = new BotTaskRegistry(this);
|
||||||
|
|
||||||
|
private final IConnection connectionToBot;
|
||||||
|
private volatile MessageStatus mostRecentUpdate;
|
||||||
|
|
||||||
|
public Bot(IConnection conn) {
|
||||||
|
this.connectionToBot = conn;
|
||||||
|
// TODO event loop to read messages non blockingly
|
||||||
|
}
|
||||||
|
|
||||||
public int getCurrentQuantityInInventory(String item) {
|
public int getCurrentQuantityInInventory(String item) {
|
||||||
|
// TODO get this information from the most recent update
|
||||||
throw new UnsupportedOperationException("oppa");
|
throw new UnsupportedOperationException("oppa");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handle(MessageStatus msg) {
|
||||||
|
mostRecentUpdate = msg;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue