From d07eaf34285f7d6a913e24fb122eeb554663caa7 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Sun, 22 Dec 2024 18:11:38 +0200
Subject: [PATCH 33/33] Turn Shield2Gold to a user unit type flag

See RM #1195

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 client/helpdata.c                |   8 --
 common/unittype.h                | 188 +++++++++++++++----------------
 data/alien/units.ruleset         |   3 +-
 data/civ1/units.ruleset          |   3 +-
 data/civ2/units.ruleset          |   3 +-
 data/civ2civ3/units.ruleset      |   3 +-
 data/classic/units.ruleset       |   3 +-
 data/goldkeep/units.ruleset      |   4 +-
 data/granularity/units.ruleset   |   3 +-
 data/multiplayer/units.ruleset   |   3 +-
 data/ruledit/comments-3.3.txt    |   3 +-
 data/sandbox/units.ruleset       |   3 +-
 data/stub/units.ruleset          |   3 +-
 data/webperimental/units.ruleset |   3 +-
 server/ruleset/rscompat.c        |   3 +-
 15 files changed, 108 insertions(+), 128 deletions(-)

diff --git a/client/helpdata.c b/client/helpdata.c
index 418a43da83..24a0fd3c3f 100644
--- a/client/helpdata.c
+++ b/client/helpdata.c
@@ -2421,14 +2421,6 @@ char *helptext_unit(char *buf, size_t bufsz, struct player *pplayer,
               "choose to do so even if it has better odds when defending "
               "against it than when attacking it.\n"), BULLET);
   }
-  if (utype_has_flag(utype, UTYF_SHIELD2GOLD)) {
-    /* FIXME: the conversion shield => gold is activated if
-     *        EFT_SHIELD2GOLD_FACTOR is not equal null; how to determine
-     *        possible sources? */
-    CATLSTR(buf, bufsz,
-            _("%s Under certain conditions the shield upkeep of this unit can "
-              "be converted to gold upkeep.\n"), BULLET);
-  }
 
   unit_class_iterate(target) {
     if (uclass_has_flag(target, UCF_UNREACHABLE)
diff --git a/common/unittype.h b/common/unittype.h
index ab3db97939..42518d675e 100644
--- a/common/unittype.h
+++ b/common/unittype.h
@@ -217,124 +217,122 @@ const char *unit_type_flag_id_name_update_cb(const char *old_name);
 /* Can 'refuel' at coast - meaningless if fuel value not set */
 #define SPECENUM_VALUE10 UTYF_COAST
 #define SPECENUM_VALUE10NAME N_("?unitflag:Coast")
-/* upkeep can switch from shield to gold */
-#define SPECENUM_VALUE11 UTYF_SHIELD2GOLD
-#define SPECENUM_VALUE11NAME N_("?unitflag:Shield2Gold")
 /* Strong in diplomatic battles. */
-#define SPECENUM_VALUE12 UTYF_SPY
-#define SPECENUM_VALUE12NAME N_("?unitflag:Spy")
+#define SPECENUM_VALUE11 UTYF_SPY
+#define SPECENUM_VALUE11NAME N_("?unitflag:Spy")
 /* Cannot attack vs non-native tiles even if class can */
-#define SPECENUM_VALUE13 UTYF_ONLY_NATIVE_ATTACK
-#define SPECENUM_VALUE13NAME N_("?unitflag:Only_Native_Attack")
+#define SPECENUM_VALUE12 UTYF_ONLY_NATIVE_ATTACK
+#define SPECENUM_VALUE12NAME N_("?unitflag:Only_Native_Attack")
 /* Only Fundamentalist government can build these units */
-#define SPECENUM_VALUE14 UTYF_FANATIC
-#define SPECENUM_VALUE14NAME N_("?unitflag:Fanatic")
+#define SPECENUM_VALUE13 UTYF_FANATIC
+#define SPECENUM_VALUE13NAME N_("?unitflag:Fanatic")
 /* Losing this unit means losing the game */
-#define SPECENUM_VALUE15 UTYF_GAMELOSS
-#define SPECENUM_VALUE15NAME N_("?unitflag:GameLoss")
+#define SPECENUM_VALUE14 UTYF_GAMELOSS
+#define SPECENUM_VALUE14NAME N_("?unitflag:GameLoss")
 /* A player can only have one unit of this type */
-#define SPECENUM_VALUE16 UTYF_UNIQUE
-#define SPECENUM_VALUE16NAME N_("?unitflag:Unique")
+#define SPECENUM_VALUE15 UTYF_UNIQUE
+#define SPECENUM_VALUE15NAME N_("?unitflag:Unique")
 /* When a transport containing this unit disappears the game will try to
  * rescue units with this flag before it tries to rescue units without
  * it. */
-#define SPECENUM_VALUE17 UTYF_EVAC_FIRST
-#define SPECENUM_VALUE17NAME N_("?unitflag:EvacuateFirst")
+#define SPECENUM_VALUE16 UTYF_EVAC_FIRST
+#define SPECENUM_VALUE16NAME N_("?unitflag:EvacuateFirst")
 /* Always wins diplomatic contests */
-#define SPECENUM_VALUE18 UTYF_SUPERSPY
-#define SPECENUM_VALUE18NAME N_("?unitflag:SuperSpy")
+#define SPECENUM_VALUE17 UTYF_SUPERSPY
+#define SPECENUM_VALUE17NAME N_("?unitflag:SuperSpy")
 /* Has no homecity */
-#define SPECENUM_VALUE19 UTYF_NOHOME
-#define SPECENUM_VALUE19NAME N_("?unitflag:NoHome")
+#define SPECENUM_VALUE18 UTYF_NOHOME
+#define SPECENUM_VALUE18NAME N_("?unitflag:NoHome")
 /* Unreserved - clean out */
-#define SPECENUM_VALUE20 UTYF_UNRESERVED
-#define SPECENUM_VALUE20NAME "Unreserved"
+#define SPECENUM_VALUE19 UTYF_UNRESERVED
+#define SPECENUM_VALUE19NAME "Unreserved"
 /* Gets double firepower against cities */
-#define SPECENUM_VALUE21 UTYF_CITYBUSTER
-#define SPECENUM_VALUE21NAME N_("?unitflag:CityBuster")
+#define SPECENUM_VALUE20 UTYF_CITYBUSTER
+#define SPECENUM_VALUE20NAME N_("?unitflag:CityBuster")
 /* Unit cannot be built (barb leader etc) */
-#define SPECENUM_VALUE22 UTYF_NOBUILD
-#define SPECENUM_VALUE22NAME N_("?unitflag:NoBuild")
+#define SPECENUM_VALUE21 UTYF_NOBUILD
+#define SPECENUM_VALUE21NAME N_("?unitflag:NoBuild")
 /* Firepower set to 1 when EFT_DEFEND_BONUS applies
  * (for example, land unit attacking city with walls) */
-#define SPECENUM_VALUE23 UTYF_BADWALLATTACKER
-#define SPECENUM_VALUE23NAME N_("?unitflag:BadWallAttacker")
+#define SPECENUM_VALUE22 UTYF_BADWALLATTACKER
+#define SPECENUM_VALUE22NAME N_("?unitflag:BadWallAttacker")
 /* Firepower set to 1 and attackers x2 when in city */
-#define SPECENUM_VALUE24 UTYF_BADCITYDEFENDER
-#define SPECENUM_VALUE24NAME N_("?unitflag:BadCityDefender")
+#define SPECENUM_VALUE23 UTYF_BADCITYDEFENDER
+#define SPECENUM_VALUE23NAME N_("?unitflag:BadCityDefender")
 /* Only barbarians can build this unit */
-#define SPECENUM_VALUE25 UTYF_BARBARIAN_ONLY
-#define SPECENUM_VALUE25NAME N_("?unitflag:BarbarianOnly")
+#define SPECENUM_VALUE24 UTYF_BARBARIAN_ONLY
+#define SPECENUM_VALUE24NAME N_("?unitflag:BarbarianOnly")
 /* Unit can't be built in scenarios where founding new cities is prevented. */
-#define SPECENUM_VALUE26 UTYF_NEWCITY_GAMES_ONLY
-#define SPECENUM_VALUE26NAME N_("?unitflag:NewCityGamesOnly")
+#define SPECENUM_VALUE25 UTYF_NEWCITY_GAMES_ONLY
+#define SPECENUM_VALUE25NAME N_("?unitflag:NewCityGamesOnly")
 /* Can kill escaping units */
-#define SPECENUM_VALUE27 UTYF_CANKILLESCAPING
-#define SPECENUM_VALUE27NAME N_("?unitflag:CanKillEscaping")
+#define SPECENUM_VALUE26 UTYF_CANKILLESCAPING
+#define SPECENUM_VALUE26NAME N_("?unitflag:CanKillEscaping")
 /* Makes random movement, not under player control */
-#define SPECENUM_VALUE28 UTYF_RANDOM_MOVEMENT
-#define SPECENUM_VALUE28NAME N_("?unitflag:RandomMovement")
+#define SPECENUM_VALUE27 UTYF_RANDOM_MOVEMENT
+#define SPECENUM_VALUE27NAME N_("?unitflag:RandomMovement")
 /* Do not show flag for the unit */
-#define SPECENUM_VALUE29 UTYF_FLAGLESS
-#define SPECENUM_VALUE29NAME N_("?unitflag:Flagless")
-#define SPECENUM_VALUE30 UTYF_PROVIDES_RANSOM
-#define SPECENUM_VALUE30NAME N_("?unitflag:ProvidesRansom")
-
-#define SPECENUM_VALUE31 UTYF_USER_FLAG_1
-#define SPECENUM_VALUE32 UTYF_USER_FLAG_2
-#define SPECENUM_VALUE33 UTYF_USER_FLAG_3
-#define SPECENUM_VALUE34 UTYF_USER_FLAG_4
-#define SPECENUM_VALUE35 UTYF_USER_FLAG_5
-#define SPECENUM_VALUE36 UTYF_USER_FLAG_6
-#define SPECENUM_VALUE37 UTYF_USER_FLAG_7
-#define SPECENUM_VALUE38 UTYF_USER_FLAG_8
-#define SPECENUM_VALUE39 UTYF_USER_FLAG_9
-#define SPECENUM_VALUE40 UTYF_USER_FLAG_10
-#define SPECENUM_VALUE41 UTYF_USER_FLAG_11
-#define SPECENUM_VALUE42 UTYF_USER_FLAG_12
-#define SPECENUM_VALUE43 UTYF_USER_FLAG_13
-#define SPECENUM_VALUE44 UTYF_USER_FLAG_14
-#define SPECENUM_VALUE45 UTYF_USER_FLAG_15
-#define SPECENUM_VALUE46 UTYF_USER_FLAG_16
-#define SPECENUM_VALUE47 UTYF_USER_FLAG_17
-#define SPECENUM_VALUE48 UTYF_USER_FLAG_18
-#define SPECENUM_VALUE49 UTYF_USER_FLAG_19
-#define SPECENUM_VALUE50 UTYF_USER_FLAG_20
-#define SPECENUM_VALUE51 UTYF_USER_FLAG_21
-#define SPECENUM_VALUE52 UTYF_USER_FLAG_22
-#define SPECENUM_VALUE53 UTYF_USER_FLAG_23
-#define SPECENUM_VALUE54 UTYF_USER_FLAG_24
-#define SPECENUM_VALUE55 UTYF_USER_FLAG_25
-#define SPECENUM_VALUE56 UTYF_USER_FLAG_26
-#define SPECENUM_VALUE57 UTYF_USER_FLAG_27
-#define SPECENUM_VALUE58 UTYF_USER_FLAG_28
-#define SPECENUM_VALUE59 UTYF_USER_FLAG_29
-#define SPECENUM_VALUE60 UTYF_USER_FLAG_30
-#define SPECENUM_VALUE61 UTYF_USER_FLAG_31
-#define SPECENUM_VALUE62 UTYF_USER_FLAG_32
-#define SPECENUM_VALUE63 UTYF_USER_FLAG_33
-#define SPECENUM_VALUE64 UTYF_USER_FLAG_34
-#define SPECENUM_VALUE65 UTYF_USER_FLAG_35
-#define SPECENUM_VALUE66 UTYF_USER_FLAG_36
-#define SPECENUM_VALUE67 UTYF_USER_FLAG_37
-#define SPECENUM_VALUE68 UTYF_USER_FLAG_38
-#define SPECENUM_VALUE69 UTYF_USER_FLAG_39
-#define SPECENUM_VALUE70 UTYF_USER_FLAG_40
-#define SPECENUM_VALUE71 UTYF_USER_FLAG_41
-#define SPECENUM_VALUE72 UTYF_USER_FLAG_42
-#define SPECENUM_VALUE73 UTYF_USER_FLAG_43
-#define SPECENUM_VALUE74 UTYF_USER_FLAG_44
-#define SPECENUM_VALUE75 UTYF_USER_FLAG_45
-#define SPECENUM_VALUE76 UTYF_USER_FLAG_46
-#define SPECENUM_VALUE77 UTYF_USER_FLAG_47
-#define SPECENUM_VALUE78 UTYF_USER_FLAG_48
-#define SPECENUM_VALUE79 UTYF_USER_FLAG_49
-#define SPECENUM_VALUE80 UTYF_USER_FLAG_50
-#define SPECENUM_VALUE81 UTYF_USER_FLAG_51
-#define SPECENUM_VALUE82 UTYF_USER_FLAG_52
+#define SPECENUM_VALUE28 UTYF_FLAGLESS
+#define SPECENUM_VALUE28NAME N_("?unitflag:Flagless")
+#define SPECENUM_VALUE29 UTYF_PROVIDES_RANSOM
+#define SPECENUM_VALUE29NAME N_("?unitflag:ProvidesRansom")
+
+#define SPECENUM_VALUE30 UTYF_USER_FLAG_1
+#define SPECENUM_VALUE31 UTYF_USER_FLAG_2
+#define SPECENUM_VALUE32 UTYF_USER_FLAG_3
+#define SPECENUM_VALUE33 UTYF_USER_FLAG_4
+#define SPECENUM_VALUE34 UTYF_USER_FLAG_5
+#define SPECENUM_VALUE35 UTYF_USER_FLAG_6
+#define SPECENUM_VALUE36 UTYF_USER_FLAG_7
+#define SPECENUM_VALUE37 UTYF_USER_FLAG_8
+#define SPECENUM_VALUE38 UTYF_USER_FLAG_9
+#define SPECENUM_VALUE39 UTYF_USER_FLAG_10
+#define SPECENUM_VALUE40 UTYF_USER_FLAG_11
+#define SPECENUM_VALUE41 UTYF_USER_FLAG_12
+#define SPECENUM_VALUE42 UTYF_USER_FLAG_13
+#define SPECENUM_VALUE43 UTYF_USER_FLAG_14
+#define SPECENUM_VALUE44 UTYF_USER_FLAG_15
+#define SPECENUM_VALUE45 UTYF_USER_FLAG_16
+#define SPECENUM_VALUE46 UTYF_USER_FLAG_17
+#define SPECENUM_VALUE47 UTYF_USER_FLAG_18
+#define SPECENUM_VALUE48 UTYF_USER_FLAG_19
+#define SPECENUM_VALUE49 UTYF_USER_FLAG_20
+#define SPECENUM_VALUE50 UTYF_USER_FLAG_21
+#define SPECENUM_VALUE51 UTYF_USER_FLAG_22
+#define SPECENUM_VALUE52 UTYF_USER_FLAG_23
+#define SPECENUM_VALUE53 UTYF_USER_FLAG_24
+#define SPECENUM_VALUE54 UTYF_USER_FLAG_25
+#define SPECENUM_VALUE55 UTYF_USER_FLAG_26
+#define SPECENUM_VALUE56 UTYF_USER_FLAG_27
+#define SPECENUM_VALUE57 UTYF_USER_FLAG_28
+#define SPECENUM_VALUE58 UTYF_USER_FLAG_29
+#define SPECENUM_VALUE59 UTYF_USER_FLAG_30
+#define SPECENUM_VALUE60 UTYF_USER_FLAG_31
+#define SPECENUM_VALUE61 UTYF_USER_FLAG_32
+#define SPECENUM_VALUE62 UTYF_USER_FLAG_33
+#define SPECENUM_VALUE63 UTYF_USER_FLAG_34
+#define SPECENUM_VALUE64 UTYF_USER_FLAG_35
+#define SPECENUM_VALUE65 UTYF_USER_FLAG_36
+#define SPECENUM_VALUE66 UTYF_USER_FLAG_37
+#define SPECENUM_VALUE67 UTYF_USER_FLAG_38
+#define SPECENUM_VALUE68 UTYF_USER_FLAG_39
+#define SPECENUM_VALUE69 UTYF_USER_FLAG_40
+#define SPECENUM_VALUE70 UTYF_USER_FLAG_41
+#define SPECENUM_VALUE71 UTYF_USER_FLAG_42
+#define SPECENUM_VALUE72 UTYF_USER_FLAG_43
+#define SPECENUM_VALUE73 UTYF_USER_FLAG_44
+#define SPECENUM_VALUE74 UTYF_USER_FLAG_45
+#define SPECENUM_VALUE75 UTYF_USER_FLAG_46
+#define SPECENUM_VALUE76 UTYF_USER_FLAG_47
+#define SPECENUM_VALUE77 UTYF_USER_FLAG_48
+#define SPECENUM_VALUE78 UTYF_USER_FLAG_49
+#define SPECENUM_VALUE79 UTYF_USER_FLAG_50
+#define SPECENUM_VALUE80 UTYF_USER_FLAG_51
+#define SPECENUM_VALUE81 UTYF_USER_FLAG_52
+#define SPECENUM_VALUE82 UTYF_USER_FLAG_53
 /* Note that first role must have value next to last flag */
 
-#define UTYF_LAST_USER_FLAG UTYF_USER_FLAG_52
+#define UTYF_LAST_USER_FLAG UTYF_USER_FLAG_53
 #define MAX_NUM_USER_UNIT_FLAGS (UTYF_LAST_USER_FLAG - UTYF_USER_FLAG_1 + 1)
 #define SPECENUM_NAMEOVERRIDE
 #define SPECENUM_NAME_UPDATER
diff --git a/data/alien/units.ruleset b/data/alien/units.ruleset
index eb26aa220c..e491083cf9 100644
--- a/data/alien/units.ruleset
+++ b/data/alien/units.ruleset
@@ -17,7 +17,7 @@ options = "+Freeciv-ruleset-3.3-Devel-2023.Feb.24"
 format_version = 40
 
 [control]
-; Names for custom unit type flags. There can be up to 52 of these.
+; Names for custom unit type flags. There can be up to 53 of these.
 ; name          = rule name; In some circumstances user may see this
 ;                 as part of some sentences, so try to make it descriptive
 ;                 and sensible.
@@ -363,7 +363,6 @@ flags         = "Missile", "DoesntOccupyTile"
 ;                 and firepower of attacker is doubled (the Pearl Harbor
 ;                 rule)
 ; "BarbarianOnly" = only barbarians can build this unit
-; "Shield2Gold" = Switch from shield upkeep to gold upkeep possible
 ; "NewCityGamesOnly" = unit can't be built on scenarios where founding new cities
 ;                 is not allowed. Give this flag to units that would make no sense
 ;                 to have in a game with such a scenario
diff --git a/data/civ1/units.ruleset b/data/civ1/units.ruleset
index fa7ad2e6e9..ac8f4960e8 100644
--- a/data/civ1/units.ruleset
+++ b/data/civ1/units.ruleset
@@ -14,7 +14,7 @@ options = "+Freeciv-ruleset-3.3-Devel-2023.Feb.24"
 format_version = 40
 
 [control]
-; Names for custom unit type flags. There can be up to 52 of these.
+; Names for custom unit type flags. There can be up to 53 of these.
 ; name          = rule name; In some circumstances user may see this
 ;                 as part of some sentences, so try to make it descriptive
 ;                 and sensible.
@@ -338,7 +338,6 @@ flags         = "Missile", "Unreachable", "HutNothing"
 ;                 and firepower of attacker is doubled (the Pearl Harbor
 ;                 rule)
 ; "BarbarianOnly" = only barbarians can build this unit
-; "Shield2Gold" = Switch from shield upkeep to gold upkeep possible
 ; "NewCityGamesOnly" = unit can't be built on scenarios where founding new cities
 ;                 is not allowed. Give this flag to units that would make no sense
 ;                 to have in a game with such a scenario
diff --git a/data/civ2/units.ruleset b/data/civ2/units.ruleset
index bf644ceb16..095884e82b 100644
--- a/data/civ2/units.ruleset
+++ b/data/civ2/units.ruleset
@@ -14,7 +14,7 @@ options = "+Freeciv-ruleset-3.3-Devel-2023.Feb.24"
 format_version = 40
 
 [control]
-; Names for custom unit type flags. There can be up to 52 of these.
+; Names for custom unit type flags. There can be up to 53 of these.
 ; name          = rule name; In some circumstances user may see this
 ;                 as part of some sentences, so try to make it descriptive
 ;                 and sensible.
@@ -356,7 +356,6 @@ flags         = "Unreachable", "DoesntOccupyTile", "HutFrighten"
 ;                 and firepower of attacker is doubled (the Pearl Harbor
 ;                 rule)
 ; "BarbarianOnly" = only barbarians can build this unit
-; "Shield2Gold" = Switch from shield upkeep to gold upkeep possible
 ; "NewCityGamesOnly" = unit can't be built on scenarios where founding new cities
 ;                 is not allowed. Give this flag to units that would make no sense
 ;                 to have in a game with such a scenario
diff --git a/data/civ2civ3/units.ruleset b/data/civ2civ3/units.ruleset
index 7d67d32275..95b1e6e2f1 100644
--- a/data/civ2civ3/units.ruleset
+++ b/data/civ2civ3/units.ruleset
@@ -20,7 +20,7 @@ options = "+Freeciv-ruleset-3.3-Devel-2023.Feb.24 web-compatible"
 format_version = 40
 
 [control]
-; Names for custom unit type flags. There can be up to 52 of these.
+; Names for custom unit type flags. There can be up to 53 of these.
 ; name          = rule name; In some circumstances user may see this
 ;                 as part of some sentences, so try to make it descriptive
 ;                 and sensible.
@@ -400,7 +400,6 @@ flags         = "Unreachable", "DoesntOccupyTile", "CanPillage",
 ;                 and firepower of attacker is doubled (the Pearl Harbor
 ;                 rule)
 ; "BarbarianOnly" = only barbarians can build this unit
-; "Shield2Gold" = Switch from shield upkeep to gold upkeep possible
 ; "NewCityGamesOnly" = unit can't be built on scenarios where founding new cities
 ;                 is not allowed. Give this flag to units that would make no sense
 ;                 to have in a game with such a scenario
diff --git a/data/classic/units.ruleset b/data/classic/units.ruleset
index 2d76bbdfdd..f56af0ef41 100644
--- a/data/classic/units.ruleset
+++ b/data/classic/units.ruleset
@@ -20,7 +20,7 @@ options = "+Freeciv-ruleset-3.3-Devel-2023.Feb.24 web-compatible"
 format_version = 40
 
 [control]
-; Names for custom unit type flags. There can be up to 52 of these.
+; Names for custom unit type flags. There can be up to 53 of these.
 ; name          = rule name; In some circumstances user may see this
 ;                 as part of some sentences, so try to make it descriptive
 ;                 and sensible.
@@ -366,7 +366,6 @@ flags         = "Unreachable", "DoesntOccupyTile", "HutFrighten"
 ;                 and firepower of attacker is doubled (the Pearl Harbor
 ;                 rule)
 ; "BarbarianOnly" = only barbarians can build this unit
-; "Shield2Gold" = Switch from shield upkeep to gold upkeep possible
 ; "NewCityGamesOnly" = unit can't be built on scenarios where founding new cities
 ;                 is not allowed. Give this flag to units that would make no sense
 ;                 to have in a game with such a scenario
diff --git a/data/goldkeep/units.ruleset b/data/goldkeep/units.ruleset
index 6d77246f35..208d97c605 100644
--- a/data/goldkeep/units.ruleset
+++ b/data/goldkeep/units.ruleset
@@ -23,7 +23,7 @@ options = "+Freeciv-ruleset-3.3-Devel-2023.Feb.24"
 format_version = 40
 
 [control]
-; Names for custom unit type flags. There can be up to 52 of these.
+; Names for custom unit type flags. There can be up to 53 of these.
 ; name          = rule name; In some circumstances user may see this
 ;                 as part of some sentences, so try to make it descriptive
 ;                 and sensible.
@@ -46,6 +46,7 @@ flags =
     _("Cant_Fortify")
     _("OneAttack")
     _("Bomber"), _("Bad at attacking Fighters")
+    _("Shield2Gold"), _("May switch from shield upkeep to gold upkeep")
   }
 
 ; Names for custom unit class flags. There can be up to 25 of these.
@@ -378,7 +379,6 @@ flags         = "Unreachable", "DoesntOccupyTile", "HutFrighten"
 ;                 and firepower of attacker is doubled (the Pearl Harbor
 ;                 rule)
 ; "BarbarianOnly" = only barbarians can build this unit
-; "Shield2Gold" = Switch from shield upkeep to gold upkeep possible
 ; "NewCityGamesOnly" = unit can't be built on scenarios where founding new cities
 ;                 is not allowed. Give this flag to units that would make no sense
 ;                 to have in a game with such a scenario
diff --git a/data/granularity/units.ruleset b/data/granularity/units.ruleset
index 19c7352530..ee1b455744 100644
--- a/data/granularity/units.ruleset
+++ b/data/granularity/units.ruleset
@@ -20,7 +20,7 @@ options = "+Freeciv-ruleset-3.3-Devel-2023.Feb.24"
 format_version = 40
 
 [control]
-; Names for custom unit type flags. There can be up to 52 of these.
+; Names for custom unit type flags. There can be up to 53 of these.
 ; name          = rule name; In some circumstances user may see this
 ;                 as part of some sentences, so try to make it descriptive
 ;                 and sensible.
@@ -313,7 +313,6 @@ flags         = "BuildAnywhere"
 ;                 and firepower of attacker is doubled (the Pearl Harbor
 ;                 rule)
 ; "BarbarianOnly" = only barbarians can build this unit
-; "Shield2Gold" = Switch from shield upkeep to gold upkeep possible
 ; "NewCityGamesOnly" = unit can't be built on scenarios where founding new cities
 ;                 is not allowed. Give this flag to units that would make no sense
 ;                 to have in a game with such a scenario
diff --git a/data/multiplayer/units.ruleset b/data/multiplayer/units.ruleset
index 46cc8c4f7f..1ee365fd20 100644
--- a/data/multiplayer/units.ruleset
+++ b/data/multiplayer/units.ruleset
@@ -20,7 +20,7 @@ options = "+Freeciv-ruleset-3.3-Devel-2023.Feb.24 web-compatible"
 format_version = 40
 
 [control]
-; Names for custom unit type flags. There can be up to 52 of these.
+; Names for custom unit type flags. There can be up to 53 of these.
 ; name          = rule name; In some circumstances user may see this
 ;                 as part of some sentences, so try to make it descriptive
 ;                 and sensible.
@@ -366,7 +366,6 @@ flags         = "Unreachable", "DoesntOccupyTile", "HutFrighten"
 ;                 and firepower of attacker is doubled (the Pearl Harbor
 ;                 rule)
 ; "BarbarianOnly" = only barbarians can build this unit
-; "Shield2Gold" = Switch from shield upkeep to gold upkeep possible
 ; "NewCityGamesOnly" = unit can't be built on scenarios where founding new cities
 ;                 is not allowed. Give this flag to units that would make no sense
 ;                 to have in a game with such a scenario
diff --git a/data/ruledit/comments-3.3.txt b/data/ruledit/comments-3.3.txt
index 1968084656..e3cce02c99 100644
--- a/data/ruledit/comments-3.3.txt
+++ b/data/ruledit/comments-3.3.txt
@@ -487,7 +487,6 @@ utypes = "\
 ;                 and firepower of attacker is doubled (the Pearl Harbor\n\
 ;                 rule)\n\
 ; \"BarbarianOnly\" = only barbarians can build this unit\n\
-; \"Shield2Gold\" = Switch from shield upkeep to gold upkeep possible\n\
 ; \"NewCityGamesOnly\" = unit can\'t be built on scenarios where founding new cities\n\
 ;                 is not allowed. Give this flag to units that would make no sense\n\
 ;                 to have in a game with such a scenario\n\
@@ -1312,7 +1311,7 @@ counters = "\n\
 ; This section has comments documenting user (custom) flag types
 
 utype = "\
-; Names for custom unit type flags. There can be up to 52 of these.\n\
+; Names for custom unit type flags. There can be up to 53 of these.\n\
 ; name          = rule name; In some circumstances user may see this\n\
 ;                 as part of some sentences, so try to make it descriptive\n\
 ;                 and sensible.\n\
diff --git a/data/sandbox/units.ruleset b/data/sandbox/units.ruleset
index 703250f8e0..2eb687a98a 100644
--- a/data/sandbox/units.ruleset
+++ b/data/sandbox/units.ruleset
@@ -20,7 +20,7 @@ options = "+Freeciv-ruleset-3.3-Devel-2023.Feb.24"
 format_version = 40
 
 [control]
-; Names for custom unit type flags. There can be up to 52 of these.
+; Names for custom unit type flags. There can be up to 53 of these.
 ; name          = rule name; In some circumstances user may see this
 ;                 as part of some sentences, so try to make it descriptive
 ;                 and sensible.
@@ -413,7 +413,6 @@ flags         = "Unreachable", "DoesntOccupyTile", "CanPillage",
 ;                 and firepower of attacker is doubled (the Pearl Harbor
 ;                 rule)
 ; "BarbarianOnly" = only barbarians can build this unit
-; "Shield2Gold" = Switch from shield upkeep to gold upkeep possible
 ; "NewCityGamesOnly" = unit can't be built on scenarios where founding new cities
 ;                 is not allowed. Give this flag to units that would make no sense
 ;                 to have in a game with such a scenario
diff --git a/data/stub/units.ruleset b/data/stub/units.ruleset
index 3625800791..d381687d6c 100644
--- a/data/stub/units.ruleset
+++ b/data/stub/units.ruleset
@@ -7,7 +7,7 @@ options = "+Freeciv-ruleset-3.3-Devel-2023.Feb.24"
 format_version = 40
 
 [control]
-; Names for custom unit type flags. There can be up to 52 of these.
+; Names for custom unit type flags. There can be up to 53 of these.
 ; name          = rule name; In some circumstances user may see this
 ;                 as part of some sentences, so try to make it descriptive
 ;                 and sensible.
@@ -286,7 +286,6 @@ flags         = ""
 ;                 and firepower of attacker is doubled (the Pearl Harbor
 ;                 rule)
 ; "BarbarianOnly" = only barbarians can build this unit
-; "Shield2Gold" = Switch from shield upkeep to gold upkeep possible
 ; "NewCityGamesOnly" = unit can't be built on scenarios where founding new cities
 ;                 is not allowed. Give this flag to units that would make no sense
 ;                 to have in a game with such a scenario
diff --git a/data/webperimental/units.ruleset b/data/webperimental/units.ruleset
index 2bc0d48d94..4ed143c2fa 100644
--- a/data/webperimental/units.ruleset
+++ b/data/webperimental/units.ruleset
@@ -20,7 +20,7 @@ options = "+Freeciv-ruleset-3.3-Devel-2023.Feb.24 web-compatible"
 format_version = 40
 
 [control]
-; Names for custom unit type flags. There can be up to 52 of these.
+; Names for custom unit type flags. There can be up to 53 of these.
 ; name          = rule name; In some circumstances user may see this
 ;                 as part of some sentences, so try to make it descriptive
 ;                 and sensible.
@@ -370,7 +370,6 @@ flags         = "Unreachable", "DoesntOccupyTile", "HutFrighten"
 ;                 and firepower of attacker is doubled (the Pearl Harbor
 ;                 rule)
 ; "BarbarianOnly" = only barbarians can build this unit
-; "Shield2Gold" = Switch from shield upkeep to gold upkeep possible
 ; "NewCityGamesOnly" = unit can't be built on scenarios where founding new cities
 ;                 is not allowed. Give this flag to units that would make no sense
 ;                 to have in a game with such a scenario
diff --git a/server/ruleset/rscompat.c b/server/ruleset/rscompat.c
index edb1cf15ac..b6bc206dc2 100644
--- a/server/ruleset/rscompat.c
+++ b/server/ruleset/rscompat.c
@@ -357,7 +357,8 @@ bool rscompat_names(struct rscompat_info *info)
       const char *helptxt;
     } new_flags_33[] = {
       { N_("NoVeteran"), N_("May acquire veteran status.") },
-      { N_("CanEscape"), N_("Can try to escape stack death.") }
+      { N_("CanEscape"), N_("Can try to escape stack death.") },
+      { N_("Shield2Gold"), N_("May switch from shield upkeep to gold upkeep") }
     };
 
     enough_new_user_flags(new_flags_33, unit_type,
-- 
2.45.2

