|
|
|
@ -298,12 +298,12 @@ struct product_hook : item_product {
|
|
|
|
|
std::vector<df::reaction_reagent*> *in_reag,
|
|
|
|
|
std::vector<df::item*> *in_items,
|
|
|
|
|
int32_t quantity, df::job_skill skill,
|
|
|
|
|
df::historical_entity *entity, df::world_site *site)
|
|
|
|
|
df::historical_entity *entity, int32_t unk, df::world_site *site, void* unk2)
|
|
|
|
|
) {
|
|
|
|
|
color_ostream_proxy out(Core::getInstance().getConsole());
|
|
|
|
|
auto product = products[this];
|
|
|
|
|
if ( !product ) {
|
|
|
|
|
INTERPOSE_NEXT(produce)(unit, out_products, out_items, in_reag, in_items, quantity, skill, entity, site);
|
|
|
|
|
INTERPOSE_NEXT(produce)(unit, out_products, out_items, in_reag, in_items, quantity, skill, entity, unk, site, unk2);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
df::reaction* this_reaction=product->react;
|
|
|
|
@ -314,7 +314,8 @@ struct product_hook : item_product {
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
size_t out_item_count = out_items->size();
|
|
|
|
|
INTERPOSE_NEXT(produce)(unit, out_products, out_items, in_reag, in_items, quantity, skill, entity, site);
|
|
|
|
|
|
|
|
|
|
INTERPOSE_NEXT(produce)(unit, out_products, out_items, in_reag, in_items, quantity, skill, entity, unk, site, unk2);
|
|
|
|
|
if ( out_items->size() == out_item_count )
|
|
|
|
|
return;
|
|
|
|
|
//if it produced something, call the scripts
|
|
|
|
|