Skip to content

Commit

Permalink
Fixes for great temples and priests with a pantheon (Keriew#168)
Browse files Browse the repository at this point in the history
* Fix Mars great temple not sending priest to the pantheon

* Prevent the pantheon from sending priest to itself
  • Loading branch information
HyperJeanJean authored Dec 10, 2020
1 parent 6ae77f4 commit 8dd1f51
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/building/figure.c
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,16 @@ static void spawn_figure_grand_temple_mars(building* b) {
}

}

// Pantheon Module 1 Bonus
if (!b->figure_id4 && building_monument_pantheon_module_is_active(PANTHEON_MODULE_1_DESTINATION_PRIESTS)) {
figure* f = figure_create(FIGURE_PRIEST, road.x, road.y, DIR_4_BOTTOM);
int pantheon_id = building_monument_working(BUILDING_PANTHEON);
b->figure_id4 = f->id;
f->destination_building_id = pantheon_id;
f->building_id = b->id;
f->action_state = FIGURE_ACTION_212_DESTINATION_PRIEST_CREATED;
}
}
}

Expand Down Expand Up @@ -1048,7 +1058,7 @@ static void spawn_figure_temple(building *b)
}

// Pantheon Module 1 Bonus
if (!b->figure_id4 && building_monument_pantheon_module_is_active(PANTHEON_MODULE_1_DESTINATION_PRIESTS)) {
if (b->type != BUILDING_PANTHEON && !b->figure_id4 && building_monument_pantheon_module_is_active(PANTHEON_MODULE_1_DESTINATION_PRIESTS)) {
figure* f = figure_create(FIGURE_PRIEST, road.x, road.y, DIR_4_BOTTOM);
int pantheon_id = building_monument_working(BUILDING_PANTHEON);
b->figure_id4 = f->id;
Expand Down

0 comments on commit 8dd1f51

Please sign in to comment.