Send the building preview over RFR

develop
JapaMala 2018-07-02 22:04:47 +05:30
parent c489147657
commit 7fd23d46f0
2 changed files with 7 additions and 0 deletions

@ -86,4 +86,5 @@ message BuildSelector
optional int32 radius_x_high = 10; optional int32 radius_x_high = 10;
optional int32 radius_y_high = 11; optional int32 radius_y_high = 11;
optional RemoteFortressReader.Coord cursor = 12; optional RemoteFortressReader.Coord cursor = 12;
repeated int32 tiles = 13;
} }

@ -291,6 +291,12 @@ void CopyBuildMenu(DwarfControl::SidebarState * out)
send_cursor->set_y(cursor->y); send_cursor->set_y(cursor->y);
send_cursor->set_z(cursor->z); send_cursor->set_z(cursor->z);
} }
for (int y = 0; y < (y_low + y_high + 1); y++)
for (int x = 0; x < (x_low + x_high + 1); x++)
{
send_selector->add_tiles(build_selector->tiles[x][y]);
}
} }
} }