Reset layout error counters after town construction
This commit is contained in:
@@ -27,6 +27,11 @@ Game::Game() {
|
||||
this->towns_growth_tiles_last_month = this->towns_growth_tiles;
|
||||
this->towns_growth_tiles.clear();
|
||||
});
|
||||
this->events.listen<event::TownBuilt>(event::Slot::GAME, [this] (const event::TownBuilt &event) {
|
||||
t->cm.hs_total = t->cm.hs_last_month = t->cm.hs_total_prev = 0;
|
||||
t->cm.cs_total = t->cm.cs_last_month = t->cm.cs_total_prev = 0;
|
||||
t->cm.hr_total = t->cm.hr_last_month = t->cm.hr_total_prev = 0;
|
||||
});
|
||||
|
||||
this->events.listen<event::TownGrowthSucceeded>(event::Slot::GAME, [this] (const event::TownGrowthSucceeded &event) {
|
||||
if (event.town->cache.num_houses <= event.prev_houses) {
|
||||
|
||||
Reference in New Issue
Block a user