From 3714ce51d5d8cf8528a86cba40bfe7299c6b1c4f Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Sun, 25 Aug 2024 04:45:04 +0300
Subject: [PATCH 11/11] Clear out ACTRES_UNUSED_1

See RM #805

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 ai/default/daicity.c |  2 --
 common/actions.c     |  4 ----
 common/actres.c      |  3 ---
 common/actres.h      |  4 +---
 common/fc_types.h    | 21 +++++++++------------
 5 files changed, 10 insertions(+), 24 deletions(-)

diff --git a/ai/default/daicity.c b/ai/default/daicity.c
index 24098d5f94..01358ec27b 100644
--- a/ai/default/daicity.c
+++ b/ai/default/daicity.c
@@ -1317,8 +1317,6 @@ static int action_target_neg_util(action_id act_id,
   case ACTRES_TELEPORT_CONQUER:
   case ACTRES_HOMELESS:
   case ACTRES_ENABLER_CHECK:
-
-  case ACTRES_UNUSED_1:
     fc_assert_msg(action_id_get_target_kind(act_id) == ATK_CITY,
                   "Action not aimed at cities");
     break;
diff --git a/common/actions.c b/common/actions.c
index 299a84b332..5f76e0bd83 100644
--- a/common/actions.c
+++ b/common/actions.c
@@ -4862,10 +4862,6 @@ action_prob(const struct civ_map *nmap,
      * Lua? */
     chance = ACTPROB_NOT_IMPLEMENTED;
     break;
-
-  case ACTRES_UNUSED_1:
-    chance = ACTPROB_NOT_IMPLEMENTED;
-    break;
   }
 
   /* Non signal action probabilities should be in range. */
diff --git a/common/actres.c b/common/actres.c
index 8a4e1ff459..6626ce53ab 100644
--- a/common/actres.c
+++ b/common/actres.c
@@ -172,9 +172,6 @@ static struct actres act_results[ACTRES_LAST] = {
   { ACT_TGT_COMPL_SIMPLE, ABK_STANDARD,      /* ACTRES_COLLECT_RANSOM */
     TRUE, ACTIVITY_LAST, DRT_NONE,
     EC_NONE, ERM_NONE, ATK_UNITS },
-  { ACT_TGT_COMPL_FLEXIBLE, ABK_NONE,        /* ACTRES_UNUSED_1 */
-    FALSE, ACTIVITY_LAST, DRT_NONE,
-    EC_NONE, ERM_NONE, RS_DEFAULT_USER_ACTION_TARGET_KIND },
   { ACT_TGT_COMPL_SIMPLE, ABK_NONE,          /* ACTRES_TRANSPORT_DEBOARD */
     FALSE, ACTIVITY_LAST, DRT_NONE,
     EC_NONE, ERM_NONE, ATK_UNIT },
diff --git a/common/actres.h b/common/actres.h
index 5e9a7bb0b4..69b544cf2a 100644
--- a/common/actres.h
+++ b/common/actres.h
@@ -35,9 +35,7 @@ struct req_context;
  *     break;
  */
 #define ASSERT_UNUSED_ACTRES_CASES            \
-  case ACTRES_UNUSED_1:                       \
-    fc_assert_msg(FALSE, "ACTRES_UNUSED_1");  \
-    break;
+
 
 /* When making changes to this, update also atk_helpnames at actions.c */
 #define SPECENUM_NAME action_target_kind
diff --git a/common/fc_types.h b/common/fc_types.h
index 3b4eff5409..1a01dc362b 100644
--- a/common/fc_types.h
+++ b/common/fc_types.h
@@ -281,9 +281,8 @@ enum counter_target { CTGT_CITY };
 #define SPECENUM_VALUE45NAME "Unit Build Irrigation"
 #define SPECENUM_VALUE46 ACTRES_COLLECT_RANSOM
 #define SPECENUM_VALUE46NAME "Collect Ransom"
-/* TODO: Rearrange action results to get rid of this */
-#define SPECENUM_VALUE47 ACTRES_UNUSED_1
-#define SPECENUM_VALUE47NAME "Unused1"
+#define SPECENUM_VALUE47 ACTRES_TRANSPORT_LOAD
+#define SPECENUM_VALUE47NAME "Unit Transport Load"
 #define SPECENUM_VALUE48 ACTRES_TRANSPORT_DEBOARD
 #define SPECENUM_VALUE48NAME "Unit Transport Deboard"
 #define SPECENUM_VALUE49 ACTRES_TRANSPORT_UNLOAD
@@ -314,17 +313,15 @@ enum counter_target { CTGT_CITY };
 #define SPECENUM_VALUE61NAME "Wipe Units"
 #define SPECENUM_VALUE62 ACTRES_SPY_ESCAPE
 #define SPECENUM_VALUE62NAME "Unit Spy Escape"
-#define SPECENUM_VALUE63 ACTRES_TRANSPORT_LOAD
-#define SPECENUM_VALUE63NAME "Unit Transport Load"
-#define SPECENUM_VALUE64 ACTRES_CLEAN
-#define SPECENUM_VALUE64NAME "Clean"
+#define SPECENUM_VALUE63 ACTRES_CLEAN
+#define SPECENUM_VALUE63NAME "Clean"
 /* TODO: Move close to "Move" */
-#define SPECENUM_VALUE65 ACTRES_TELEPORT
-#define SPECENUM_VALUE65NAME "Teleport"
-#define SPECENUM_VALUE66 ACTRES_TELEPORT_CONQUER
-#define SPECENUM_VALUE66NAME "Teleport Conquer"
+#define SPECENUM_VALUE64 ACTRES_TELEPORT
+#define SPECENUM_VALUE64NAME "Teleport"
+#define SPECENUM_VALUE65 ACTRES_TELEPORT_CONQUER
+#define SPECENUM_VALUE65NAME "Teleport Conquer"
 /* Hardcoded action that's just controlled by enablers */
-#define SPECENUM_VALUE67 ACTRES_ENABLER_CHECK
+#define SPECENUM_VALUE66 ACTRES_ENABLER_CHECK
 /* All consequences are handled as (ruleset) action data. */
 #define SPECENUM_COUNT ACTRES_LAST
 #include "specenum_gen.h"
-- 
2.45.2

