#pragma once #include #include "BufferedBuildingContent.h" #include "SelectionContentFactory.h" // The card for a Smelter or a Reprocessing Plant (REQ-UI-SELECTION-CONTENT). Both // auto-process whatever they receive and have no player-facing recipe selection // (REQ-BLD-SMELTER, REQ-BLD-REPROCESSING), so the card has no configuration group at // all; its cycle is whichever recipe is in production, or the last one that was. class AutoProductionContent : public BufferedBuildingContent { Q_OBJECT public: AutoProductionContent(const SelectionContext& context, const SelectionRequest& request, QWidget* parent = nullptr); protected: CycleInfo getCycleInfo(const BuildingTarget& target) const override; private: // The recipe last seen in production, which keeps describing the cycle while the // building sits between cycles (REQ-UI-RECIPE-SUMMARY). Mutable because it is a // record of what getCycleInfo() has observed rather than state of its own: the card // shows the same thing whether or not it has been asked before. mutable std::string m_lastRecipeId; };