From: <geo...@us...> - 2012-12-15 20:15:51
|
Revision: 5544 http://freeorion.svn.sourceforge.net/freeorion/revision/?rev=5544&view=rev Author: geoffthemedio Date: 2012-12-15 20:15:45 +0000 (Sat, 15 Dec 2012) Log Message: ----------- Added CanProduceShips and (when applicable) CanColonize conditions to UI for ships in producible items list. Modified Paths: -------------- trunk/FreeOrion/UI/BuildDesignatorWnd.cpp Modified: trunk/FreeOrion/UI/BuildDesignatorWnd.cpp =================================================================== --- trunk/FreeOrion/UI/BuildDesignatorWnd.cpp 2012-12-15 20:13:53 UTC (rev 5543) +++ trunk/FreeOrion/UI/BuildDesignatorWnd.cpp 2012-12-15 20:15:45 UTC (rev 5544) @@ -198,9 +198,15 @@ int empire_id) { std::vector<const Condition::ConditionBase*> location_conditions; + Condition::CanProduceShips can_prod_ship_cond; + location_conditions.push_back(&can_prod_ship_cond); Condition::OwnerHasShipDesignAvailable ship_avail_cond(ship_design_id); location_conditions.push_back(&ship_avail_cond); if (const ShipDesign* ship_design = GetShipDesign(ship_design_id)) { + if (ship_design->CanColonize()) { + Condition::CanColonize can_colonize_cond; + location_conditions.push_back(&can_colonize_cond); + } if (const HullType* hull_type = ship_design->GetHull()) location_conditions.push_back(hull_type->Location()); std::vector<std::string> parts = ship_design->Parts(); @@ -280,7 +286,7 @@ int Location() const { return m_location_id; } - void SizeMove(const GG::Pt& ul, const GG::Pt& lr) { + void SizeMove(const GG::Pt& ul, const GG::Pt& lr) { const GG::Pt old_size = Size(); GG::ListBox::Row::SizeMove(ul, lr); //std::cout << "ProductionItemRow::SizeMove size: (" << Value(Width()) << ", " << Value(Height()) << ")" << std::endl; |