Implement technology tree, research queue by least remaining work, and unit/building tech availability & obsolescence
This commit is contained in:
@@ -12,7 +12,8 @@ class City;
|
||||
enum class ActionNeededType {
|
||||
UnitIdle = 0,
|
||||
CityNoProduction = 1,
|
||||
CityFreePopulation = 2
|
||||
CityFreePopulation = 2,
|
||||
NoResearch = 3
|
||||
};
|
||||
|
||||
struct ActionItem {
|
||||
@@ -33,6 +34,7 @@ struct ActionNeededConfig {
|
||||
bool trackIdleUnits = true;
|
||||
bool trackCityNoProduction = true;
|
||||
bool trackCityFreePopulation = true;
|
||||
bool trackNoResearch = true;
|
||||
int maxVisibleItems = 8;
|
||||
|
||||
int itemWidth = 155;
|
||||
@@ -46,6 +48,7 @@ struct ActionNeededConfig {
|
||||
QColor unitIdleColor = QColor(60, 160, 255);
|
||||
QColor cityNoProdColor = QColor(255, 160, 40);
|
||||
QColor cityFreePopColor = QColor(70, 220, 130);
|
||||
QColor noResearchColor = QColor(56, 200, 255);
|
||||
QColor cardBgColor = QColor(18, 24, 34);
|
||||
int cardBgAlpha = 235;
|
||||
};
|
||||
@@ -59,7 +62,8 @@ public:
|
||||
|
||||
void update(float deltaTime, int activePlayerId,
|
||||
const std::vector<std::shared_ptr<Unit>> &units,
|
||||
const std::vector<City> &cities);
|
||||
const std::vector<City> &cities,
|
||||
bool needsResearch = false);
|
||||
|
||||
std::vector<ActionItem> getVisibleItems() const;
|
||||
int getVisibleCount() const;
|
||||
|
||||
Reference in New Issue
Block a user