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