Skip to content

Commit f82286e

Browse files
committed
fix #200. Track palace building id on update
1 parent ebfc2f8 commit f82286e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/building/building_palace.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ void building_palace::on_destroy() {
5353
g_city.buildings.remove_palace(base);
5454
}
5555

56+
void building_palace::update_count() const {
57+
g_city.buildings.track_building(base, true);
58+
}
59+
5660
bool building_palace::can_play_animation() const {
5761
return worker_percentage() > 50;
5862
}

src/building/building_palace.h

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class building_palace : public building_impl {
1010
virtual void on_create(int orientation) override;
1111
virtual void on_post_load() override;
1212
virtual void on_destroy() override;
13+
virtual void update_count() const override;
1314
virtual bool can_play_animation() const override;
1415
virtual void update_graphic() override;
1516
virtual void draw_tooltip(tooltip_context *c) override;

0 commit comments

Comments
 (0)