Implement technology tree, research queue by least remaining work, and unit/building tech availability & obsolescence

This commit is contained in:
2026-11-09 20:28:53 +01:00
parent d4bd9f4711
commit d266715418
30 changed files with 1809 additions and 45 deletions
+3 -1
View File
@@ -44,6 +44,8 @@ struct UnitConfig {
int attackRange; // 1 for melee, >1 for ranged
int buildCharges;
bool infiniteCharges;
QString requiredTech;
QString obsoleteTech;
QString iconPath;
QStringList actions;
QMap<QString, float> actionSpeeds; // Duration in seconds per action (e.g. "boerderij_bouwen": 10.0f)
@@ -54,7 +56,7 @@ struct UnitConfig {
: id(""), name(""), category(UnitCategory::Builder),
movementDomain(MovementDomain::Land), health(100),
movementSpeed(2.0f), cost(10), laborCost(1000), attackDamage(0), attackRange(1),
buildCharges(-1), infiniteCharges(true), iconPath("") {}
buildCharges(-1), infiniteCharges(true), requiredTech(""), obsoleteTech(""), iconPath("") {}
bool isRanged() const { return attackRange > 1; }
bool isMilitary() const { return category == UnitCategory::Military; }