<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40740 >

The attached patch makes small wonders sort before great
wonders in build target lists. So for example the list of
possible city productions would go:

  1. Buildings not covered below.
  2. Coinage
  3. Civilian units
  4. Other units
  5. Small wonders
  6. Great wonders

instead of having small wonders mixed into (1). I suppose
it depends on the ruleset whether small wonders are to
be treated more like city buildings than great wonders;
I would think in either case it would be less likely for
the user to need to select them from the build target
list (less likely than regular buildings and units that
is), so having them appear just before great wonders at
the end is alright.


-----------------------------------------------------------------------
あなたのちょっとした不思議はいらない。
diff --git a/client/climisc.c b/client/climisc.c
index db6c7e0..bf2b2ec 100644
--- a/client/climisc.c
+++ b/client/climisc.c
@@ -572,8 +572,10 @@ static int target_get_section(struct city_production target)
   } else {
     if (improvement_has_flag(target.value, IF_GOLD)) {
       return 1;
-    } else if (is_great_wonder(target.value)) {
+    } else if (is_small_wonder(target.value)) {
       return 4;
+    } else if (is_great_wonder(target.value)) {
+      return 5;
     } else {
       return 0;
     }
@@ -603,7 +605,8 @@ static int my_cmp(const void *p1, const void *p2)
  section 1: Capitalization
  section 2: F_NONMIL units
  section 3: other units
- section 4: wonders
+ section 4: small wonders
+ section 5: great wonders
 **************************************************************************/
 void name_and_sort_items(struct city_production *targets, int num_targets,
 			 struct item *items,
diff --git a/client/climisc.c b/client/climisc.c
index ccb5856..909cbf6 100644
--- a/client/climisc.c
+++ b/client/climisc.c
@@ -560,8 +560,10 @@ static int target_get_section(struct universal target)
   } else {
     if (improvement_has_flag(target.value.building, IF_GOLD)) {
       return 1;
-    } else if (is_great_wonder(target.value.building)) {
+    } else if (is_small_wonder(target.value.building)) {
       return 4;
+    } else if (is_great_wonder(target.value.building)) {
+      return 5;
     } else {
       return 0;
     }
@@ -591,7 +593,8 @@ static int my_cmp(const void *p1, const void *p2)
  section 1: Capitalization
  section 2: F_CIVILIAN units
  section 3: other units
- section 4: wonders
+ section 4: small wonders
+ section 5: great wonders
 **************************************************************************/
 void name_and_sort_items(struct universal *targets, int num_targets,
 			 struct item *items,
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to