diff --git a/plugins/proto/RemoteFortressReader.proto b/plugins/proto/RemoteFortressReader.proto index b6d9c5f36..8a560c12c 100644 --- a/plugins/proto/RemoteFortressReader.proto +++ b/plugins/proto/RemoteFortressReader.proto @@ -284,6 +284,8 @@ message ViewInfo optional int32 cursor_pos_x = 6; optional int32 cursor_pos_y = 7; optional int32 cursor_pos_z = 8; + optional int32 follow_unit_id = 9 [default = -1]; + optional int32 follow_item_id = 10 [default = -1]; } message MapInfo diff --git a/plugins/remotefortressreader.cpp b/plugins/remotefortressreader.cpp index e23bea8cb..ecc0fb1c4 100644 --- a/plugins/remotefortressreader.cpp +++ b/plugins/remotefortressreader.cpp @@ -92,6 +92,7 @@ DFHACK_PLUGIN("RemoteFortressReader"); using namespace df::global; #else REQUIRE_GLOBAL(world); +REQUIRE_GLOBAL(ui); #endif // Here go all the command declarations... @@ -1436,6 +1437,8 @@ static command_result GetViewInfo(color_ostream &stream, const EmptyMessage *in, out->set_cursor_pos_x(cx); out->set_cursor_pos_y(cy); out->set_cursor_pos_z(cz); + out->set_follow_unit_id(ui->follow_unit); + out->set_follow_item_id(ui->follow_item); return CR_OK; }