Skip to content

Commit

Permalink
nestboxes: Use buildings.others[NEST_BOX]
Browse files Browse the repository at this point in the history
Should minimize performance impact (not that it was much before)
  • Loading branch information
ab9rf committed Aug 16, 2018
1 parent 784c3b1 commit 6275905
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/nestboxes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 6275905

Please sign in to comment.