12345678910111213141516171819202122232425262728293031323334 |
- #include "scripts.h"
- #include "logging.h"
- ScriptTrader::ScriptTrader(Director &d) : Dispatch(d) {
- BUGZ_LOG(fatal) << "ScriptTrader()";
- };
- ScriptTrader::~ScriptTrader() { BUGZ_LOG(fatal) << "~ScriptTrader()"; }
- void ScriptTrader::activate(void) {
- // ok, lookup port1 port2
- auto port_info = director.galaxy.ports.find(port[0]);
- int port0_type = port_info->second.type;
- port_info = director.galaxy.ports.find(port[1]);
- int port1_type = port_info->second.type;
- auto ttr = trade_type_info(port0_type, port1_type);
- trades = ttr.trades;
- // Ok, what do we do first here?
- // I - Info
- to_server("I");
- }
- void ScriptTrader::deactivate(void) {}
- void ScriptTrader::server_line(const std::string &line,
- const std::string &raw_line) {
- if (line == "<Info>") {
- }
- }
- void ScriptTrader::server_prompt(const std::string &prompt){};
- void ScriptTrader::client_input(const std::string &cinput){};
|