From 6558fe9777ea58556501f097d5c8c600f97f7603 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Sun, 17 Mar 2024 23:05:46 +0200
Subject: [PATCH 18/18] Unhardcode wld.map from
 is_action_enabled_unit_on_city()

See RM #320

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 ai/default/aitools.c               | 28 +++++++++++++++-------------
 ai/default/aiunit.c                | 14 ++++++++------
 ai/default/daicity.c               |  5 +++--
 common/actions.c                   |  8 ++++----
 common/actions.h                   |  3 ++-
 common/unit.c                      |  4 +++-
 server/actiontools.c               |  6 ++++--
 server/scripting/api_server_edit.c |  6 +++---
 server/unithand.c                  | 15 +++++++++------
 9 files changed, 51 insertions(+), 38 deletions(-)

diff --git a/ai/default/aitools.c b/ai/default/aitools.c
index 53ee9f61f5..9bb286c2ab 100644
--- a/ai/default/aitools.c
+++ b/ai/default/aitools.c
@@ -820,6 +820,7 @@ bool dai_unit_attack(struct ai_type *ait, struct unit *punit, struct tile *ptile
   int sanity = punit->id;
   bool alive;
   struct city *tcity;
+  const struct civ_map *nmap = &(wld.map);
 
   CHECK_UNIT(punit);
   fc_assert_ret_val(is_ai(unit_owner(punit)), TRUE);
@@ -862,7 +863,7 @@ bool dai_unit_attack(struct ai_type *ait, struct unit *punit, struct tile *ptile
                    0, "", ACTION_NUKE);
   } else if (action_id_get_target_kind(ACTION_NUKE) == ATK_CITY
              && (tcity = tile_city(ptile))
-             && is_action_enabled_unit_on_city(ACTION_NUKE,
+             && is_action_enabled_unit_on_city(nmap, ACTION_NUKE,
                                                punit, tcity)) {
     /* Choose "Explode Nuclear". */
     unit_do_action(unit_owner(punit), punit->id, tcity->id,
@@ -875,7 +876,7 @@ bool dai_unit_attack(struct ai_type *ait, struct unit *punit, struct tile *ptile
                    0, "", ACTION_NUKE_CITY);
   } else if (action_id_get_target_kind(ACTION_NUKE_CITY) == ATK_CITY
              && (tcity = tile_city(ptile))
-             && is_action_enabled_unit_on_city(ACTION_NUKE_CITY,
+             && is_action_enabled_unit_on_city(nmap, ACTION_NUKE_CITY,
                                                punit, tcity)) {
     /* Choose "Nuke City". */
     unit_do_action(unit_owner(punit), punit->id, tcity->id,
@@ -891,44 +892,44 @@ bool dai_unit_attack(struct ai_type *ait, struct unit *punit, struct tile *ptile
     unit_do_action(unit_owner(punit), punit->id, tile_index(ptile),
                    0, "", ACTION_SUICIDE_ATTACK);
   } else if ((tcity = tile_city(ptile))
-             && is_action_enabled_unit_on_city(ACTION_CONQUER_CITY,
+             && is_action_enabled_unit_on_city(nmap, ACTION_CONQUER_CITY,
                                                punit, tcity)) {
     /* Choose "Conquer City". */
     unit_do_action(unit_owner(punit), punit->id, tcity->id,
                    0, "", ACTION_CONQUER_CITY);
   } else if ((tcity = tile_city(ptile))
-             && is_action_enabled_unit_on_city(ACTION_CONQUER_CITY2,
+             && is_action_enabled_unit_on_city(nmap, ACTION_CONQUER_CITY2,
                                                punit, tcity)) {
     /* Choose "Conquer City 2". */
     unit_do_action(unit_owner(punit), punit->id, tcity->id,
                    0, "", ACTION_CONQUER_CITY2);
   } else if ((tcity = tile_city(ptile))
-             && is_action_enabled_unit_on_city(ACTION_CONQUER_CITY3,
+             && is_action_enabled_unit_on_city(nmap, ACTION_CONQUER_CITY3,
                                                punit, tcity)) {
     /* Choose "Conquer City 3". */
     unit_do_action(unit_owner(punit), punit->id, tcity->id,
                    0, "", ACTION_CONQUER_CITY3);
   } else if ((tcity = tile_city(ptile))
-             && is_action_enabled_unit_on_city(ACTION_CONQUER_CITY4,
+             && is_action_enabled_unit_on_city(nmap, ACTION_CONQUER_CITY4,
                                                punit, tcity)) {
     /* Choose "Conquer City 4". */
     unit_do_action(unit_owner(punit), punit->id, tcity->id,
                    0, "", ACTION_CONQUER_CITY4);
-  } else if (!can_unit_survive_at_tile(&(wld.map), punit, ptile)
+  } else if (!can_unit_survive_at_tile(nmap, punit, ptile)
              && ((ptrans = transporter_for_unit_at(punit, ptile)))
              && is_action_enabled_unit_on_unit(ACTION_TRANSPORT_EMBARK,
                                                punit, ptrans)) {
     /* "Transport Embark". */
     unit_do_action(unit_owner(punit), punit->id, ptrans->id,
                    0, "", ACTION_TRANSPORT_EMBARK);
-  } else if (!can_unit_survive_at_tile(&(wld.map), punit, ptile)
+  } else if (!can_unit_survive_at_tile(nmap, punit, ptile)
              && ((ptrans = transporter_for_unit_at(punit, ptile)))
              && is_action_enabled_unit_on_unit(ACTION_TRANSPORT_EMBARK2,
                                                punit, ptrans)) {
     /* "Transport Embark 2". */
     unit_do_action(unit_owner(punit), punit->id, ptrans->id,
                    0, "", ACTION_TRANSPORT_EMBARK2);
-  } else if (!can_unit_survive_at_tile(&(wld.map), punit, ptile)
+  } else if (!can_unit_survive_at_tile(nmap, punit, ptile)
              && ((ptrans = transporter_for_unit_at(punit, ptile)))
              && is_action_enabled_unit_on_unit(ACTION_TRANSPORT_EMBARK3,
                                                punit, ptrans)) {
@@ -1075,6 +1076,7 @@ bool dai_unit_move(struct ai_type *ait, struct unit *punit, struct tile *ptile)
   int sanity = punit->id;
   struct player *pplayer = unit_owner(punit);
   const bool is_plr_ai = is_ai(pplayer);
+  const struct civ_map *nmap = &(wld.map);
 
   CHECK_UNIT(punit);
   fc_assert_ret_val_msg(is_tiles_adjacent(unit_tile(punit), ptile), FALSE,
@@ -1108,19 +1110,19 @@ bool dai_unit_move(struct ai_type *ait, struct unit *punit, struct tile *ptile)
   }
 
   /* Select move kind. */
-  if (!can_unit_survive_at_tile(&(wld.map), punit, ptile)
+  if (!can_unit_survive_at_tile(nmap, punit, ptile)
       && ((ptrans = transporter_for_unit_at(punit, ptile)))
       && is_action_enabled_unit_on_unit(ACTION_TRANSPORT_EMBARK,
                                         punit, ptrans)) {
     /* "Transport Embark". */
     paction = action_by_number(ACTION_TRANSPORT_EMBARK);
-  } else if (!can_unit_survive_at_tile(&(wld.map), punit, ptile)
+  } else if (!can_unit_survive_at_tile(nmap, punit, ptile)
              && ptrans != NULL
              && is_action_enabled_unit_on_unit(ACTION_TRANSPORT_EMBARK2,
                                                punit, ptrans)) {
     /* "Transport Embark 2". */
     paction = action_by_number(ACTION_TRANSPORT_EMBARK2);
-  } else if (!can_unit_survive_at_tile(&(wld.map), punit, ptile)
+  } else if (!can_unit_survive_at_tile(nmap, punit, ptile)
              && ptrans != NULL
              && is_action_enabled_unit_on_unit(ACTION_TRANSPORT_EMBARK3,
                                                punit, ptrans)) {
@@ -1191,7 +1193,7 @@ bool dai_unit_move(struct ai_type *ait, struct unit *punit, struct tile *ptile)
   if (action_has_result(paction, ACTRES_UNIT_MOVE)
       || action_has_result(paction, ACTRES_TRANSPORT_DISEMBARK)) {
     /* The unit will have to move it self rather than being moved. */
-    int mcost = map_move_cost_unit(&(wld.map), punit, ptile);
+    int mcost = map_move_cost_unit(nmap, punit, ptile);
 
     if (paction) {
       struct tile *from_tile;
diff --git a/ai/default/aiunit.c b/ai/default/aiunit.c
index bedc0747ae..c2cbb5f233 100644
--- a/ai/default/aiunit.c
+++ b/ai/default/aiunit.c
@@ -1987,6 +1987,7 @@ static void dai_caravan_goto(struct ai_type *ait, struct player *pplayer,
 {
   bool alive = TRUE;
   struct unit_ai *unit_data = def_ai_unit_data(punit, ait);
+  const struct civ_map *nmap = &(wld.map);
 
   fc_assert_ret(NULL != dest_city);
 
@@ -2030,7 +2031,7 @@ static void dai_caravan_goto(struct ai_type *ait, struct player *pplayer,
     if (unit_transported(punit)) {
       aiferry_clear_boat(ait, punit);
     }
-    if (help_wonder && is_action_enabled_unit_on_city(ACTION_HELP_WONDER,
+    if (help_wonder && is_action_enabled_unit_on_city(nmap, ACTION_HELP_WONDER,
                                                       punit, dest_city)) {
         /*
          * We really don't want to just drop all caravans in immediately.
@@ -2045,7 +2046,7 @@ static void dai_caravan_goto(struct ai_type *ait, struct player *pplayer,
                city_name_get(dest_city));
       unit_do_action(pplayer, punit->id, dest_city->id,
                      0, "", ACTION_HELP_WONDER);
-    } else if (is_action_enabled_unit_on_city(ACTION_TRADE_ROUTE,
+    } else if (is_action_enabled_unit_on_city(nmap, ACTION_TRADE_ROUTE,
                                               punit, dest_city)) {
       log_base(LOG_CARAVAN, "%s %s[%d](%d,%d) creates trade route in %s",
                nation_rule_name(nation_of_unit(punit)),
@@ -2055,7 +2056,7 @@ static void dai_caravan_goto(struct ai_type *ait, struct player *pplayer,
                city_name_get(dest_city));
       unit_do_action(pplayer, punit->id, dest_city->id,
                      0, "", ACTION_TRADE_ROUTE);
-    } else if (is_action_enabled_unit_on_city(ACTION_MARKETPLACE,
+    } else if (is_action_enabled_unit_on_city(nmap, ACTION_MARKETPLACE,
                                               punit, dest_city)) {
       /* Get the one time bonus. */
       log_base(LOG_CARAVAN, "%s %s[%d](%d,%d) enters marketplace of %s",
@@ -2265,6 +2266,7 @@ static void dai_manage_caravan(struct ai_type *ait, struct player *pplayer,
   bool required_boat = FALSE;
   bool request_boat = FALSE;
   bool tired_of_waiting_boat = FALSE;
+  const struct civ_map *nmap = &(wld.map);
 
   CHECK_UNIT(punit);
 
@@ -2311,13 +2313,13 @@ static void dai_manage_caravan(struct ai_type *ait, struct player *pplayer,
             && !city_production_gets_caravan_shields(&city_dest->production))
         || (unit_data->task == AIUNIT_TRADE
             && real_map_distance(city_dest->tile, unit_tile(punit)) <= 1
-            && !(is_action_enabled_unit_on_city(ACTION_TRADE_ROUTE,
+            && !(is_action_enabled_unit_on_city(nmap, ACTION_TRADE_ROUTE,
                                                 punit, city_dest)
-                 || is_action_enabled_unit_on_city(ACTION_MARKETPLACE,
+                 || is_action_enabled_unit_on_city(nmap, ACTION_MARKETPLACE,
                                                    punit, city_dest)))
         || (unit_data->task == AIUNIT_WONDER
             && real_map_distance(city_dest->tile, unit_tile(punit)) <= 1
-            && !is_action_enabled_unit_on_city(ACTION_HELP_WONDER,
+            && !is_action_enabled_unit_on_city(nmap, ACTION_HELP_WONDER,
                                                punit, city_dest))) {
       /* destination invalid! */
       dai_unit_new_task(ait, punit, AIUNIT_NONE, NULL);
diff --git a/ai/default/daicity.c b/ai/default/daicity.c
index 49c749570f..626378f281 100644
--- a/ai/default/daicity.c
+++ b/ai/default/daicity.c
@@ -453,6 +453,7 @@ static void unit_do_disband_trad(struct player *owner, struct unit *punit,
                                  const enum action_requester requester)
 {
   const int punit_id_stored = punit->id;
+  const struct civ_map *nmap = &(wld.map);
 
   fc_assert_ret(owner == unit_owner(punit));
 
@@ -465,7 +466,7 @@ static void unit_do_disband_trad(struct player *owner, struct unit *punit,
     tgt_city = tile_city(unit_tile(punit));
 
     if (tgt_city
-        && is_action_enabled_unit_on_city(ACTION_HELP_WONDER,
+        && is_action_enabled_unit_on_city(nmap, ACTION_HELP_WONDER,
                                           punit, tgt_city)) {
       if (unit_perform_action(owner, punit->id, tgt_city->id,
                               0, NULL, ACTION_HELP_WONDER, requester)) {
@@ -489,7 +490,7 @@ static void unit_do_disband_trad(struct player *owner, struct unit *punit,
     tgt_city = tile_city(unit_tile(punit));
 
     if (tgt_city
-        && is_action_enabled_unit_on_city(ACTION_DISBAND_UNIT_RECOVER,
+        && is_action_enabled_unit_on_city(nmap, ACTION_DISBAND_UNIT_RECOVER,
                                           punit, tgt_city)) {
       if (unit_perform_action(owner, punit->id, tgt_city->id,
                               0, NULL, ACTION_DISBAND_UNIT_RECOVER, requester)) {
diff --git a/common/actions.c b/common/actions.c
index d6290fab76..d42644e5e5 100644
--- a/common/actions.c
+++ b/common/actions.c
@@ -3223,6 +3223,7 @@ struct action *action_is_blocked_by(const struct action *act,
   const struct city *target_city
       = blocked_find_target_city(act, actor_unit, target_tile,
                                  target_city_arg, target_unit);
+  const struct civ_map *nmap = &(wld.map);
 
   action_iterate(blocker_id) {
     struct action *blocker = action_by_number(blocker_id);
@@ -3241,7 +3242,7 @@ struct action *action_is_blocked_by(const struct action *act,
         /* Can't be enabled. No target. */
         continue;
       }
-      if (is_action_enabled_unit_on_city(blocker->id,
+      if (is_action_enabled_unit_on_city(nmap, blocker->id,
                                          actor_unit, target_city)) {
         return blocker;
       }
@@ -4751,12 +4752,11 @@ is_action_enabled_unit_on_city_full(const struct civ_map *nmap,
 
   See note in is_action_enabled() for why the action may still be disabled.
 **************************************************************************/
-bool is_action_enabled_unit_on_city(const action_id wanted_action,
+bool is_action_enabled_unit_on_city(const struct civ_map *nmap,
+                                    const action_id wanted_action,
                                     const struct unit *actor_unit,
                                     const struct city *target_city)
 {
-  const struct civ_map *nmap = &(wld.map);
-
   return is_action_enabled_unit_on_city_full(nmap, wanted_action, actor_unit,
                                              unit_home(actor_unit),
                                              unit_tile(actor_unit),
diff --git a/common/actions.h b/common/actions.h
index d7e8ba1c8c..8e7b7f177c 100644
--- a/common/actions.h
+++ b/common/actions.h
@@ -782,7 +782,8 @@ struct action *action_is_blocked_by(const struct action *act,
                                     const struct city *target_city,
                                     const struct unit *target_unit);
 
-bool is_action_enabled_unit_on_city(const action_id wanted_action,
+bool is_action_enabled_unit_on_city(const struct civ_map *nmap,
+                                    const action_id wanted_action,
                                     const struct unit *actor_unit,
                                     const struct city *target_city);
 
diff --git a/common/unit.c b/common/unit.c
index 6feb4215d1..3573db09b5 100644
--- a/common/unit.c
+++ b/common/unit.c
@@ -188,10 +188,12 @@ enum unit_airlift_result
 bool unit_can_airlift_to(const struct unit *punit,
                          const struct city *pdest_city)
 {
+  const struct civ_map *nmap = &(wld.map);
+
   fc_assert_ret_val(pdest_city, FALSE);
 
   if (is_server()) {
-    return is_action_enabled_unit_on_city(ACTION_AIRLIFT,
+    return is_action_enabled_unit_on_city(nmap, ACTION_AIRLIFT,
                                           punit, pdest_city);
   } else {
     return action_prob_possible(action_prob_vs_city(punit, ACTION_AIRLIFT,
diff --git a/server/actiontools.c b/server/actiontools.c
index e96ed50537..4422762b9a 100644
--- a/server/actiontools.c
+++ b/server/actiontools.c
@@ -1001,6 +1001,7 @@ action_auto_perf_unit_do(const enum action_auto_perf_cause cause,
   const struct city *tgt_city;
   const struct tile *tgt_tile;
   const struct unit *tgt_unit;
+  const struct civ_map *nmap = &(wld.map);
 
   const struct action_auto_perf *autoperf
       = action_auto_perf_unit_sel(cause, actor, other_player,
@@ -1052,7 +1053,7 @@ action_auto_perf_unit_do(const enum action_auto_perf_cause cause,
         break;
       case ATK_CITY:
         if (tgt_city
-            && is_action_enabled_unit_on_city(act, actor, tgt_city)) {
+            && is_action_enabled_unit_on_city(nmap, act, actor, tgt_city)) {
           perform_action_to(act, actor, tgt_city->id, EXTRA_NONE)
         }
         break;
@@ -1102,6 +1103,7 @@ action_auto_perf_unit_prob(const enum action_auto_perf_cause cause,
   const struct city *tgt_city;
   const struct tile *tgt_tile;
   const struct unit *tgt_unit;
+  const struct civ_map *nmap = &(wld.map);
 
   const struct action_auto_perf *autoperf
       = action_auto_perf_unit_sel(cause, actor, other_player,
@@ -1146,7 +1148,7 @@ action_auto_perf_unit_prob(const enum action_auto_perf_cause cause,
         break;
       case ATK_CITY:
         if (tgt_city
-            && is_action_enabled_unit_on_city(act, actor, tgt_city)) {
+            && is_action_enabled_unit_on_city(nmap, act, actor, tgt_city)) {
           current = action_prob_vs_city(actor, act, tgt_city);
         }
         break;
diff --git a/server/scripting/api_server_edit.c b/server/scripting/api_server_edit.c
index 7bd75b90c7..3956e47cbe 100644
--- a/server/scripting/api_server_edit.c
+++ b/server/scripting/api_server_edit.c
@@ -346,7 +346,7 @@ bool api_edit_perform_action_unit_vs_city(lua_State *L, Unit *punit,
   fc_assert_ret_val(action_get_actor_kind(paction) == AAK_UNIT, FALSE);
   fc_assert_ret_val(action_get_target_kind(paction) == ATK_CITY, FALSE);
   fc_assert_ret_val(!action_has_result(paction, ACTRES_FOUND_CITY), FALSE);
-  if (is_action_enabled_unit_on_city(paction->id, punit, tgt)) {
+  if (is_action_enabled_unit_on_city(&(wld.map), paction->id, punit, tgt)) {
     return unit_perform_action(unit_owner(punit), punit->id,
                                tgt->id, IDENTITY_NUMBER_ZERO, "",
                                paction->id, ACT_REQ_RULES);
@@ -372,7 +372,7 @@ bool api_edit_perform_action_unit_vs_city_impr(lua_State *L, Unit *punit,
   fc_assert_ret_val(action_get_actor_kind(paction) == AAK_UNIT, FALSE);
   fc_assert_ret_val(action_get_target_kind(paction) == ATK_CITY, FALSE);
   fc_assert_ret_val(!action_has_result(paction, ACTRES_FOUND_CITY), FALSE);
-  if (is_action_enabled_unit_on_city(paction->id, punit, tgt)) {
+  if (is_action_enabled_unit_on_city(&(wld.map), paction->id, punit, tgt)) {
     return unit_perform_action(unit_owner(punit), punit->id,
                                tgt->id, sub_tgt->item_number, "",
                                paction->id, ACT_REQ_RULES);
@@ -398,7 +398,7 @@ bool api_edit_perform_action_unit_vs_city_tech(lua_State *L, Unit *punit,
   fc_assert_ret_val(action_get_actor_kind(paction) == AAK_UNIT, FALSE);
   fc_assert_ret_val(action_get_target_kind(paction) == ATK_CITY, FALSE);
   fc_assert_ret_val(!action_has_result(paction, ACTRES_FOUND_CITY), FALSE);
-  if (is_action_enabled_unit_on_city(paction->id, punit, tgt)) {
+  if (is_action_enabled_unit_on_city(&(wld.map), paction->id, punit, tgt)) {
     return unit_perform_action(unit_owner(punit), punit->id,
                                tgt->id, sub_tgt->item_number, "",
                                paction->id, ACT_REQ_RULES);
diff --git a/server/unithand.c b/server/unithand.c
index 051137ce93..dc41db501e 100644
--- a/server/unithand.c
+++ b/server/unithand.c
@@ -189,6 +189,7 @@ void handle_unit_type_upgrade(struct player *pplayer, Unit_type_id uti)
   struct unit_type *from_unittype = utype_by_number(uti);
   int number_of_upgraded_units = 0;
   struct action *paction = action_by_number(ACTION_UPGRADE_UNIT);
+  const struct civ_map *nmap = &(wld.map);
 
   if (NULL == from_unittype) {
     /* Probably died or bribed. */
@@ -213,7 +214,7 @@ void handle_unit_type_upgrade(struct player *pplayer, Unit_type_id uti)
     if (unit_type_get(punit) == from_unittype) {
       struct city *pcity = tile_city(unit_tile(punit));
 
-      if (is_action_enabled_unit_on_city(paction->id, punit, pcity)
+      if (is_action_enabled_unit_on_city(nmap, paction->id, punit, pcity)
           && unit_perform_action(pplayer, punit->id, pcity->id, 0, "",
                                  paction->id, ACT_REQ_SS_AGENT)) {
         number_of_upgraded_units++;
@@ -3020,6 +3021,7 @@ void handle_unit_action_query(struct connection *pc,
   struct action *paction = action_by_number(action_type);
   struct unit *punit = game_unit_by_number(target_id);
   struct city *pcity = game_city_by_number(target_id);
+  const struct civ_map *nmap = &(wld.map);
 
   if (!has_capability("ids32", pc->capability)) {
     actor_id32 = actor_id16;
@@ -3063,7 +3065,7 @@ void handle_unit_action_query(struct connection *pc,
     break;
   case ACTRES_SPY_INCITE_CITY:
     if (pcity
-        && is_action_enabled_unit_on_city(action_type,
+        && is_action_enabled_unit_on_city(nmap, action_type,
                                           pactor, pcity)) {
       dsend_packet_unit_action_answer(pc,
                                       actor_id32, actor_id16, target_id,
@@ -3079,7 +3081,7 @@ void handle_unit_action_query(struct connection *pc,
     break;
   case ACTRES_UPGRADE_UNIT:
     if (pcity
-        && is_action_enabled_unit_on_city(action_type,
+        && is_action_enabled_unit_on_city(nmap, action_type,
                                           pactor, pcity)) {
       const struct unit_type *tgt_utype;
       int upgr_cost;
@@ -3105,7 +3107,7 @@ void handle_unit_action_query(struct connection *pc,
   case ACTRES_SPY_TARGETED_SABOTAGE_CITY:
   case ACTRES_STRIKE_BUILDING:
     if (pcity
-        && is_action_enabled_unit_on_city(action_type,
+        && is_action_enabled_unit_on_city(nmap, action_type,
                                           pactor, pcity)) {
       spy_send_sabotage_list(pc, pactor, pcity,
                              action_by_number(action_type), request_kind);
@@ -3183,6 +3185,7 @@ bool unit_perform_action(struct player *pplayer,
   struct impr_type *sub_tgt_impr;
   struct unit *punit = NULL;
   struct city *pcity = NULL;
+  const struct civ_map *nmap = &(wld.map);
 
   if (!action_id_exists(action_type)) {
     /* Non existing action */
@@ -3306,8 +3309,8 @@ bool unit_perform_action(struct player *pplayer,
 
 #define ACTION_PERFORM_UNIT_CITY(action, actor, target, action_performer) \
   if (pcity                                                               \
-      && is_action_enabled_unit_on_city(action_type,                      \
-                                       actor_unit, pcity)) {              \
+      && is_action_enabled_unit_on_city(nmap, action_type,                \
+                                        actor_unit, pcity)) {             \
     bool success;                                                         \
     script_server_signal_emit("action_started_unit_city",                 \
                               action_by_number(action), actor, target);   \
-- 
2.43.0

