diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 951a1d2d6..d0e7df34b 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -138,6 +138,7 @@ if (BUILD_SUPPORTED) DFHACK_PLUGIN(misery misery.cpp) DFHACK_PLUGIN(mode mode.cpp) DFHACK_PLUGIN(mousequery mousequery.cpp) + DFHACK_PLUGIN(nestboxes nestboxes.cpp) DFHACK_PLUGIN(orders orders.cpp LINK_LIBRARIES jsoncpp_lib_static) DFHACK_PLUGIN(pathable pathable.cpp LINK_LIBRARIES lua) DFHACK_PLUGIN(petcapRemover petcapRemover.cpp) diff --git a/plugins/devel/CMakeLists.txt b/plugins/devel/CMakeLists.txt index 4fb4b5cf5..9478ba805 100644 --- a/plugins/devel/CMakeLists.txt +++ b/plugins/devel/CMakeLists.txt @@ -11,7 +11,6 @@ DFHACK_PLUGIN(eventExample eventExample.cpp) DFHACK_PLUGIN(frozen frozen.cpp) DFHACK_PLUGIN(kittens kittens.cpp) DFHACK_PLUGIN(memview memview.cpp memutils.cpp LINK_LIBRARIES lua) -DFHACK_PLUGIN(nestboxes nestboxes.cpp) DFHACK_PLUGIN(notes notes.cpp) DFHACK_PLUGIN(onceExample onceExample.cpp) DFHACK_PLUGIN(renderer-msg renderer-msg.cpp) diff --git a/plugins/devel/nestboxes.cpp b/plugins/nestboxes.cpp similarity index 87% rename from plugins/devel/nestboxes.cpp rename to plugins/nestboxes.cpp index 634735f78..b527322c2 100644 --- a/plugins/devel/nestboxes.cpp +++ b/plugins/nestboxes.cpp @@ -8,6 +8,7 @@ #include "df/ui.h" #include "df/building_nest_boxst.h" #include "df/building_type.h" +#include "df/buildings_other_id.h" #include "df/global_objects.h" #include "df/item.h" #include "df/unit.h" @@ -37,7 +38,7 @@ static void eggscan(color_ostream &out) { CoreSuspender suspend; - for (df::building *build : world->buildings.all) + for (df::building *build : world->buildings.other[df::buildings_other_id::NEST_BOX]) { auto type = build->getType(); if (df::enums::building_type::NestBox == type) @@ -68,9 +69,11 @@ DFhackCExport command_result plugin_init (color_ostream &out, std::vector & parameters) { CoreSuspender suspend; - bool clean = false; - int dump_count = 0; - int good_egg = 0; if (parameters.size() == 1) { if (parameters[0] == "enable")