From 99a0bf0690aef8193bd273ecde700dd4eefa2b9e Mon Sep 17 00:00:00 2001
From: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
Date: Sat, 7 Nov 2026 17:39:20 -0800
Subject: [PATCH] advisors: Store plant and cultivate values under their own
 activity keys

initialize_infrastructure_cache() filed the plant and cultivate
valuations under ACTIVITY_MINE and ACTIVITY_IRRIGATE, while
autoworkers.c reads them back by action_id_get_activity(), i.e.
ACTIVITY_PLANT and ACTIVITY_CULTIVATE, which stay at -1. So the ">= 0"
test fails on every tile, and no AI or auto-worker has planted or
cultivated anything, in any ruleset.

Signed-off-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
---
 server/advisors/infracache.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/advisors/infracache.c b/server/advisors/infracache.c
index 77b9243b8c..efed90edb4 100644
--- a/server/advisors/infracache.c
+++ b/server/advisors/infracache.c
@@ -263,9 +263,9 @@ void initialize_infrastructure_cache(struct player *pplayer)
     } city_map_iterate_end;
 
     city_tile_iterate_index(nmap, radius_sq, pcenter, ptile, cindex) {
-      adv_city_worker_act_set(pcity, cindex, ACTIVITY_MINE,
+      adv_city_worker_act_set(pcity, cindex, ACTIVITY_PLANT,
                               adv_calc_plant(pcity, ptile));
-      adv_city_worker_act_set(pcity, cindex, ACTIVITY_IRRIGATE,
+      adv_city_worker_act_set(pcity, cindex, ACTIVITY_CULTIVATE,
                               adv_calc_cultivate(pcity, ptile));
       adv_city_worker_act_set(pcity, cindex, ACTIVITY_TRANSFORM,
                               adv_calc_transform(pcity, ptile));
-- 
2.55.0

