From da6f0b8c8181c9c023366e2c191c90593b573be7 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Thu, 22 Aug 2024 22:05:30 +0300
Subject: [PATCH 20/20] granularity: Replace "UnitFlag" with "UnitTypeFlag"

See RM #634

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 data/granularity/actions.ruleset | 36 ++++++++++++++++----------------
 data/granularity/effects.ruleset |  8 +++----
 2 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/data/granularity/actions.ruleset b/data/granularity/actions.ruleset
index 9ea2b01100..e9a6e9733a 100644
--- a/data/granularity/actions.ruleset
+++ b/data/granularity/actions.ruleset
@@ -255,7 +255,7 @@ quiet_actions = "Transport Disembark 2", "Unit Move"
 action        = "Establish Embassy Stay"
 actor_reqs    =
     { "type",         "name",             "range", "present"
-      "UnitFlag",     "Diplomat",         "Local", TRUE
+      "UnitTypeFlag", "Diplomat",         "Local", TRUE
       "UnitState",    "OnLivableTile",    "Local", TRUE
       "MinMoveFrags", "1",                "Local", TRUE
       "DiplRel",      "Foreign",          "Local", TRUE
@@ -270,7 +270,7 @@ target_reqs   =
 action        = "Bribe Unit"
 actor_reqs    =
     { "type",         "name",          "range",  "present"
-      "UnitFlag",     "Diplomat",      "Local",  TRUE
+      "UnitTypeFlag", "Diplomat",      "Local",  TRUE
       "Tech",         "Currency",      "Player", TRUE
       "DiplRel",      "Alliance",      "Local",  FALSE
       "DiplRel",      "Team",          "Local",  FALSE
@@ -288,7 +288,7 @@ target_reqs   =
 action        = "Found City"
 actor_reqs    =
     { "type",         "name",          "range",  "present"
-      "UnitFlag",     "Cities",        "Local",  TRUE
+      "UnitTypeFlag", "Cities",        "Local",  TRUE
       "UnitState",    "OnLivableTile", "Local",  TRUE
       "MinMoveFrags", "5",             "Local",  TRUE
       "Gov",          "Tribal",        "Player", TRUE
@@ -303,7 +303,7 @@ target_reqs   =
 action        = "Found City"
 actor_reqs    =
     { "type",         "name",          "range",  "present"
-      "UnitFlag",     "Cities",        "Local",  TRUE
+      "UnitTypeFlag", "Cities",        "Local",  TRUE
       "UnitState",    "OnLivableTile", "Local",  TRUE
       "MinMoveFrags", "5",             "Local",  TRUE
       "Gov",          "Despotism",     "Player", TRUE
@@ -318,7 +318,7 @@ target_reqs   =
 action        = "Found City"
 actor_reqs    =
     { "type",         "name",          "range",  "present"
-      "UnitFlag",     "Cities",        "Local",  TRUE
+      "UnitTypeFlag", "Cities",        "Local",  TRUE
       "UnitState",    "OnLivableTile", "Local",  TRUE
       "MinMoveFrags", "5",             "Local",  TRUE
       "Gov",          "Monarchy",      "Player", TRUE
@@ -331,15 +331,15 @@ target_reqs   =
 [enabler_cultivate]
 action        = "Cultivate"
 actor_reqs    =
-    { "type",          "name",         "range", "present"
-      "UnitFlag",      "Workers",      "Local", TRUE
+    { "type",         "name",    "range", "present"
+      "UnitTypeFlag", "Workers", "Local", TRUE
     }
 
 [enabler_plant]
 action        = "Plant"
 actor_reqs    =
-    { "type",          "name",         "range", "present"
-      "UnitFlag",      "Workers",      "Local", TRUE
+    { "type",         "name",    "range", "present"
+      "UnitTypeFlag", "Workers", "Local", TRUE
     }
 
 [enabler_deboard]
@@ -438,7 +438,7 @@ actor_reqs    =
 action        = "Bombard 2"
 actor_reqs    =
     { "type",         "name",      "range"
-      "UnitFlag",     "Bombarder", "Local"
+      "UnitTypeFlag", "Bombarder", "Local"
       "MinMoveFrags", "5",         "Local"
     }
 
@@ -446,7 +446,7 @@ actor_reqs    =
 action        = "Surgical Strike Building"
 actor_reqs    =
     { "type",         "name",      "range"
-      "UnitFlag",     "Bombarder", "Local"
+      "UnitTypeFlag", "Bombarder", "Local"
       "MinMoveFrags", "5",         "Local"
     }
 
@@ -479,7 +479,7 @@ action        = "Conquer City Shrink"
 actor_reqs    =
     { "type",          "name",          "range",  "present"
       "UnitClassFlag", "CanOccupyCity", "Local",  TRUE
-      "UnitFlag",      "NonMil",        "Local",  FALSE
+      "UnitTypeFlag",  "NonMil",        "Local",  FALSE
       "DiplRel",       "War",           "Local",  TRUE
       "MinMoveFrags",  "1",             "Local",  TRUE
       "Gov",           "Tribal",        "Player", TRUE
@@ -495,7 +495,7 @@ action        = "Conquer City Shrink"
 actor_reqs    =
     { "type",          "name",          "range",  "present"
       "UnitClassFlag", "CanOccupyCity", "Local",  TRUE
-      "UnitFlag",      "NonMil",        "Local",  FALSE
+      "UnitTypeFlag",  "NonMil",        "Local",  FALSE
       "DiplRel",       "War",           "Local",  TRUE
       "MinMoveFrags",  "1",             "Local",  TRUE
       "Gov",           "Despotism",     "Player", TRUE
@@ -511,7 +511,7 @@ action        = "Conquer City Shrink"
 actor_reqs    =
     { "type",          "name",          "range",  "present"
       "UnitClassFlag", "CanOccupyCity", "Local",  TRUE
-      "UnitFlag",      "NonMil",        "Local",  FALSE
+      "UnitTypeFlag",  "NonMil",        "Local",  FALSE
       "DiplRel",       "War",           "Local",  TRUE
       "MinMoveFrags",  "1",             "Local",  TRUE
       "Gov",           "Monarchy",      "Player", TRUE
@@ -529,10 +529,10 @@ actor_reqs    =
       "MinMoveFrags", "1",    "Local"
     }
 target_reqs   =
-    { "type",      "name",         "range", "present"
-      "UnitFlag",  "Defenseless",  "Local", TRUE
-      "UnitState", "Transporting", "Local", FALSE
-      "CityTile",  "Center",       "Tile",  FALSE
+    { "type",         "name",         "range", "present"
+      "UnitTypeFlag", "Defenseless",  "Local", TRUE
+      "UnitState",    "Transporting", "Local", FALSE
+      "CityTile",     "Center",       "Tile",  FALSE
     }
 
 [enabler_capture_bounty_hunter]
diff --git a/data/granularity/effects.ruleset b/data/granularity/effects.ruleset
index a6b5367cd6..e2bcf646b7 100644
--- a/data/granularity/effects.ruleset
+++ b/data/granularity/effects.ruleset
@@ -79,9 +79,9 @@ reqs  =
 type    = "Unit_Vision_Radius_Sq"
 value   = 5
 reqs    =
-    { "type",        "name",            "range"
-      "Achievement", "Master Explorer", "Player"
-      "UnitFlag",    "Explorer",        "Local"
+    { "type",         "name",            "range"
+      "Achievement",  "Master Explorer", "Player"
+      "UnitTypeFlag", "Explorer",        "Local"
     }
 
 [effect_base_unit_upkeep]
@@ -473,7 +473,7 @@ reqs    =
       "CityTile",      "Center",       "Tile",  TRUE
       "Activity",      "Fortified",    "Local", FALSE
       "UnitClassFlag", "CanFortify",   "Local", TRUE
-      "UnitFlag",      "Cant_Fortify", "Local", FALSE
+      "UnitTypeFlag",  "Cant_Fortify", "Local", FALSE
     }
 
 [effect_base_regen]
-- 
2.43.0

