Complete city production queue implementation

This commit is contained in:
bart
2026-11-08 22:30:13 +01:00
parent 4eda595861
commit 980e777199
14 changed files with 222 additions and 20 deletions
+4
View File
@@ -17,6 +17,7 @@ RoadConfigManager::RoadConfigManager()
dirt.colorStr = "#c49a62";
dirt.borderColorStr = "#6b4b23";
dirt.width = 3.5f;
dirt.worldWidth = 0.11f;
dirt.cost = 5;
m_types["dirt"] = dirt;
@@ -27,6 +28,7 @@ RoadConfigManager::RoadConfigManager()
stone.colorStr = "#9aa1a8";
stone.borderColorStr = "#464b50";
stone.width = 4.0f;
stone.worldWidth = 0.13f;
stone.cost = 15;
m_types["stone"] = stone;
@@ -37,6 +39,7 @@ RoadConfigManager::RoadConfigManager()
rail.colorStr = "#3a3c40";
rail.borderColorStr = "#181a1c";
rail.width = 4.5f;
rail.worldWidth = 0.15f;
rail.cost = 30;
m_types["rail"] = rail;
}
@@ -72,6 +75,7 @@ bool RoadConfigManager::loadConfigFile(const QString &filePath)
rCfg.colorStr = it.value().hasChild("color") ? it.value()["color"].asString("#c49a62") : "#c49a62";
rCfg.borderColorStr = it.value().hasChild("border_color") ? it.value()["border_color"].asString("#6b4b23") : "#6b4b23";
rCfg.width = it.value().hasChild("width") ? it.value()["width"].asFloat(3.5f) : 3.5f;
rCfg.worldWidth = it.value().hasChild("world_width") ? it.value()["world_width"].asFloat(0.11f) : 0.11f;
rCfg.cost = it.value().hasChild("cost") ? it.value()["cost"].asInt(5) : 5;
m_types[rCfg.id] = rCfg;
}