Include Materials in flows.

develop
Japa Mala Illo 2018-03-04 02:41:40 +05:30
parent 894f6c232b
commit ebf9651896
2 changed files with 4 additions and 2 deletions

@ -1058,4 +1058,5 @@ message FlowInfo
optional bool expanding = 6;
optional bool reuse = 7;
optional int32 guide_id = 8;
optional MatPair material = 9;
}

@ -1398,8 +1398,6 @@ void CopyItems(df::map_block * DfBlock, RemoteFortressReader::MapBlock * NetBloc
void CopyFlow(df::flow_info * localFlow, RemoteFortressReader::FlowInfo * netFlow, int index)
{
//There's no consistent ID to use, so we just use the pointer.
netFlow->set_index((int)localFlow);
netFlow->set_type((FlowType)localFlow->type);
netFlow->set_density(localFlow->density);
ConvertDFCoord(localFlow->pos, netFlow->mutable_pos());
@ -1407,6 +1405,9 @@ void CopyFlow(df::flow_info * localFlow, RemoteFortressReader::FlowInfo * netFlo
netFlow->set_expanding(localFlow->expanding);
netFlow->set_reuse(localFlow->reuse);
netFlow->set_guide_id(localFlow->guide_id);
auto mat = netFlow->mutable_material();
mat->set_mat_index(localFlow->mat_index);
mat->set_mat_type(localFlow->mat_type);
}
void CopyFlows(df::map_block * DfBlock, RemoteFortressReader::MapBlock * NetBlock)