From ba72675cbb89919263d9a073cbd55509dfe59909 Mon Sep 17 00:00:00 2001 From: Dino Date: Mon, 20 Jul 2026 20:17:29 -0400 Subject: [PATCH] move workers on sentry in the city to autoworker upon polution or fallout notification RM #1900 --- server/cityturn.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/server/cityturn.c b/server/cityturn.c index 5fefde2ae5..31595a11c1 100644 --- a/server/cityturn.c +++ b/server/cityturn.c @@ -3441,6 +3441,17 @@ static bool place_pollution(struct city *pcity, enum extra_cause cause) tile_add_extra(ptile, pextra); update_tile_knowledge(ptile); + unit_list_iterate((city_tile(pcity))->units, punit) { + if (unit_has_type_flag(punit, UTYF_WORKERS) + && punit->activity == ACTIVITY_SENTRY + && punit->transporter == NULL) { + punit->ssa_controller = SSA_AUTOWORKER; + send_unit_info(NULL, punit); + } + } + unit_list_iterate_end; + + return TRUE; } k--; -- 2.31.0