Support spiderwebs and add a fake flow type for campfires.

develop
Japa 2018-03-10 21:02:28 +05:30
parent 3e7da4d5f2
commit a810960bde
2 changed files with 18 additions and 2 deletions

@ -1046,6 +1046,7 @@ enum FlowType
OceanWave = 11; OceanWave = 11;
SeaFoam = 12; SeaFoam = 12;
ItemCloud = 13; ItemCloud = 13;
CampFire = -1;
} }
message FlowInfo message FlowInfo

@ -332,6 +332,10 @@ void CopyItem(RemoteFortressReader::Item * NetItem, df::item * DfItem)
if (info.decode(thread->dye_mat_type, thread->dye_mat_index)) if (info.decode(thread->dye_mat_type, thread->dye_mat_index))
ConvertDFColorDescriptor(info.material->powder_dye, NetItem->mutable_dye()); ConvertDFColorDescriptor(info.material->powder_dye, NetItem->mutable_dye());
} }
if (DfItem->flags.bits.spider_web)
type->set_mat_index(1);
else
type->set_mat_index(0);
break; break;
} }
case df::enums::item_type::CLOTH: case df::enums::item_type::CLOTH:
@ -553,13 +557,24 @@ DFHack::command_result GetItemList(DFHack::color_ostream &stream, const DFHack::
mat_def = out->add_material_list(); mat_def = out->add_material_list();
mat_def->mutable_mat_pair()->set_mat_type((int)it); mat_def->mutable_mat_pair()->set_mat_type((int)it);
mat_def->mutable_mat_pair()->set_mat_index(0); mat_def->mutable_mat_pair()->set_mat_index(0);
mat_def->set_id("BOX_CHEST"); mat_def->set_id("BOX/CHEST");
mat_def = out->add_material_list(); mat_def = out->add_material_list();
mat_def->mutable_mat_pair()->set_mat_type((int)it); mat_def->mutable_mat_pair()->set_mat_type((int)it);
mat_def->mutable_mat_pair()->set_mat_index(1); mat_def->mutable_mat_pair()->set_mat_index(1);
mat_def->set_id("BOX_BAG"); mat_def->set_id("BOX/BAG");
break; break;
} }
case df::enums::item_type::THREAD:
{
mat_def = out->add_material_list();
mat_def->mutable_mat_pair()->set_mat_type((int)it);
mat_def->mutable_mat_pair()->set_mat_index(0);
mat_def->set_id("THREAD/NORMAL");
mat_def = out->add_material_list();
mat_def->mutable_mat_pair()->set_mat_type((int)it);
mat_def->mutable_mat_pair()->set_mat_index(1);
mat_def->set_id("THREAD/WEB");
}
} }
int subtypes = Items::getSubtypeCount(it); int subtypes = Items::getSubtypeCount(it);
if (subtypes >= 0) if (subtypes >= 0)