diff --git a/src/games/rcll/websocket.clp b/src/games/rcll/websocket.clp index a996c0f03..0ee47f644 100644 --- a/src/games/rcll/websocket.clp +++ b/src/games/rcll/websocket.clp @@ -88,9 +88,9 @@ (defrule ws-update-robot "send update of a robot, whenever the robot fact changes" - ?sf <- (robot (number ?number) (name ?name)) + ?sf <- (robot (number ?number) (name ?name) (team ?team)) => - (ws-create-RobotInfo ?number ?name) + (ws-create-RobotInfo ?number ?name ?team) ) (defrule ws-update-agent-task diff --git a/src/libs/websocket/data.cpp b/src/libs/websocket/data.cpp index dc64d8c4d..3ad78364e 100644 --- a/src/libs/websocket/data.cpp +++ b/src/libs/websocket/data.cpp @@ -555,7 +555,7 @@ Data::log_push_order_info_via_delivery(int delivery_id) * */ void -Data::log_push_robot_info(int number, std::string name) +Data::log_push_robot_info(int number, std::string name, std::string team) { MutexLocker lock(&env_mutex_); @@ -565,6 +565,7 @@ Data::log_push_robot_info(int number, std::string name) if (match(fact, "robot")) { try { if (get_value(fact, "number") == number + && get_value(fact, "team") == team && get_value(fact, "name") == name) { facts.push_back(fact); } diff --git a/src/libs/websocket/data.h b/src/libs/websocket/data.h index 32e6b3c32..1a84f48a5 100644 --- a/src/libs/websocket/data.h +++ b/src/libs/websocket/data.h @@ -81,7 +81,7 @@ class Data void log_push_cfg_preset(const std::string &category, const std::string &preset); void log_push_game_state(); void log_push_time_info(); - void log_push_robot_info(int number, std::string name); + void log_push_robot_info(int number, std::string name, std::string team); void log_push_agent_task_info(int tid, int rid); void log_push_order_info(int id); void log_push_machine_info(std::string name); diff --git a/src/refbox/refbox.cpp b/src/refbox/refbox.cpp index d5a137602..a877e2f12 100644 --- a/src/refbox/refbox.cpp +++ b/src/refbox/refbox.cpp @@ -2156,7 +2156,7 @@ LLSFRefBox::setup_clips_websocket() &websocket::Data::log_push_time_info))); clips_->add_function("ws-create-RobotInfo", - sigc::slot( + sigc::slot( sigc::mem_fun(*(backend_->get_data()), &websocket::Data::log_push_robot_info))); clips_->add_function("ws-create-AgentTaskInfo",