Skip to content

Commit c3174aa

Browse files
committed
figures: correct proceed phase from houses state
1 parent ba201c9 commit c3174aa

6 files changed

+6
-6
lines changed

src/figuretype/figure_governor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void figure_governor::figure_action() {
6060
sound_key figure_governor::phrase_key() const {
6161
int nobles_in_city = 0;
6262
buildings_valid_do([&] (building &b) {
63-
if (!b.house_size || !b.house_population || b.subtype.house_level < HOUSE_COMMON_MANOR) {
63+
if (!b.house_size || b.house_population <= 0 || b.subtype.house_level < HOUSE_COMMON_MANOR) {
6464
return;
6565
}
6666
nobles_in_city += b.house_population;

src/figuretype/figure_juggler.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ sound_key figure_juggler::phrase_key() const {
3333

3434
int houses_in_disease = 0;
3535
buildings_valid_do([&] (building &b) {
36-
if (!b.house_size || !b.house_population) {
36+
if (!b.house_size || b.house_population <= 0) {
3737
return;
3838
}
3939
houses_in_disease = (b.disease_days > 0) ? 1 : 0;

src/figuretype/figure_labor_seeker.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ sound_key figure_labor_seeker::phrase_key() const {
6262

6363
int houses_in_disease = 0;
6464
buildings_valid_do([&] (building &b) {
65-
if (!b.house_size || !b.house_population) {
65+
if (!b.house_size || b.house_population <= 0) {
6666
return;
6767
}
6868
houses_in_disease = (b.disease_days > 0) ? 1 : 0;

src/figuretype/figure_magistrate.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void figure_magistrate::figure_before_action() {
4141
sound_key figure_magistrate::phrase_key() const {
4242
int houses_in_disease = 0;
4343
buildings_valid_do([&] (building &b) {
44-
if (!b.house_size || !b.house_population) {
44+
if (!b.house_size || b.house_population <= 0) {
4545
return;
4646
}
4747
houses_in_disease = (b.disease_days > 0) ? 1 : 0;

src/figuretype/figure_priest.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ sound_key figure_priest::phrase_key() const {
7676

7777
int houses_in_disease = 0;
7878
buildings_valid_do([&] (building &b) {
79-
if (!b.house_size || !b.house_population) {
79+
if (!b.house_size || b.house_population <= 0) {
8080
return;
8181
}
8282
houses_in_disease = (b.disease_days > 0) ? 1 : 0;

src/figuretype/figure_senet_player.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ sound_key figure_senet_player::phrase_key() const {
2929

3030
int houses_in_disease = 0;
3131
buildings_valid_do([&] (building &b) {
32-
if (!b.house_size || !b.house_population) {
32+
if (!b.house_size || b.house_population <= 0) {
3333
return;
3434
}
3535
houses_in_disease = (b.disease_days > 0) ? 1 : 0;

0 commit comments

Comments
 (0)