From 6275905644921414fd1997afbe6724fb2594a65c Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Thu, 16 Aug 2018 11:33:59 -0500 Subject: [PATCH] nestboxes: Use buildings.others[NEST_BOX] Should minimize performance impact (not that it was much before) --- plugins/nestboxes.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/nestboxes.cpp b/plugins/nestboxes.cpp index 4276bef380..b527322c2b 100644 --- a/plugins/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)