diff --git a/library/modules/EventManager.cpp b/library/modules/EventManager.cpp index 16f21ffdd..d29a6627d 100644 --- a/library/modules/EventManager.cpp +++ b/library/modules/EventManager.cpp @@ -1,5 +1,6 @@ #include "Core.h" #include "Console.h" +#include "Debug.h" #include "VTableInterpose.h" #include "modules/Buildings.h" #include "modules/Constructions.h" @@ -43,6 +44,10 @@ #include #include +namespace DFHack { + DBG_DECLARE(eventmanager, log, DebugCategory::LINFO); +} + using namespace std; using namespace DFHack; using namespace EventManager; @@ -268,6 +273,7 @@ void DFHack::EventManager::onStateChange(color_ostream& out, state_change_event multimap copy(handlers[EventType::UNLOAD].begin(), handlers[EventType::UNLOAD].end()); for (auto &key_value : copy) { + DEBUG(log,out).print("calling handler for map unloaded state change event\n"); key_value.second.eventHandler(out, nullptr); } } else if ( event == DFHack::SC_MAP_LOADED ) { @@ -358,6 +364,7 @@ void DFHack::EventManager::manageEvents(color_ostream& out) { CoreSuspender suspender; int32_t tick = df::global::world->frame_counter; + TRACE(log,out).print("processing events at tick %d\n", tick); for ( size_t a = 0; a < EventType::EVENT_MAX; a++ ) { if ( handlers[a].empty() ) @@ -389,6 +396,7 @@ static void manageTickEvent(color_ostream& out) { break; EventHandler &handle = (*tickQueue.begin()).second; tickQueue.erase(tickQueue.begin()); + DEBUG(log,out).print("calling handler for tick event\n"); handle.eventHandler(out, (void*)intptr_t(tick)); toRemove.insert(handle); } @@ -429,6 +437,7 @@ static void manageJobInitiatedEvent(color_ostream& out) { continue; for (auto &key_value : copy) { EventHandler &handle = key_value.second; + DEBUG(log,out).print("calling handler for job initiated event\n"); handle.eventHandler(out, (void*)link->item); } } @@ -451,6 +460,7 @@ static void manageJobStartedEvent(color_ostream& out) { for (auto &key_value : copy) { auto &handler = key_value.second; // the jobs must have a worker to start + DEBUG(log,out).print("calling handler for job started event\n"); handler.eventHandler(out, job); } } @@ -561,6 +571,7 @@ static void manageJobCompletedEvent(color_ostream& out) { //still false positive if cancelled at EXACTLY the right time, but experiments show this doesn't happen for (auto &key_value : copy) { EventHandler &handle = key_value.second; + DEBUG(log,out).print("calling handler for repeated job completed event\n"); handle.eventHandler(out, (void*)&job0); } continue; @@ -573,6 +584,7 @@ static void manageJobCompletedEvent(color_ostream& out) { for (auto &key_value : copy) { EventHandler &handle = key_value.second; + DEBUG(log,out).print("calling handler for job completed event\n"); handle.eventHandler(out, (void*)&job0); } } @@ -607,6 +619,7 @@ static void manageNewUnitActiveEvent(color_ostream& out) { int32_t id = unit->id; if (!activeUnits.count(id)) { activeUnits.emplace(id); + DEBUG(log,out).print("calling handler for new unit event\n"); handler.eventHandler(out, (void*) intptr_t(id)); // intptr_t() avoids cast from smaller type warning } } @@ -630,6 +643,7 @@ static void manageUnitDeathEvent(color_ostream& out) { for (auto &key_value : copy) { EventHandler &handle = key_value.second; + DEBUG(log,out).print("calling handler for unit death event\n"); handle.eventHandler(out, (void*)intptr_t(unit->id)); } livingUnits.erase(unit->id); @@ -667,6 +681,7 @@ static void manageItemCreationEvent(color_ostream& out) { continue; for (auto &key_value : copy) { EventHandler &handle = key_value.second; + DEBUG(log,out).print("calling handler for item created event\n"); handle.eventHandler(out, (void*)intptr_t(item->id)); } } @@ -694,6 +709,7 @@ static void manageBuildingEvent(color_ostream& out) { buildings.insert(a); for (auto &key_value : copy) { EventHandler &handle = key_value.second; + DEBUG(log,out).print("calling handler for created building event\n"); handle.eventHandler(out, (void*)intptr_t(a)); } } @@ -710,6 +726,7 @@ static void manageBuildingEvent(color_ostream& out) { for (auto &key_value : copy) { EventHandler &handle = key_value.second; + DEBUG(log,out).print("calling handler for destroyed building event\n"); handle.eventHandler(out, (void*)intptr_t(id)); } a = buildings.erase(a); @@ -733,6 +750,7 @@ static void manageConstructionEvent(color_ostream& out) { // send construction to handlers, because it was removed for (const auto &key_value: copy) { EventHandler handle = key_value.second; + DEBUG(log,out).print("calling handler for destroyed construction event\n"); handle.eventHandler(out, (void*) &construction); } // erase from existent constructions @@ -747,6 +765,7 @@ static void manageConstructionEvent(color_ostream& out) { // send construction to handlers, because it is new for (const auto &key_value: copy) { EventHandler handle = key_value.second; + DEBUG(log,out).print("calling handler for created construction event\n"); handle.eventHandler(out, (void*) &construction); } } @@ -775,6 +794,7 @@ static void manageSyndromeEvent(color_ostream& out) { SyndromeData data(unit->id, b); for (auto &key_value : copy) { EventHandler &handle = key_value.second; + DEBUG(log,out).print("calling handler for syndrome event\n"); handle.eventHandler(out, (void*)&data); } } @@ -793,6 +813,7 @@ static void manageInvasionEvent(color_ostream& out) { for (auto &key_value : copy) { EventHandler &handle = key_value.second; + DEBUG(log,out).print("calling handler for invasion event\n"); handle.eventHandler(out, (void*)intptr_t(nextInvasion-1)); } } @@ -834,6 +855,7 @@ static void manageEquipmentEvent(color_ostream& out) { InventoryChangeData data(unit->id, nullptr, &item_new); for (auto &key_value : copy) { EventHandler &handle = key_value.second; + DEBUG(log,out).print("calling handler for new item equipped inventory change event\n"); handle.eventHandler(out, (void*)&data); } continue; @@ -849,6 +871,7 @@ static void manageEquipmentEvent(color_ostream& out) { InventoryChangeData data(unit->id, &item_old, &item_new); for (auto &key_value : copy) { EventHandler &handle = key_value.second; + DEBUG(log,out).print("calling handler for inventory change event\n"); handle.eventHandler(out, (void*)&data); } } @@ -860,6 +883,7 @@ static void manageEquipmentEvent(color_ostream& out) { InventoryChangeData data(unit->id, &i, nullptr); for (auto &key_value : copy) { EventHandler &handle = key_value.second; + DEBUG(log,out).print("calling handler for dropped item inventory change event\n"); handle.eventHandler(out, (void*)&data); } } @@ -913,6 +937,7 @@ static void manageReportEvent(color_ostream& out) { df::report* report = reports[idx]; for (auto &key_value : copy) { EventHandler &handle = key_value.second; + DEBUG(log,out).print("calling handler for report event\n"); handle.eventHandler(out, (void*)intptr_t(report->id)); } lastReport = report->id; @@ -990,6 +1015,7 @@ static void manageUnitAttackEvent(color_ostream& out) { alreadyDone[data.attacker][data.defender] = 1; for (auto &key_value : copy) { EventHandler &handle = key_value.second; + DEBUG(log,out).print("calling handler for unit1 attack unit attack event\n"); handle.eventHandler(out, (void*)&data); } } @@ -1002,6 +1028,7 @@ static void manageUnitAttackEvent(color_ostream& out) { alreadyDone[data.attacker][data.defender] = 1; for (auto &key_value : copy) { EventHandler &handle = key_value.second; + DEBUG(log,out).print("calling handler for unit2 attack unit attack event\n"); handle.eventHandler(out, (void*)&data); } } @@ -1013,6 +1040,7 @@ static void manageUnitAttackEvent(color_ostream& out) { alreadyDone[data.attacker][data.defender] = 1; for (auto &key_value : copy) { EventHandler &handle = key_value.second; + DEBUG(log,out).print("calling handler for unit1 killed unit attack event\n"); handle.eventHandler(out, (void*)&data); } } @@ -1024,6 +1052,7 @@ static void manageUnitAttackEvent(color_ostream& out) { alreadyDone[data.attacker][data.defender] = 1; for (auto &key_value : copy) { EventHandler &handle = key_value.second; + DEBUG(log,out).print("calling handler for unit2 killed unit attack event\n"); handle.eventHandler(out, (void*)&data); } } @@ -1282,6 +1311,7 @@ static void manageInteractionEvent(color_ostream& out) { //fire event for (auto &key_value : copy) { EventHandler &handle = key_value.second; + DEBUG(log,out).print("calling handler for interaction event\n"); handle.eventHandler(out, (void*)&data); } //TODO: deduce attacker from latest defend event first diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 16de2d1f4..dd5000ab5 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -107,7 +107,7 @@ set_source_files_properties( Brushes.h PROPERTIES HEADER_FILE_ONLY TRUE ) #dfhack_plugin(cursecheck cursecheck.cpp) #dfhack_plugin(cxxrandom cxxrandom.cpp LINK_LIBRARIES lua) #dfhack_plugin(deramp deramp.cpp) -#dfhack_plugin(debug debug.cpp LINK_LIBRARIES jsoncpp_static) +dfhack_plugin(debug debug.cpp LINK_LIBRARIES jsoncpp_static) #dfhack_plugin(dig dig.cpp) #dfhack_plugin(dig-now dig-now.cpp LINK_LIBRARIES lua) #dfhack_plugin(digFlood digFlood.cpp) @@ -116,7 +116,7 @@ set_source_files_properties( Brushes.h PROPERTIES HEADER_FILE_ONLY TRUE ) #dfhack_plugin(dwarfmonitor dwarfmonitor.cpp LINK_LIBRARIES lua) #add_subdirectory(embark-assistant) #dfhack_plugin(embark-tools embark-tools.cpp) -#dfhack_plugin(eventful eventful.cpp LINK_LIBRARIES lua) +dfhack_plugin(eventful eventful.cpp LINK_LIBRARIES lua) #dfhack_plugin(fastdwarf fastdwarf.cpp) #dfhack_plugin(filltraffic filltraffic.cpp) #dfhack_plugin(fix-unit-occupancy fix-unit-occupancy.cpp) @@ -126,7 +126,7 @@ set_source_files_properties( Brushes.h PROPERTIES HEADER_FILE_ONLY TRUE ) #dfhack_plugin(forceequip forceequip.cpp) #dfhack_plugin(generated-creature-renamer generated-creature-renamer.cpp) #dfhack_plugin(getplants getplants.cpp) -#dfhack_plugin(hotkeys hotkeys.cpp LINK_LIBRARIES lua) +dfhack_plugin(hotkeys hotkeys.cpp LINK_LIBRARIES lua) #dfhack_plugin(infiniteSky infiniteSky.cpp) #dfhack_plugin(isoworldremote isoworldremote.cpp PROTOBUFS isoworldremote) #dfhack_plugin(jobutils jobutils.cpp) @@ -140,7 +140,7 @@ set_source_files_properties( Brushes.h PROPERTIES HEADER_FILE_ONLY TRUE ) #dfhack_plugin(mousequery mousequery.cpp) #dfhack_plugin(nestboxes nestboxes.cpp) #dfhack_plugin(orders orders.cpp LINK_LIBRARIES jsoncpp_static) -#dfhack_plugin(overlay overlay.cpp LINK_LIBRARIES lua) +dfhack_plugin(overlay overlay.cpp LINK_LIBRARIES lua) #dfhack_plugin(pathable pathable.cpp LINK_LIBRARIES lua) #dfhack_plugin(petcapRemover petcapRemover.cpp) #dfhack_plugin(plants plants.cpp) diff --git a/plugins/overlay.cpp b/plugins/overlay.cpp index c2a04ac8b..e4dc72308 100644 --- a/plugins/overlay.cpp +++ b/plugins/overlay.cpp @@ -1,87 +1,15 @@ #include "df/viewscreen_adopt_regionst.h" -#include "df/viewscreen_adventure_logst.h" -#include "df/viewscreen_announcelistst.h" -#include "df/viewscreen_assign_display_itemst.h" -#include "df/viewscreen_barterst.h" -#include "df/viewscreen_buildinglistst.h" -#include "df/viewscreen_buildingst.h" #include "df/viewscreen_choose_start_sitest.h" -#include "df/viewscreen_civlistst.h" -#include "df/viewscreen_counterintelligencest.h" -#include "df/viewscreen_createquotast.h" -#include "df/viewscreen_customize_unitst.h" -#include "df/viewscreen_dungeonmodest.h" -#include "df/viewscreen_dungeon_monsterstatusst.h" -#include "df/viewscreen_dungeon_wrestlest.h" #include "df/viewscreen_dwarfmodest.h" -#include "df/viewscreen_entityst.h" -#include "df/viewscreen_export_graphical_mapst.h" #include "df/viewscreen_export_regionst.h" #include "df/viewscreen_game_cleanerst.h" -#include "df/viewscreen_image_creator_mode.h" -#include "df/viewscreen_image_creatorst.h" -#include "df/viewscreen_itemst.h" -#include "df/viewscreen_joblistst.h" -#include "df/viewscreen_jobmanagementst.h" -#include "df/viewscreen_jobst.h" -#include "df/viewscreen_justicest.h" -#include "df/viewscreen_kitchenpref_page.h" -#include "df/viewscreen_kitchenprefst.h" -#include "df/viewscreen_layer_arena_creaturest.h" -#include "df/viewscreen_layer_assigntradest.h" -#include "df/viewscreen_layer_choose_language_namest.h" -#include "df/viewscreen_layer_currencyst.h" -#include "df/viewscreen_layer_export_play_mapst.h" -#include "df/viewscreen_layer.h" -#include "df/viewscreen_layer_militaryst.h" -#include "df/viewscreen_layer_musicsoundst.h" -#include "df/viewscreen_layer_noblelistst.h" -#include "df/viewscreen_layer_overall_healthst.h" -#include "df/viewscreen_layer_reactionst.h" -#include "df/viewscreen_layer_squad_schedulest.h" -#include "df/viewscreen_layer_stockpilest.h" -#include "df/viewscreen_layer_stone_restrictionst.h" -#include "df/viewscreen_layer_unit_actionst.h" -#include "df/viewscreen_layer_unit_healthst.h" -#include "df/viewscreen_layer_unit_relationshipst.h" -#include "df/viewscreen_layer_world_gen_param_presetst.h" -#include "df/viewscreen_layer_world_gen_paramst.h" #include "df/viewscreen_legendsst.h" #include "df/viewscreen_loadgamest.h" -#include "df/viewscreen_locationsst.h" -#include "df/viewscreen_meetingst.h" -#include "df/viewscreen_movieplayerst.h" #include "df/viewscreen_new_regionst.h" -#include "df/viewscreen_noblest.h" -#include "df/viewscreen_optionst.h" -#include "df/viewscreen_overallstatusst.h" -#include "df/viewscreen_petitionsst.h" -#include "df/viewscreen_petst.h" -#include "df/viewscreen_pricest.h" -#include "df/viewscreen_reportlistst.h" -#include "df/viewscreen_requestagreementst.h" #include "df/viewscreen_savegamest.h" -#include "df/viewscreen_selectitemst.h" -#include "df/viewscreen_setupadventurest.h" #include "df/viewscreen_setupdwarfgamest.h" -#include "df/viewscreen_storesst.h" -#include "df/viewscreen_textviewerst.h" #include "df/viewscreen_titlest.h" -#include "df/viewscreen_topicmeeting_fill_land_holder_positionsst.h" -#include "df/viewscreen_topicmeetingst.h" -#include "df/viewscreen_topicmeeting_takerequestsst.h" -#include "df/viewscreen_tradeagreementst.h" -#include "df/viewscreen_tradelistst.h" -#include "df/viewscreen_tradegoodsst.h" -#include "df/viewscreen_treasurelistst.h" -#include "df/viewscreen_unitlist_page.h" -#include "df/viewscreen_unitlistst.h" -#include "df/viewscreen_unitst.h" #include "df/viewscreen_update_regionst.h" -#include "df/viewscreen_wagesst.h" -#include "df/viewscreen_workquota_conditionst.h" -#include "df/viewscreen_workquota_detailsst.h" -#include "df/viewscreen_workshop_profilest.h" #include "Debug.h" #include "LuaTools.h" @@ -163,85 +91,17 @@ struct viewscreen_overlay : T { template<> IMPLEMENT_VMETHOD_INTERPOSE_PRIO(screen##_overlay, render, 100); IMPLEMENT_HOOKS(adopt_region) -IMPLEMENT_HOOKS(adventure_log) -IMPLEMENT_HOOKS(announcelist) -IMPLEMENT_HOOKS(assign_display_item) -IMPLEMENT_HOOKS(barter) -IMPLEMENT_HOOKS(buildinglist) -IMPLEMENT_HOOKS(building) IMPLEMENT_HOOKS(choose_start_site) -IMPLEMENT_HOOKS(civlist) -IMPLEMENT_HOOKS(counterintelligence) -IMPLEMENT_HOOKS(createquota) -IMPLEMENT_HOOKS(customize_unit) -IMPLEMENT_HOOKS(dungeonmode) -IMPLEMENT_HOOKS(dungeon_monsterstatus) -IMPLEMENT_HOOKS(dungeon_wrestle) IMPLEMENT_HOOKS(dwarfmode) -IMPLEMENT_HOOKS(entity) -IMPLEMENT_HOOKS(export_graphical_map) IMPLEMENT_HOOKS(export_region) IMPLEMENT_HOOKS(game_cleaner) -IMPLEMENT_HOOKS(image_creator) -IMPLEMENT_HOOKS(item) -IMPLEMENT_HOOKS(joblist) -IMPLEMENT_HOOKS(jobmanagement) -IMPLEMENT_HOOKS(job) -IMPLEMENT_HOOKS(justice) -IMPLEMENT_HOOKS(kitchenpref) -IMPLEMENT_HOOKS(layer_arena_creature) -IMPLEMENT_HOOKS(layer_assigntrade) -IMPLEMENT_HOOKS(layer_choose_language_name) -IMPLEMENT_HOOKS(layer_currency) -IMPLEMENT_HOOKS(layer_export_play_map) -IMPLEMENT_HOOKS(layer_military) -IMPLEMENT_HOOKS(layer_musicsound) -IMPLEMENT_HOOKS(layer_noblelist) -IMPLEMENT_HOOKS(layer_overall_health) -IMPLEMENT_HOOKS(layer_reaction) -IMPLEMENT_HOOKS(layer_squad_schedule) -IMPLEMENT_HOOKS(layer_stockpile) -IMPLEMENT_HOOKS(layer_stone_restriction) -IMPLEMENT_HOOKS(layer_unit_action) -IMPLEMENT_HOOKS(layer_unit_health) -IMPLEMENT_HOOKS(layer_unit_relationship) -IMPLEMENT_HOOKS(layer_world_gen_param_preset) -IMPLEMENT_HOOKS(layer_world_gen_param) IMPLEMENT_HOOKS(legends) IMPLEMENT_HOOKS(loadgame) -IMPLEMENT_HOOKS(locations) -IMPLEMENT_HOOKS(meeting) -IMPLEMENT_HOOKS(movieplayer) IMPLEMENT_HOOKS(new_region) -IMPLEMENT_HOOKS(noble) -IMPLEMENT_HOOKS(option) -IMPLEMENT_HOOKS(overallstatus) -IMPLEMENT_HOOKS(petitions) -IMPLEMENT_HOOKS(pet) -IMPLEMENT_HOOKS(price) -IMPLEMENT_HOOKS(reportlist) -IMPLEMENT_HOOKS(requestagreement) IMPLEMENT_HOOKS(savegame) -IMPLEMENT_HOOKS(selectitem) -IMPLEMENT_HOOKS(setupadventure) IMPLEMENT_HOOKS(setupdwarfgame) -IMPLEMENT_HOOKS(stores) -IMPLEMENT_HOOKS(textviewer) IMPLEMENT_HOOKS(title) -IMPLEMENT_HOOKS(topicmeeting_fill_land_holder_positions) -IMPLEMENT_HOOKS(topicmeeting) -IMPLEMENT_HOOKS(topicmeeting_takerequests) -IMPLEMENT_HOOKS(tradeagreement) -IMPLEMENT_HOOKS(tradegoods) -IMPLEMENT_HOOKS(tradelist) -IMPLEMENT_HOOKS(treasurelist) -IMPLEMENT_HOOKS(unitlist) -IMPLEMENT_HOOKS(unit) IMPLEMENT_HOOKS(update_region) -IMPLEMENT_HOOKS(wages) -IMPLEMENT_HOOKS(workquota_condition) -IMPLEMENT_HOOKS(workquota_details) -IMPLEMENT_HOOKS(workshop_profile) #undef IMPLEMENT_HOOKS @@ -262,85 +122,17 @@ DFhackCExport command_result plugin_enable(color_ostream &out, bool enable) { DEBUG(control).print("%sing interpose hooks\n", enable ? "enabl" : "disabl"); if (INTERPOSE_HOOKS_FAILED(adopt_region) || - INTERPOSE_HOOKS_FAILED(adventure_log) || - INTERPOSE_HOOKS_FAILED(announcelist) || - INTERPOSE_HOOKS_FAILED(assign_display_item) || - INTERPOSE_HOOKS_FAILED(barter) || - INTERPOSE_HOOKS_FAILED(buildinglist) || - INTERPOSE_HOOKS_FAILED(building) || INTERPOSE_HOOKS_FAILED(choose_start_site) || - INTERPOSE_HOOKS_FAILED(civlist) || - INTERPOSE_HOOKS_FAILED(counterintelligence) || - INTERPOSE_HOOKS_FAILED(createquota) || - INTERPOSE_HOOKS_FAILED(customize_unit) || - INTERPOSE_HOOKS_FAILED(dungeonmode) || - INTERPOSE_HOOKS_FAILED(dungeon_monsterstatus) || - INTERPOSE_HOOKS_FAILED(dungeon_wrestle) || INTERPOSE_HOOKS_FAILED(dwarfmode) || - INTERPOSE_HOOKS_FAILED(entity) || - INTERPOSE_HOOKS_FAILED(export_graphical_map) || INTERPOSE_HOOKS_FAILED(export_region) || INTERPOSE_HOOKS_FAILED(game_cleaner) || - INTERPOSE_HOOKS_FAILED(image_creator) || - INTERPOSE_HOOKS_FAILED(item) || - INTERPOSE_HOOKS_FAILED(joblist) || - INTERPOSE_HOOKS_FAILED(jobmanagement) || - INTERPOSE_HOOKS_FAILED(job) || - INTERPOSE_HOOKS_FAILED(justice) || - INTERPOSE_HOOKS_FAILED(kitchenpref) || - INTERPOSE_HOOKS_FAILED(layer_arena_creature) || - INTERPOSE_HOOKS_FAILED(layer_assigntrade) || - INTERPOSE_HOOKS_FAILED(layer_choose_language_name) || - INTERPOSE_HOOKS_FAILED(layer_currency) || - INTERPOSE_HOOKS_FAILED(layer_export_play_map) || - INTERPOSE_HOOKS_FAILED(layer_military) || - INTERPOSE_HOOKS_FAILED(layer_musicsound) || - INTERPOSE_HOOKS_FAILED(layer_noblelist) || - INTERPOSE_HOOKS_FAILED(layer_overall_health) || - INTERPOSE_HOOKS_FAILED(layer_reaction) || - INTERPOSE_HOOKS_FAILED(layer_squad_schedule) || - INTERPOSE_HOOKS_FAILED(layer_stockpile) || - INTERPOSE_HOOKS_FAILED(layer_stone_restriction) || - INTERPOSE_HOOKS_FAILED(layer_unit_action) || - INTERPOSE_HOOKS_FAILED(layer_unit_health) || - INTERPOSE_HOOKS_FAILED(layer_unit_relationship) || - INTERPOSE_HOOKS_FAILED(layer_world_gen_param_preset) || - INTERPOSE_HOOKS_FAILED(layer_world_gen_param) || INTERPOSE_HOOKS_FAILED(legends) || INTERPOSE_HOOKS_FAILED(loadgame) || - INTERPOSE_HOOKS_FAILED(locations) || - INTERPOSE_HOOKS_FAILED(meeting) || - INTERPOSE_HOOKS_FAILED(movieplayer) || INTERPOSE_HOOKS_FAILED(new_region) || - INTERPOSE_HOOKS_FAILED(noble) || - INTERPOSE_HOOKS_FAILED(option) || - INTERPOSE_HOOKS_FAILED(overallstatus) || - INTERPOSE_HOOKS_FAILED(petitions) || - INTERPOSE_HOOKS_FAILED(pet) || - INTERPOSE_HOOKS_FAILED(price) || - INTERPOSE_HOOKS_FAILED(reportlist) || - INTERPOSE_HOOKS_FAILED(requestagreement) || INTERPOSE_HOOKS_FAILED(savegame) || - INTERPOSE_HOOKS_FAILED(selectitem) || - INTERPOSE_HOOKS_FAILED(setupadventure) || INTERPOSE_HOOKS_FAILED(setupdwarfgame) || - INTERPOSE_HOOKS_FAILED(stores) || - INTERPOSE_HOOKS_FAILED(textviewer) || INTERPOSE_HOOKS_FAILED(title) || - INTERPOSE_HOOKS_FAILED(topicmeeting_fill_land_holder_positions) || - INTERPOSE_HOOKS_FAILED(topicmeeting) || - INTERPOSE_HOOKS_FAILED(topicmeeting_takerequests) || - INTERPOSE_HOOKS_FAILED(tradeagreement) || - INTERPOSE_HOOKS_FAILED(tradegoods) || - INTERPOSE_HOOKS_FAILED(tradelist) || - INTERPOSE_HOOKS_FAILED(treasurelist) || - INTERPOSE_HOOKS_FAILED(unitlist) || - INTERPOSE_HOOKS_FAILED(unit) || - INTERPOSE_HOOKS_FAILED(update_region) || - INTERPOSE_HOOKS_FAILED(wages) || - INTERPOSE_HOOKS_FAILED(workquota_condition) || - INTERPOSE_HOOKS_FAILED(workquota_details) || - INTERPOSE_HOOKS_FAILED(workshop_profile)) + INTERPOSE_HOOKS_FAILED(update_region)) return CR_FAILURE; is_enabled = enable;