Merge remote-tracking branches 'Putnam3145/patch-24' and 'BenLubar/rfr-follow' into develop

develop
lethosor 2016-03-18 16:37:37 -04:00
commit e467c2010a
2 changed files with 5 additions and 0 deletions

@ -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

@ -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;
}