From 1d976385794a7050b2c5c9a4db169653080842fe Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Thu, 1 Dec 2016 11:10:52 -0600 Subject: [PATCH] Mysteriously disappearing code reinserted --- plugins/labormanager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/labormanager.cpp b/plugins/labormanager.cpp index 49645234a..12e8aa0c3 100644 --- a/plugins/labormanager.cpp +++ b/plugins/labormanager.cpp @@ -682,6 +682,8 @@ static df::unit_labor construction_build_labor (df::building_actual* b) // Trade depots and bridges use the last one too // Must check use mode b/c buildings may have items in them that are not part of the building + df::item* i = 0; + for (auto p = b->contained_items.begin(); p != b->contained_items.end(); p++) if ((*p)->use_mode == 2) i = (*p)->item;