Skip to content

Commit

Permalink
Merge remote-tracking branch 'warmist/patch-6' into develop
Browse files Browse the repository at this point in the history
Add furnace to fillsidebarmenu hook
  • Loading branch information
lethosor committed Nov 7, 2015
2 parents 1da42c9 + 0fa35ae commit 8117549
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions plugins/eventful.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,22 @@ struct workshop_hook : df::building_workshopst{
}
};
IMPLEMENT_VMETHOD_INTERPOSE(workshop_hook, fillSidebarMenu);

struct furnace_hook : df::building_furnacest{
typedef df::building_furnacest interpose_base;
DEFINE_VMETHOD_INTERPOSE(void,fillSidebarMenu,())
{
CoreSuspendClaimer suspend;
color_ostream_proxy out(Core::getInstance().getConsole());
bool call_native=true;
onWorkshopFillSidebarMenu(out,this,&call_native);
if(call_native)
INTERPOSE_NEXT(fillSidebarMenu)();
postWorkshopFillSidebarMenu(out,this);
}
};
IMPLEMENT_VMETHOD_INTERPOSE(furnace_hook, fillSidebarMenu);

struct product_hook : item_product {
typedef item_product interpose_base;

Expand Down Expand Up @@ -430,6 +446,7 @@ static bool find_reactions(color_ostream &out)
static void enable_hooks(bool enable)
{
INTERPOSE_HOOK(workshop_hook,fillSidebarMenu).apply(enable);
INTERPOSE_HOOK(furnace_hook,fillSidebarMenu).apply(enable);
INTERPOSE_HOOK(item_hooks,contaminateWound).apply(enable);
INTERPOSE_HOOK(proj_unit_hook,checkImpact).apply(enable);
INTERPOSE_HOOK(proj_unit_hook,checkMovement).apply(enable);
Expand Down

0 comments on commit 8117549

Please sign in to comment.