From fc69ac911a7ace887e55608971cf0d4a142fae22 Mon Sep 17 00:00:00 2001
From: John Robertson <jro@advops.com>
Date: Sun, 11 Jan 2026 15:53:08 -0700
Subject: [PATCH] move workers on sentry in the city to autoworker upon
 polution or fallout notification

---
 server/cityturn.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/server/cityturn.c b/server/cityturn.c
index d078de212e..7c4c0bf39c 100644
--- a/server/cityturn.c
+++ b/server/cityturn.c
@@ -3570,6 +3570,14 @@ static bool place_pollution(struct city *pcity, enum extra_cause cause)
     if (pextra != nullptr && !tile_has_extra(ptile, pextra)) {
       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->ssa_controller = SSA_AUTOWORKER;
+          send_unit_info(NULL, punit);
+        }
+      }
+      unit_list_iterate_end;
 
       return TRUE;
     }
-- 
2.43.0

