diff options
author | Hop311 <Hop3114@gmail.com> | 2023-07-28 00:10:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-28 00:10:46 +0200 |
commit | 8a08be3e7e8477973e243716d431ad7117acfa43 (patch) | |
tree | a91587787bf6742168279ac41f77b9ebabe0dffe /src/openvic/map/Building.cpp | |
parent | 420c2dce47e74c01ff46be991058d543e0c70a6b (diff) | |
parent | 532c9be36ca03ee13c92ca7d895aaf5b42eeb034 (diff) |
Merge pull request #9 from OpenVicProject/pops
Pops and other bits
Diffstat (limited to 'src/openvic/map/Building.cpp')
-rw-r--r-- | src/openvic/map/Building.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/openvic/map/Building.cpp b/src/openvic/map/Building.cpp index 317ccdf..81532c4 100644 --- a/src/openvic/map/Building.cpp +++ b/src/openvic/map/Building.cpp @@ -100,11 +100,11 @@ return_t BuildingManager::add_building_type(std::string const& identifier, Build return FAILURE; } if (max_level < 0) { - Logger::error("Invalid building type max level: ", max_level); + Logger::error("Invalid building type max level for ", identifier, ": ", max_level); return FAILURE; } if (build_time < 0) { - Logger::error("Invalid building type build time: ", build_time); + Logger::error("Invalid building type build time for ", identifier, ": ", build_time); return FAILURE; } return building_types.add_item({ identifier, max_level, build_time }); @@ -127,7 +127,7 @@ return_t BuildingManager::generate_province_buildings(Province& province) const if (province.is_water()) return SUCCESS; return_t ret = SUCCESS; for (BuildingType const& type : building_types.get_items()) - if (province.add_building(type) != SUCCESS) ret = FAILURE; + if (province.add_building({ type }) != SUCCESS) ret = FAILURE; province.lock_buildings(); return ret; } |