[Freeciv-Dev] (PR#9596) Better nation selection
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=9596 >
Ok here's a patch which replaces conception of 'nation classes' with
'nation groups'.
The difference is that with this patch a nation can be in more than a
one group.
Why do we need this?
- We already have 86 nations and it makes nation selection hard in
current dialog.
- It is stupid that Greeks are 'historical' they should be 'historical'
and 'modern' at least
- Some people are offended when we call their nation 'historical' just
because they don't have an independent country.
- More features could be added easier in the future. For example it
would be easier to create
"agricultural" group, than to add some entries into each (new) nation.
- AI selects stupid nations if you choose 'historical' nation. (With
this patch AI chooses random opponent. I will create a patch that
improves the behavior)
See attached screenshot.
--
mateusz
? advdiplomacy.c
? aicity.c
? core.3061
? core.3391
? core.4021
? core.5852
? core.6441
? core.6445
? core.6459
? core.6467
? core.6610
? core.7951
? shared.c
? data/ft
Index: client/packhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/packhand.c,v
retrieving revision 1.476
diff -u -r1.476 packhand.c
--- client/packhand.c 5 Mar 2005 23:51:05 -0000 1.476
+++ client/packhand.c 8 Mar 2005 20:48:05 -0000
@@ -2471,18 +2471,18 @@
}
pl->city_style = p->city_style;
- if (p->category[0] != '\0') {
- pl->category = mystrdup(p->category);
- } else {
- pl->category = mystrdup(N_("Other"));
- }
-
if (p->legend[0] != '\0') {
pl->legend = mystrdup(_(p->legend));
} else {
pl->legend = mystrdup("");
}
+ pl->num_groups = p->group_count;
+ pl->groups = malloc(sizeof(*(pl->groups)) * pl->num_groups);
+ for (i = 0; i < p->group_count; i++) {
+ pl->groups[i] = add_new_nation_group(p->group_name[i]);
+ }
+
tileset_setup_nation_flag(tileset, p->id);
}
Index: client/gui-gtk/dialogs.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/dialogs.c,v
retrieving revision 1.152
diff -u -r1.152 dialogs.c
--- client/gui-gtk/dialogs.c 22 Jan 2005 19:45:39 -0000 1.152
+++ client/gui-gtk/dialogs.c 8 Mar 2005 20:48:05 -0000
@@ -63,7 +63,6 @@
static GtkWidget *races_dialog_shell=NULL;
static GtkWidget *races_toggles_form[MAX_NUM_ITEMS];
static GtkWidget *races_by_name[MAX_NUM_ITEMS];
-static GtkWidget *class[MAX_NUM_ITEMS];
static GtkWidget *legend[MAX_NUM_ITEMS];
static GtkWidget *legend_frame[MAX_NUM_ITEMS];
static GtkWidget *races_sex_toggles_form;
@@ -78,9 +77,6 @@
static GtkWidget *leader_name; /* leader name */
static GtkWidget *notebook;
-static int num_classes;
-static char *class_names[MAX_NUM_ITEMS];
-
static GList *leader_strings = NULL;
/*
@@ -141,7 +137,7 @@
static bool is_name_unique = FALSE;
static int selected_sex;
static int selected_city_style;
-static int selected_class;
+static int selected_group;
static int city_style_idx[64]; /* translation table basic style->city_style */
static int city_style_ridx[64]; /* translation table the other way. they */
/* in fact limit the num of styles to 64 */
@@ -1633,7 +1629,6 @@
*****************************************************************/
void popup_races_dialog(void)
{
- int class_id;
int width, height;
gtk_widget_set_sensitive(top_vbox, FALSE);
@@ -1650,8 +1645,9 @@
* This is a hack to expand the legend label to take all the
* available space.
*/
- for (class_id = 0; class_id < num_classes; class_id++) {
- gtk_widget_set_usize(legend[class_id], width, -1);
+
+ for (group_id = 0; group_id <= get_nation_groups_count(); group_id++) {
+ gtk_widget_set_usize(legend[group_id], width, -1);
}
}
@@ -1661,7 +1657,7 @@
void popdown_races_dialog(void)
{
if (races_dialog_shell) {
- int class_id;
+ int group_id;
gtk_widget_set_sensitive(top_vbox, TRUE);
@@ -1677,17 +1673,17 @@
GTK_SIGNAL_FUNC(switch_page_callback),
NULL);
- for (class_id = 0; class_id < num_classes; class_id++) {
+ for (group_id = 0; group_id <= get_nation_groups_count(); group_id++) {
gtk_signal_disconnect_by_func(GTK_OBJECT
- (GTK_COMBO(races_by_name[class_id])->
+ (GTK_COMBO(races_by_name[group_id])->
list),
GTK_SIGNAL_FUNC(races_by_name_callback),
NULL);
- g_list_free(sorted_races_list[class_id]);
- sorted_races_list[class_id] = NULL;
- free(races_toggles[class_id]);
- races_toggles[class_id] = NULL;
+ g_list_free(sorted_races_list[group_id]);
+ sorted_races_list[group_id] = NULL;
+ free(races_toggles[group_id]);
+ races_toggles[group_id] = NULL;
}
gtk_widget_destroy(races_dialog_shell);
races_dialog_shell = NULL;
@@ -1753,23 +1749,28 @@
*****************************************************************/
static void select_random_race(void)
{
- int class_id = selected_class;
- int nations_in_class = g_list_length(sorted_races_list[class_id]);
+ int group_id = selected_group;
+ int nations_in_group = g_list_length(sorted_races_list[group_id]);
int index;
+ int num_tries = 0;
/* try to find a free nation */
while (TRUE) {
- index = myrand(nations_in_class);
+ index = myrand(nations_in_group);
selected_nation =
- GPOINTER_TO_INT(g_list_nth_data(sorted_races_list[class_id], index));
- if (GTK_WIDGET_SENSITIVE(races_toggles[class_id][index])) {
+ GPOINTER_TO_INT(g_list_nth_data(sorted_races_list[group_id], index));
+ if (GTK_WIDGET_SENSITIVE(races_toggles[group_id][index])) {
break;
}
+ num_tries++;
+ if (num_tries > 100) {
+ return;
+ }
}
/* initialize nation toggle array */
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
- (races_toggles[class_id][index]), TRUE);
+ (races_toggles[group_id][index]), TRUE);
/* initialize city style */
selected_city_style =
@@ -1785,7 +1786,7 @@
GtkNotebookPage * page, gint page_num,
gpointer data)
{
- selected_class = page_num;
+ selected_group = page_num;
select_random_race();
}
@@ -1794,10 +1795,11 @@
*****************************************************************/
void create_races_dialog(void)
{
- int i, class_id;
+ int i, group_id, j, num_groups;
GSList *sgroup = NULL;
GSList *cgroup = NULL;
GtkWidget *frame, *label;
+ char* group_name[MAX_NUM_NATION_GROUPS];
races_dialog_shell = gtk_dialog_new();
gtk_window_set_default_size(GTK_WINDOW(races_dialog_shell), 10, 650);
@@ -1812,74 +1814,66 @@
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(races_dialog_shell)->vbox),
frame, TRUE, TRUE, 0);
- /* ------- Add each nation to one of the class lists ------- */
-
- num_classes = 1;
- class_names[0] = _("All");
+ /* ------- Add each nation to group lists ------- */
+ num_groups = get_nation_groups_count() + 1;
+ group_name[0] = _("All");
+ for (i = 0; i < get_nation_groups_count(); i++) {
+ group_name[i+1] = _(get_nation_group_by_id(i)->name);
+ }
+
for (i = 0; i < game.playable_nation_count; i++) {
- bool found = FALSE;
struct nation_type *nation = get_nation_by_idx(i);
- /* Find the nation's class. */
- for (class_id = 1; class_id < num_classes; class_id++) {
- if (strcmp(nation->category, class_names[class_id]) == 0) {
- found = TRUE;
- break;
- }
- }
-
- /* Append a new class. */
- if (!found && num_classes < MAX_NUM_ITEMS) {
- class_id = num_classes++;
- class_names[class_id] = nation->category;
- }
-
- /* Add the nation to the class list. */
- sorted_races_list[class_id] =
- g_list_prepend(sorted_races_list[class_id], GINT_TO_POINTER(i));
-
- /* Add the nation to the "All" class. */
+ /* Add the nation to the "All" group */
sorted_races_list[0] =
g_list_prepend(sorted_races_list[0], GINT_TO_POINTER(i));
+
+ /* Add the nation to proper lists */
+ for (j = 0; j < get_nation_groups_count(); j++) {
+ if (nation_in_group(nation, get_nation_group_by_id(j)->name)) {
+ sorted_races_list[j + 1] =
+ g_list_append(sorted_races_list[j + 1], GINT_TO_POINTER(i));
+ }
+ }
}
- /* ------- create class notebook and add pages ------- */
+ /* ------- create group notebook and add pages ------- */
notebook = gtk_notebook_new();
gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_TOP);
gtk_container_add(GTK_CONTAINER(frame), notebook);
- for (class_id = 0; class_id < num_classes; class_id++) {
+ for (group_id = 0; group_id < num_groups; group_id++) {
GtkWidget *page, *label, *hbox, *scrolledwin;
- int nations_in_class = g_list_length(sorted_races_list[class_id]);
+ int nations_in_group = g_list_length(sorted_races_list[group_id]);
int per_row, rows;
GList *race_names = NULL;
GSList *group = NULL;
freelog(LOG_DEBUG, " %s[%d] has %d nations",
- skip_intl_qualifier_prefix(class_names[class_id]), class_id,
- nations_in_class);
- sorted_races_list[class_id] =
- g_list_sort(sorted_races_list[class_id], cmp_func);
+ skip_intl_qualifier_prefix(group_name[group_id]), group_id,
+ nations_in_group);
+ sorted_races_list[group_id] =
+ g_list_sort(sorted_races_list[group_id], cmp_func);
- for (i = 0; i < nations_in_class; i++) {
+ for (i = 0; i < nations_in_group; i++) {
race_names =
g_list_prepend(race_names,
(gchar *)get_nation_by_idx(GPOINTER_TO_INT(g_list_nth_data
- (sorted_races_list[class_id], i)))->name);
+ (sorted_races_list[group_id], i)))->name);
}
per_row = 8;
- if (nations_in_class == 0) {
+ if (nations_in_group == 0) {
rows = 0;
} else {
- rows = ((nations_in_class - 1) / per_row) + 1;
+ rows = ((nations_in_group - 1) / per_row) + 1;
}
page = gtk_vbox_new(FALSE, 1);
- label = gtk_label_new(Q_(class_names[class_id]));
+ label = gtk_label_new(Q_(group_name[group_id]));
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), page, label);
scrolledwin = gtk_scrolled_window_new(NULL, NULL);
@@ -1887,34 +1881,34 @@
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwin),
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
- races_toggles_form[class_id] = gtk_table_new(per_row, rows, FALSE);
+ races_toggles_form[group_id] = gtk_table_new(per_row, rows, FALSE);
gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW (scrolledwin),
- races_toggles_form[class_id]);
+ races_toggles_form[group_id]);
- races_toggles[class_id] =
- fc_calloc(nations_in_class, sizeof(GtkWidget *));
+ races_toggles[group_id] =
+ fc_calloc(nations_in_group, sizeof(GtkWidget *));
/* ------ add nation flag array to page ------ */
- for (i = 0; i < g_list_length(sorted_races_list[class_id]); i++) {
+ for (i = 0; i < g_list_length(sorted_races_list[group_id]); i++) {
gint nat_id =
- GPOINTER_TO_INT(g_list_nth_data(sorted_races_list[class_id], i));
+ GPOINTER_TO_INT(g_list_nth_data(sorted_races_list[group_id], i));
SPRITE *s = crop_blankspace(get_nation_by_idx(nat_id)->flag_sprite);
GtkWidget *flag = gtk_pixmap_new(s->pixmap, s->mask);
- races_toggles[class_id][i] = gtk_radio_button_new(group);
+ races_toggles[group_id][i] = gtk_radio_button_new(group);
gtk_misc_set_alignment(GTK_MISC(flag), 0, 0.5);
gtk_misc_set_padding(GTK_MISC(flag), 6, 4);
- gtk_container_add(GTK_CONTAINER(races_toggles[class_id][i]), flag);
+ gtk_container_add(GTK_CONTAINER(races_toggles[group_id][i]), flag);
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
- (races_toggles[class_id][i]), FALSE);
+ (races_toggles[group_id][i]), FALSE);
group =
gtk_radio_button_group(GTK_RADIO_BUTTON
- (races_toggles[class_id][i]));
- gtk_table_attach_defaults(GTK_TABLE(races_toggles_form[class_id]),
- races_toggles[class_id][i], i % per_row,
+ (races_toggles[group_id][i]));
+ gtk_table_attach_defaults(GTK_TABLE(races_toggles_form[group_id]),
+ races_toggles[group_id][i], i % per_row,
i % per_row + 1, i / per_row,
i / per_row + 1);
}
@@ -1925,41 +1919,41 @@
gtk_box_pack_start(GTK_BOX(page), hbox, FALSE, FALSE, 5);
label = gtk_label_new(_("Nation:"));
- races_by_name[class_id] = gtk_combo_new();
+ races_by_name[group_id] = gtk_combo_new();
gtk_editable_set_editable(GTK_EDITABLE
- (GTK_COMBO(races_by_name[class_id])->entry),
+ (GTK_COMBO(races_by_name[group_id])->entry),
FALSE);
- gtk_combo_set_popdown_strings(GTK_COMBO(races_by_name[class_id]),
+ gtk_combo_set_popdown_strings(GTK_COMBO(races_by_name[group_id]),
race_names);
- gtk_combo_set_value_in_list(GTK_COMBO(races_by_name[class_id]), TRUE,
+ gtk_combo_set_value_in_list(GTK_COMBO(races_by_name[group_id]), TRUE,
FALSE);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 4);
- gtk_box_pack_start(GTK_BOX(hbox), races_by_name[class_id],
+ gtk_box_pack_start(GTK_BOX(hbox), races_by_name[group_id],
FALSE, FALSE, 0);
- /* ------ add info about class and legend to page ------ */
+ /* ------ add info about group and legend to page ------ */
- hbox = gtk_hbox_new(FALSE, 0);
+/* hbox = gtk_hbox_new(FALSE, 0);
gtk_box_pack_start(GTK_BOX(page), hbox, FALSE, FALSE, 5);
label = gtk_label_new(_("Class:"));
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
- class[class_id] = gtk_label_new("content");
- gtk_box_pack_start(GTK_BOX(hbox), class[class_id], FALSE, FALSE, 0);
+ class[group_id] = gtk_label_new("content");
+ gtk_box_pack_start(GTK_BOX(hbox), class[group_id], FALSE, FALSE, 0);*/
hbox = gtk_hbox_new(FALSE, 0);
gtk_box_pack_start(GTK_BOX(page), hbox, FALSE, FALSE, 5);
- legend[class_id] = gtk_label_new("content");
- gtk_label_set_line_wrap(GTK_LABEL(legend[class_id]), TRUE);
- gtk_label_set_justify(GTK_LABEL(legend[class_id]), GTK_JUSTIFY_FILL);
-
- legend_frame[class_id] = gtk_frame_new(_("Description"));
- gtk_box_pack_start(GTK_BOX(hbox), legend_frame[class_id], TRUE, TRUE, 0);
- gtk_container_add(GTK_CONTAINER(legend_frame[class_id]), legend[class_id]);
+ legend[group_id] = gtk_label_new("content");
+ gtk_label_set_line_wrap(GTK_LABEL(legend[group_id]), TRUE);
+ gtk_label_set_justify(GTK_LABEL(legend[group_id]), GTK_JUSTIFY_FILL);
+
+ legend_frame[group_id] = gtk_frame_new(_("Description"));
+ gtk_box_pack_start(GTK_BOX(hbox), legend_frame[group_id], TRUE, TRUE, 0);
+ gtk_container_add(GTK_CONTAINER(legend_frame[group_id]), legend[group_id]);
/* ------- contruction of one page finished ------- */
}
- selected_class = 0;
+ selected_group = 0;
/* ------- leader sex toggles ------- */
@@ -2068,14 +2062,14 @@
/* ------- connect callback functions ------- */
- for (class_id = 0; class_id < num_classes; class_id++) {
- for (i = 0; i < g_list_length(sorted_races_list[class_id]); i++) {
- gtk_signal_connect(GTK_OBJECT(races_toggles[class_id][i]), "toggled",
+ for (group_id = 0; group_id < get_nation_groups_count() + 1; group_id++) {
+ for (i = 0; i < g_list_length(sorted_races_list[group_id]); i++) {
+ gtk_signal_connect(GTK_OBJECT(races_toggles[group_id][i]), "toggled",
GTK_SIGNAL_FUNC(races_toggles_callback),
- g_list_nth_data(sorted_races_list[class_id], i));
+ g_list_nth_data(sorted_races_list[group_id], i));
}
- gtk_signal_connect(GTK_OBJECT(GTK_COMBO(races_by_name[class_id])->list),
+ gtk_signal_connect(GTK_OBJECT(GTK_COMBO(races_by_name[group_id])->list),
"selection_changed",
GTK_SIGNAL_FUNC(races_by_name_callback), NULL);
}
@@ -2123,20 +2117,20 @@
**************************************************************************/
static void races_by_name_callback(GtkWidget * w, gpointer data)
{
- int i, class_id = selected_class;
+ int i, group_id = selected_group;
char *chosen =
- gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(races_by_name[class_id])->
+ gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(races_by_name[group_id])->
entry));
- for (i = 0; i < g_list_length(sorted_races_list[class_id]); i++) {
+ for (i = 0; i < g_list_length(sorted_races_list[group_id]); i++) {
if (strcmp(chosen,
get_nation_by_idx(GPOINTER_TO_INT
(g_list_nth_data
- (sorted_races_list[class_id],
+ (sorted_races_list[group_id],
i)))->name) == 0) {
- if (GTK_WIDGET_SENSITIVE(races_toggles[class_id][i])) {
+ if (GTK_WIDGET_SENSITIVE(races_toggles[group_id][i])) {
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
- (races_toggles[class_id][i]), TRUE);
+ (races_toggles[group_id][i]), TRUE);
break;
} else {
/* That one's taken */
@@ -2151,22 +2145,22 @@
**************************************************************************/
void races_toggles_set_sensitive(bool *nations_used)
{
- int i, class_id;
+ int i, group_id;
- for (class_id = 0; class_id < num_classes; class_id++) {
- int nations_in_class = g_list_length(sorted_races_list[class_id]);
+ for (group_id = 0; group_id <= get_nation_groups_count(); group_id++) {
+ int nations_in_group = g_list_length(sorted_races_list[group_id]);
- for (i = 0; i < nations_in_class; i++) {
- gtk_widget_set_sensitive(races_toggles[class_id][i], TRUE);
+ for (i = 0; i < nations_in_group; i++) {
+ gtk_widget_set_sensitive(races_toggles[group_id][i], TRUE);
}
for (i = 0; i < game.playable_nation_count; i++) {
if (nations_used[i]) {
int index =
- g_list_index(sorted_races_list[class_id], GINT_TO_POINTER(i));
+ g_list_index(sorted_races_list[group_id], GINT_TO_POINTER(i));
if (index != -1) {
- gtk_widget_set_sensitive(races_toggles[class_id][index], FALSE);
+ gtk_widget_set_sensitive(races_toggles[group_id][index], FALSE);
}
}
}
@@ -2201,7 +2195,7 @@
**************************************************************************/
static void races_toggles_callback(GtkWidget * w, gpointer race_id_p)
{
- int class_id = selected_class;
+ int group_id = selected_group;
if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))) {
/* don't do anything if signal is untoggling the button */
@@ -2210,11 +2204,9 @@
selected_nation = GPOINTER_TO_INT(race_id_p);
- gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(races_by_name[class_id])->entry),
+ gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(races_by_name[group_id])->entry),
get_nation_by_idx(selected_nation)->name);
- gtk_label_set_text(GTK_LABEL(class[class_id]),
- get_nation_by_idx(selected_nation)->category);
- gtk_label_set_text(GTK_LABEL(legend[class_id]),
+ gtk_label_set_text(GTK_LABEL(legend[group_id]),
get_nation_by_idx(selected_nation)->legend);
select_random_leader();
Index: client/gui-gtk-2.0/dialogs.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/dialogs.c,v
retrieving revision 1.92
diff -u -r1.92 dialogs.c
--- client/gui-gtk-2.0/dialogs.c 28 Feb 2005 04:16:45 -0000 1.92
+++ client/gui-gtk-2.0/dialogs.c 8 Mar 2005 20:48:13 -0000
@@ -65,7 +65,7 @@
/******************************************************************/
static GtkWidget *races_shell;
-static GtkWidget *races_nation_list;
+static GtkWidget *races_nation_list[MAX_NUM_NATION_GROUPS + 1];
static GtkWidget *races_leader;
static GList *races_leader_list;
static GtkWidget *races_sex[2];
@@ -1541,79 +1541,40 @@
gtk_window_present(GTK_WINDOW(unit_select_dialog_shell));
}
-
/****************************************************************
-...
-*****************************************************************/
-static void create_races_dialog(void)
+ NATION SELECTION DIALOG
+****************************************************************/
+/****************************************************************
+ Creates a list of nation of given group
+ Inserts apropriate gtk_tree_view into races_nation_list[i]
+ If group == NULL, create a list of all nations
++****************************************************************/
+static GtkWidget* create_list_of_nations_in_group(struct nation_group* group,
int index)
{
- GtkWidget *shell;
- GtkWidget *cmd;
- GtkWidget *vbox, *hbox, *table;
- GtkWidget *frame, *label, *combo;
- GtkWidget *notebook, *text;
-
- GtkWidget *list, *sw;
+ GtkWidget *sw;
+ GtkListStore *store;
+ GtkWidget *list;
+
GtkTreeSelection *select;
- GtkListStore *store;
GtkCellRenderer *render;
GtkTreeViewColumn *column;
+
int i;
- shell =
- gtk_dialog_new_with_buttons(_("What Nation Will You Be?"),
- NULL,
- 0,
- _("_Disconnect"),
- GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK,
- GTK_RESPONSE_ACCEPT,
- NULL);
- races_shell = shell;
- setup_dialog(shell, toplevel);
-
- gtk_window_set_position(GTK_WINDOW(shell), GTK_WIN_POS_CENTER_ON_PARENT);
- gtk_window_set_default_size(GTK_WINDOW(shell), -1, 310);
-
- cmd = gtk_dialog_add_button(GTK_DIALOG(shell),
- GTK_STOCK_QUIT, GTK_RESPONSE_CLOSE);
- gtk_button_box_set_child_secondary(
- GTK_BUTTON_BOX(GTK_DIALOG(shell)->action_area), cmd, TRUE);
- gtk_widget_show(cmd);
-
- frame = gtk_frame_new(_("Select a nation"));
- gtk_container_add(GTK_CONTAINER(GTK_DIALOG(shell)->vbox), frame);
-
- hbox = gtk_hbox_new(FALSE, 18);
- gtk_container_set_border_width(GTK_CONTAINER(hbox), 3);
- gtk_container_add(GTK_CONTAINER(frame), hbox);
-
- vbox = gtk_vbox_new(FALSE, 2);
- gtk_container_add(GTK_CONTAINER(hbox), vbox);
-
- /* Nation list. */
store = gtk_list_store_new(5, G_TYPE_INT, G_TYPE_BOOLEAN,
GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING);
gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(store),
3, GTK_SORT_ASCENDING);
list = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
- races_nation_list = list;
+ races_nation_list[index] = list;
g_object_unref(store);
select = gtk_tree_view_get_selection(GTK_TREE_VIEW(list));
g_signal_connect(select, "changed", G_CALLBACK(races_nation_callback), NULL);
gtk_tree_selection_set_select_function(select, races_selection_func,
NULL, NULL);
- label = g_object_new(GTK_TYPE_LABEL,
- "use-underline", TRUE,
- "mnemonic-widget", list,
- "label", _("_Nations:"),
- "xalign", 0.0,
- "yalign", 0.5,
- NULL);
- gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
sw = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw),
@@ -1621,8 +1582,7 @@
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
gtk_container_add(GTK_CONTAINER(sw), list);
- gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0);
-
+
render = gtk_cell_renderer_pixbuf_new();
column = gtk_tree_view_column_new_with_attributes(_("Flag"), render,
"pixbuf", 2, NULL);
@@ -1634,10 +1594,6 @@
gtk_tree_view_append_column(GTK_TREE_VIEW(list), column);
render = gtk_cell_renderer_text_new();
g_object_set(render, "style", PANGO_STYLE_ITALIC, NULL);
- column = gtk_tree_view_column_new_with_attributes(_("Class"), render,
- "text", 4, "strikethrough", 1, NULL);
- gtk_tree_view_column_set_sort_column_id(column, 4);
- gtk_tree_view_append_column(GTK_TREE_VIEW(list), column);
/* Populate nation list store. */
for (i = 0; i < game.playable_nation_count; i++) {
@@ -1648,6 +1604,10 @@
GValue value = { 0, };
nation = get_nation_by_idx(i);
+
+ if (group != NULL && !nation_in_group(nation, group->name)) {
+ continue;
+ }
gtk_list_store_append(store, &it);
@@ -1660,13 +1620,105 @@
g_value_set_static_string(&value, nation->name);
gtk_list_store_set_value(store, &it, 3, &value);
g_value_unset(&value);
+ }
+ return sw;
+}
- g_value_init(&value, G_TYPE_STRING);
- g_value_set_static_string(&value, Q_(nation->category));
- gtk_list_store_set_value(store, &it, 4, &value);
- g_value_unset(&value);
+/****************************************************************
+ Creates left side of nation selection dialog
+****************************************************************/
+static GtkWidget* create_nation_selection_list(void)
+{
+ GtkWidget *vbox;
+ GtkWidget *notebook;
+
+ GtkWidget *label;
+ GtkWidget *nation_list;
+ GtkWidget *group_name_label;
+
+ int i;
+
+ vbox = gtk_vbox_new(FALSE, 2);
+
+ nation_list = create_list_of_nations_in_group(NULL, 0);
+ label = g_object_new(GTK_TYPE_LABEL,
+ "use-underline", TRUE,
+ "mnemonic-widget", nation_list,
+ "label", _("_Nations:"),
+ "xalign", 0.0,
+ "yalign", 0.5,
+ NULL);
+ notebook = gtk_notebook_new();
+ gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_LEFT);
+
+ gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0);
+
+ for (i = 0; i <= get_nation_groups_count(); i++) {
+ struct nation_group* group = (i == 0 ? NULL: get_nation_group_by_id(i -
1));
+ nation_list = create_list_of_nations_in_group(group, i);
+ group_name_label = gtk_label_new(group ? _(group->name) : _("All"));
+ gtk_notebook_append_page(GTK_NOTEBOOK(notebook), nation_list,
group_name_label);
}
+ return vbox;
+}
+
+
+/****************************************************************
+...
+*****************************************************************/
+static void create_races_dialog(void)
+{
+ GtkWidget *shell;
+ GtkWidget *cmd;
+ GtkWidget *vbox, *hbox, *table;
+ GtkWidget *frame, *label, *combo;
+ GtkWidget *text;
+ GtkWidget *notebook;
+ GtkWidget* nation_selection_list;
+
+
+ GtkWidget *sw;
+ GtkWidget *list;
+ GtkListStore *store;
+ GtkCellRenderer *render;
+ GtkTreeViewColumn *column;
+
+ int i;
+
+ shell =
+ gtk_dialog_new_with_buttons(_("What Nation Will You Be?"),
+ NULL,
+ 0,
+ _("_Disconnect"),
+ GTK_RESPONSE_CANCEL,
+ GTK_STOCK_OK,
+ GTK_RESPONSE_ACCEPT,
+ NULL);
+ races_shell = shell;
+ setup_dialog(shell, toplevel);
+
+ gtk_window_set_position(GTK_WINDOW(shell), GTK_WIN_POS_CENTER_ON_PARENT);
+ gtk_window_set_default_size(GTK_WINDOW(shell), -1, 310);
+
+ cmd = gtk_dialog_add_button(GTK_DIALOG(shell),
+ GTK_STOCK_QUIT, GTK_RESPONSE_CLOSE);
+ gtk_button_box_set_child_secondary(
+ GTK_BUTTON_BOX(GTK_DIALOG(shell)->action_area), cmd, TRUE);
+ gtk_widget_show(cmd);
+
+ frame = gtk_frame_new(_("Select a nation"));
+ gtk_container_add(GTK_CONTAINER(GTK_DIALOG(shell)->vbox), frame);
+
+ hbox = gtk_hbox_new(FALSE, 18);
+ gtk_container_set_border_width(GTK_CONTAINER(hbox), 3);
+ gtk_container_add(GTK_CONTAINER(frame), hbox);
+
+ /* Nation list */
+ nation_selection_list = create_nation_selection_list();
+ gtk_container_add(GTK_CONTAINER(hbox), nation_selection_list);
+
/* Right side. */
notebook = gtk_notebook_new();
@@ -1912,7 +1964,7 @@
{
GtkTreeModel *model;
- model = gtk_tree_view_get_model(GTK_TREE_VIEW(races_nation_list));
+ model = gtk_tree_view_get_model(GTK_TREE_VIEW(races_nation_list[0]));
/* This has a possibility of infinite loop in case
* game.playable_nation_count < game.nplayers. */
@@ -1932,7 +1984,7 @@
gtk_tree_model_get(model, &it, 1, &chosen, -1);
if (!chosen) {
- gtk_tree_view_set_cursor(GTK_TREE_VIEW(races_nation_list), path,
+ gtk_tree_view_set_cursor(GTK_TREE_VIEW(races_nation_list[0]), path,
NULL, FALSE);
gtk_tree_path_free(path);
return;
@@ -1952,40 +2004,52 @@
GtkTreeIter it;
GtkTreePath *path;
gboolean chosen;
+ int i;
+ gboolean changed;
if (!races_shell) {
return;
}
- model = gtk_tree_view_get_model(GTK_TREE_VIEW(races_nation_list));
-
- if (gtk_tree_model_get_iter_first(model, &it)) {
- do {
- int nation;
+ for (i = 0; i <= get_nation_groups_count(); i++) {
+ model = gtk_tree_view_get_model(GTK_TREE_VIEW(races_nation_list[i]));
+ if (gtk_tree_model_get_iter_first(model, &it)) {
+ do {
+ int nation;
- gtk_tree_model_get(model, &it, 0, &nation, -1);
+ gtk_tree_model_get(model, &it, 0, &nation, -1);
- chosen = nations_used[nation];
- gtk_list_store_set(GTK_LIST_STORE(model), &it, 1, chosen, -1);
+ chosen = nations_used[nation];
+ gtk_list_store_set(GTK_LIST_STORE(model), &it, 1, chosen, -1);
- } while (gtk_tree_model_iter_next(model, &it));
+ } while (gtk_tree_model_iter_next(model, &it));
+ }
}
+
+ changed = false;
+ for (i = 0; i <= get_nation_groups_count(); i++) {
+ gtk_tree_view_get_cursor(GTK_TREE_VIEW(races_nation_list[i]), &path, NULL);
+ model = gtk_tree_view_get_model(GTK_TREE_VIEW(races_nation_list[i]));
+ if (path) {
+ gtk_tree_model_get_iter(model, &it, path);
+ gtk_tree_model_get(model, &it, 1, &chosen, -1);
- gtk_tree_view_get_cursor(GTK_TREE_VIEW(races_nation_list), &path, NULL);
- if (path) {
- gtk_tree_model_get_iter(model, &it, path);
- gtk_tree_model_get(model, &it, 1, &chosen, -1);
+ if (chosen) {
+ GtkTreeSelection* select =
gtk_tree_view_get_selection(GTK_TREE_VIEW(races_nation_list[i]));
+ gtk_tree_selection_unselect_all(select);
+ changed = true;
+ }
- if (chosen) {
- select_random_race();
+ gtk_tree_path_free(path);
}
-
- gtk_tree_path_free(path);
+ }
+ if (changed) {
+ select_random_race();
}
}
/**************************************************************************
- ...
+ Called whenever a user selects a nation in nation list
**************************************************************************/
static void races_nation_callback(GtkTreeSelection *select, gpointer data)
{
@@ -2004,6 +2068,28 @@
} else {
int cs, i, j;
GtkTreePath *path;
+
+
+ /* Unselect other nations in other pages
+ * This can set selected_nation to -1, so we have to copy it
+ */
+ int selected_nation_copy = selected_nation;
+ for (i = 0; i <= get_nation_groups_count(); i++) {
+ gtk_tree_view_get_cursor(GTK_TREE_VIEW(races_nation_list[i]), &path,
NULL);
+ model = gtk_tree_view_get_model(GTK_TREE_VIEW(races_nation_list[i]));
+ if (path) {
+ int other_nation;
+ gtk_tree_model_get_iter(model, &it, path);
+ gtk_tree_model_get(model, &it, 0, &other_nation, -1);
+ if (other_nation != selected_nation_copy) {
+ GtkTreeSelection* select =
gtk_tree_view_get_selection(GTK_TREE_VIEW(races_nation_list[i]));
+ gtk_tree_selection_unselect_all(select);
+ }
+
+ gtk_tree_path_free(path);
+ }
+ }
+ selected_nation = selected_nation_copy;
select_random_leader();
Index: common/nation.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/nation.c,v
retrieving revision 1.42
diff -u -r1.42 nation.c
--- common/nation.c 12 Dec 2004 03:44:47 -0000 1.42
+++ common/nation.c 8 Mar 2005 20:48:13 -0000
@@ -35,6 +35,9 @@
static struct nation_type *nations = NULL;
static struct team teams[MAX_NUM_TEAMS];
+static int num_nation_groups;
+static struct nation_group nation_groups[MAX_NUM_NATION_GROUPS];
+
/***************************************************************
Returns 1 if nid is a valid nation id, else 0.
If returning 0, prints log message with given loglevel
@@ -223,11 +226,6 @@
p->leaders = NULL;
}
- if (p->category) {
- free(p->category);
- p->category = NULL;
- }
-
if (p->legend) {
free(p->legend);
p->legend = NULL;
@@ -242,13 +240,19 @@
free(p->parent_nations);
p->parent_nations = NULL;
}
+
+ if (p->groups) {
+ free(p->groups);
+ p->groups = NULL;
+ }
nation_city_names_free(p->city_names);
p->city_names = NULL;
}
/***************************************************************
- De-allocate the currently allocated nations.
+ De-allocate the currently allocated nations and remove all
+ nation groups
***************************************************************/
void nations_free()
{
@@ -265,6 +269,7 @@
free(nations);
nations = NULL;
game.nation_count = 0;
+ num_nation_groups = 0;
}
/***************************************************************
@@ -423,3 +428,50 @@
teams[i].name[0] = '\0';
}
}
+
+/***************************************************************
+ Add new group into the array of groups. If a group with
+ the same name already exists don't create new one, but return
+ old one
+***************************************************************/
+struct nation_group* add_new_nation_group(const char* name)
+{
+ int i;
+ for (i = 0; i < num_nation_groups; i++) {
+ if (mystrcasecmp(name, nation_groups[i].name) == 0) {
+ return &nation_groups[i];
+ }
+ }
+ if (i == MAX_NUM_NATION_GROUPS) {
+ die("Too many groups of nations");
+ }
+ sz_strlcpy(nation_groups[i].name, name);
+ return &nation_groups[num_nation_groups++];
+}
+
+/***************************************************************
+***************************************************************/
+int get_nation_groups_count(void)
+{
+ return num_nation_groups;
+}
+
+struct nation_group* get_nation_group_by_id(int id)
+{
+ return &nation_groups[id];
+}
+
+/***************************************************************
+ Check if the given nation is in a given group
+***************************************************************/
+bool nation_in_group(struct nation_type* nation, const char* group_name)
+{
+ int i;
+ for (i = 0; i < nation->num_groups; i++) {
+ if (mystrcasecmp(nation->groups[i]->name, group_name) == 0) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
Index: common/nation.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/nation.h,v
retrieving revision 1.35
diff -u -r1.35 nation.h
--- common/nation.h 22 Jan 2005 21:12:10 -0000 1.35
+++ common/nation.h 8 Mar 2005 20:48:13 -0000
@@ -34,6 +34,8 @@
#define MAX_NUM_TEAMS MAX_NUM_PLAYERS
#define TEAM_NONE 255
+#define MAX_NUM_NATION_GROUPS 128
+
typedef int Nation_Type_id;
typedef int Team_Type_id;
@@ -65,6 +67,11 @@
bool is_male;
};
+struct nation_group {
+ char name[MAX_LEN_NAME];
+ /* ... */
+};
+
struct nation_type {
/* Pointer values are allocated on load then freed in free_nations(). */
const char *name; /* Translated string - doesn't need freeing. */
@@ -76,7 +83,6 @@
int city_style;
struct city_name *city_names; /* The default city names. */
struct Sprite *flag_sprite;
- char *category; /* may be empty */
char *legend; /* may be empty */
/* civilwar_nations is a NO_NATION_SELECTED-terminated list of index of
@@ -92,6 +98,10 @@
/* Items given to this nation at game start. Server only. */
int init_techs[MAX_NUM_TECH_LIST];
int init_buildings[MAX_NUM_BUILDING_LIST];
+
+ /* Groups which this nation is assigned to */
+ int num_groups;
+ struct nation_group **groups;
};
struct team {
@@ -122,6 +132,12 @@
void team_remove_player(struct player *pplayer);
int team_count_members_alive(Team_Type_id id);
+struct nation_group* add_new_nation_group(const char* name);
+int get_nation_groups_count(void);
+struct nation_group* get_nation_group_by_id(int id);
+
+bool nation_in_group(struct nation_type* nation, const char* group_name);
+
#define team_iterate(PI_team) \
{ \
struct team *PI_team; \
Index: common/packets.def
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/packets.def,v
retrieving revision 1.97
diff -u -r1.97 packets.def
--- common/packets.def 5 Mar 2005 00:06:25 -0000 1.97
+++ common/packets.def 8 Mar 2005 20:48:13 -0000
@@ -1110,7 +1110,6 @@
STRING name_plural[MAX_LEN_NAME];
STRING graphic_str[MAX_LEN_NAME];
STRING graphic_alt[MAX_LEN_NAME];
- STRING category[MAX_LEN_NAME];
STRING legend[MAX_LEN_MSG];
UINT8 city_style;
@@ -1119,6 +1118,9 @@
UINT8 leader_count;
STRING leader_name[MAX_NUM_LEADERS:leader_count][MAX_LEN_NAME];
BOOL leader_sex[MAX_NUM_LEADERS:leader_count];
+
+ UINT8 group_count;
+ STRING group_name[MAX_NUM_NATION_GROUPS:group_count][MAX_LEN_NAME];
end
PACKET_RULESET_CITY=103;sc,lsend
Index: common/packets_gen.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/packets_gen.c,v
retrieving revision 1.99
diff -u -r1.99 packets_gen.c
--- common/packets_gen.c 5 Mar 2005 00:06:25 -0000 1.99
+++ common/packets_gen.c 8 Mar 2005 20:48:32 -0000
@@ -23975,7 +23975,7 @@
#define cmp_packet_ruleset_nation_100 cmp_const
-BV_DEFINE(packet_ruleset_nation_100_fields, 12);
+BV_DEFINE(packet_ruleset_nation_100_fields, 13);
static struct packet_ruleset_nation *receive_packet_ruleset_nation_100(struct
connection *pc, enum packet_type type)
{
@@ -24020,12 +24020,9 @@
dio_get_string(&din, real_packet->graphic_alt,
sizeof(real_packet->graphic_alt));
}
if (BV_ISSET(fields, 5)) {
- dio_get_string(&din, real_packet->category, sizeof(real_packet->category));
- }
- if (BV_ISSET(fields, 6)) {
dio_get_string(&din, real_packet->legend, sizeof(real_packet->legend));
}
- if (BV_ISSET(fields, 7)) {
+ if (BV_ISSET(fields, 6)) {
{
int readin;
@@ -24033,10 +24030,10 @@
real_packet->city_style = readin;
}
}
- if (BV_ISSET(fields, 8)) {
+ if (BV_ISSET(fields, 7)) {
dio_get_tech_list(&din, real_packet->init_techs);
}
- if (BV_ISSET(fields, 9)) {
+ if (BV_ISSET(fields, 8)) {
{
int readin;
@@ -24044,7 +24041,7 @@
real_packet->leader_count = readin;
}
}
- if (BV_ISSET(fields, 10)) {
+ if (BV_ISSET(fields, 9)) {
{
int i;
@@ -24058,7 +24055,7 @@
}
}
}
- if (BV_ISSET(fields, 11)) {
+ if (BV_ISSET(fields, 10)) {
{
int i;
@@ -24072,6 +24069,28 @@
}
}
}
+ if (BV_ISSET(fields, 11)) {
+ {
+ int readin;
+
+ dio_get_uint8(&din, &readin);
+ real_packet->group_count = readin;
+ }
+ }
+ if (BV_ISSET(fields, 12)) {
+
+ {
+ int i;
+
+ if(real_packet->group_count > MAX_NUM_NATION_GROUPS) {
+ freelog(LOG_ERROR, "packets_gen.c: WARNING: truncation array");
+ real_packet->group_count = MAX_NUM_NATION_GROUPS;
+ }
+ for (i = 0; i < real_packet->group_count; i++) {
+ dio_get_string(&din, real_packet->group_name[i],
sizeof(real_packet->group_name[i]));
+ }
+ }
+ }
clone = fc_malloc(sizeof(*clone));
*clone = *real_packet;
@@ -24126,17 +24145,13 @@
if(differ) {different++;}
if(differ) {BV_SET(fields, 4);}
- differ = (strcmp(old->category, real_packet->category) != 0);
- if(differ) {different++;}
- if(differ) {BV_SET(fields, 5);}
-
differ = (strcmp(old->legend, real_packet->legend) != 0);
if(differ) {different++;}
- if(differ) {BV_SET(fields, 6);}
+ if(differ) {BV_SET(fields, 5);}
differ = (old->city_style != real_packet->city_style);
if(differ) {different++;}
- if(differ) {BV_SET(fields, 7);}
+ if(differ) {BV_SET(fields, 6);}
{
@@ -24152,11 +24167,11 @@
}
}
if(differ) {different++;}
- if(differ) {BV_SET(fields, 8);}
+ if(differ) {BV_SET(fields, 7);}
differ = (old->leader_count != real_packet->leader_count);
if(differ) {different++;}
- if(differ) {BV_SET(fields, 9);}
+ if(differ) {BV_SET(fields, 8);}
{
@@ -24172,7 +24187,7 @@
}
}
if(differ) {different++;}
- if(differ) {BV_SET(fields, 10);}
+ if(differ) {BV_SET(fields, 9);}
{
@@ -24188,8 +24203,28 @@
}
}
if(differ) {different++;}
+ if(differ) {BV_SET(fields, 10);}
+
+ differ = (old->group_count != real_packet->group_count);
+ if(differ) {different++;}
if(differ) {BV_SET(fields, 11);}
+
+ {
+ differ = (old->group_count != real_packet->group_count);
+ if(!differ) {
+ int i;
+ for (i = 0; i < real_packet->group_count; i++) {
+ if (strcmp(old->group_name[i], real_packet->group_name[i]) != 0) {
+ differ = TRUE;
+ break;
+ }
+ }
+ }
+ }
+ if(differ) {different++;}
+ if(differ) {BV_SET(fields, 12);}
+
if (different == 0 && !force_send_of_unchanged) {
return 0;
}
@@ -24212,21 +24247,18 @@
dio_put_string(&dout, real_packet->graphic_alt);
}
if (BV_ISSET(fields, 5)) {
- dio_put_string(&dout, real_packet->category);
- }
- if (BV_ISSET(fields, 6)) {
dio_put_string(&dout, real_packet->legend);
}
- if (BV_ISSET(fields, 7)) {
+ if (BV_ISSET(fields, 6)) {
dio_put_uint8(&dout, real_packet->city_style);
}
- if (BV_ISSET(fields, 8)) {
+ if (BV_ISSET(fields, 7)) {
dio_put_tech_list(&dout, real_packet->init_techs);
}
- if (BV_ISSET(fields, 9)) {
+ if (BV_ISSET(fields, 8)) {
dio_put_uint8(&dout, real_packet->leader_count);
}
- if (BV_ISSET(fields, 10)) {
+ if (BV_ISSET(fields, 9)) {
{
int i;
@@ -24236,7 +24268,7 @@
}
}
}
- if (BV_ISSET(fields, 11)) {
+ if (BV_ISSET(fields, 10)) {
{
int i;
@@ -24246,6 +24278,19 @@
}
}
}
+ if (BV_ISSET(fields, 11)) {
+ dio_put_uint8(&dout, real_packet->group_count);
+ }
+ if (BV_ISSET(fields, 12)) {
+
+ {
+ int i;
+
+ for (i = 0; i < real_packet->group_count; i++) {
+ dio_put_string(&dout, real_packet->group_name[i]);
+ }
+ }
+ }
if (old_from_hash) {
Index: common/packets_gen.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/packets_gen.h,v
retrieving revision 1.87
diff -u -r1.87 packets_gen.h
--- common/packets_gen.h 5 Mar 2005 00:06:25 -0000 1.87
+++ common/packets_gen.h 8 Mar 2005 20:48:32 -0000
@@ -843,13 +843,14 @@
char name_plural[MAX_LEN_NAME];
char graphic_str[MAX_LEN_NAME];
char graphic_alt[MAX_LEN_NAME];
- char category[MAX_LEN_NAME];
char legend[MAX_LEN_MSG];
int city_style;
int init_techs[MAX_NUM_TECH_LIST];
int leader_count;
char leader_name[MAX_NUM_LEADERS][MAX_LEN_NAME];
bool leader_sex[MAX_NUM_LEADERS];
+ int group_count;
+ char group_name[MAX_NUM_NATION_GROUPS][MAX_LEN_NAME];
};
struct packet_ruleset_city {
Index: data/nation/afghani.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/afghani.ruleset,v
retrieving revision 1.4
diff -u -r1.4 afghani.ruleset
--- data/nation/afghani.ruleset 9 Sep 2004 18:01:42 -0000 1.4
+++ data/nation/afghani.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Afghani")
plural=_("?plural:Afghanis")
-class=_("Modern")
+groups=_("Modern"), _("Asian")
leader="Kanishka", "Mahmud Ghazni", "Timour-i-Lang", "Ahmad Shah",
"Zahir Shah", "Daoud Khan"
leader_sex="Male", "Male", "Male", "Male",
Index: data/nation/american.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/american.ruleset,v
retrieving revision 1.12
diff -u -r1.12 american.ruleset
--- data/nation/american.ruleset 24 Jul 2004 12:26:06 -0000 1.12
+++ data/nation/american.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("American")
plural=_("?plural:Americans")
-class=_("Modern")
+groups=_("Modern"), _("American")
legend=_("Formally named the United States of America. Independent from \
Great Britain after a revolution in 1776-1783AD.")
leader="George Washington",
Index: data/nation/arab.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/arab.ruleset,v
retrieving revision 1.7
diff -u -r1.7 arab.ruleset
--- data/nation/arab.ruleset 24 Jul 2004 12:26:06 -0000 1.7
+++ data/nation/arab.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Arab")
plural=_("?plural:Arabs")
-class=_("Historical")
+groups=_("Ancient"), _("Mediaval")
legend=_("The Arab/Islamic civilization of 622AD-1495AD.")
leader="Mohammad", "Umar", "Harun al-Rashid", "Saladin",
"Al-Mansur", "Al-Hakim"
Index: data/nation/argentine.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/argentine.ruleset,v
retrieving revision 1.12
diff -u -r1.12 argentine.ruleset
--- data/nation/argentine.ruleset 9 Sep 2004 18:01:42 -0000 1.12
+++ data/nation/argentine.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Argentine")
plural=_("?plural:Argentines")
-class=_("Modern")
+groups=_("Modern"), _("American")
legend=_("Argentina is located on the south-eastern coast of South America.")
leader="José de San Martín", "Juan Manuel de Rosas", "Justo Urquiza",
"Bernardino Rivadavia", "Domingo Sarmiento", "Juan Domingo Perón",
Index: data/nation/assyrian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/assyrian.ruleset,v
retrieving revision 1.1
diff -u -r1.1 assyrian.ruleset
--- data/nation/assyrian.ruleset 17 Sep 2004 05:32:41 -0000 1.1
+++ data/nation/assyrian.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Assyrian")
plural=_("?plural:Assyrians")
-class=_("Historical")
+groups=_("Ancient"), _("Asian")
leader="Ashurbanipal", "Tiglat Pileser III", "Ashurnasirpal II", "Shamiram",
"Agha Petros", "Naoum Faik"
leader_sex="Male", "Male", "Male", "Female", "Male", "Male"
Index: data/nation/australian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/australian.ruleset,v
retrieving revision 1.10
diff -u -r1.10 australian.ruleset
--- data/nation/australian.ruleset 24 Jul 2004 12:26:06 -0000 1.10
+++ data/nation/australian.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Australian")
plural=_("?plural:Australians")
-class=_("Modern")
+groups=_("Modern")
legend=_("Australia was founded as a British penal colony in 1788AD. It is \
the only country on earth to occupy an entire continent.")
leader = "Robert Menzies", "Helen Leonard", "John Curtin", "Edna Lyon"
Index: data/nation/austrian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/austrian.ruleset,v
retrieving revision 1.2
diff -u -r1.2 austrian.ruleset
--- data/nation/austrian.ruleset 17 Sep 2004 06:01:37 -0000 1.2
+++ data/nation/austrian.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Austrian")
plural=_("?plural:Austrians")
-class=_("Modern")
+groups=_("Modern"), _("European")
leader="Maria Theresia", "Franz Joseph", "Luitpold"
leader_sex="Female", "Male", "Male"
flag="f.austria"
Index: data/nation/aztec.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/aztec.ruleset,v
retrieving revision 1.9
diff -u -r1.9 aztec.ruleset
--- data/nation/aztec.ruleset 9 Sep 2004 18:01:42 -0000 1.9
+++ data/nation/aztec.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Aztec")
plural=_("?plural:Aztecs")
-class=_("Historical")
+groups=_("Mediaval"), _("American")
legend=_("The Azteca, a group of barbarians from the Sonoran desert, \
seized control of the Toltec-derived civilizations of Central Mexico \
during the 15th century AD, reviving the practice of human sacrifice. \
Index: data/nation/babylonian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/babylonian.ruleset,v
retrieving revision 1.9
diff -u -r1.9 babylonian.ruleset
--- data/nation/babylonian.ruleset 24 Jul 2004 12:26:06 -0000 1.9
+++ data/nation/babylonian.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Babylonian")
plural=_("?plural:Babylonians")
-class=_("Historical")
+groups=_("Ancient"), _("Asian")
legend=_("Babylon was the dominant city of Mesopotamia from the 18th to \
7th centuries BC under a succession of peoples including Amorites, \
Kassites, Assyrians, and Chaldeans.")
Index: data/nation/bavarian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/bavarian.ruleset,v
retrieving revision 1.10
diff -u -r1.10 bavarian.ruleset
--- data/nation/bavarian.ruleset 9 Sep 2004 18:01:42 -0000 1.10
+++ data/nation/bavarian.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Bavarian")
plural=_("?plural:Bavarians")
-class=_("Historical")
+groups= _("European")
legend=_("Bavaria, before national unification in 1870AD, was one of the \
largest of the German kingdoms.")
leader = "Tassilo III", "Welf I", "Ludwig II", "Maximilian", "Adelheid",
Index: data/nation/belgian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/belgian.ruleset,v
retrieving revision 1.4
diff -u -r1.4 belgian.ruleset
--- data/nation/belgian.ruleset 23 Nov 2004 18:10:21 -0000 1.4
+++ data/nation/belgian.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Belgian")
plural=_("?plural:Belgians")
-class=_("Modern")
+groups=_("Modern"), _("European")
legend = _("Belgium gained independance from the Dutch Kingdom in 1830. \
Belgium is mainly characterized by its movement from a unified state \
to a federal one. This is the result of the Flemish and the \
Index: data/nation/boer.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/boer.ruleset,v
retrieving revision 1.11
diff -u -r1.11 boer.ruleset
--- data/nation/boer.ruleset 9 Sep 2004 18:01:42 -0000 1.11
+++ data/nation/boer.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Boer")
plural=_("?plural:Boers")
-class=_("Historical")
+groups= _("African")
legend=_("The Boers were Dutch settlers in British-controlled South \
Africa from 1650AD. They briefly controlled two republics, the \
Transvaal and the Orange Free State, before being defeated by the British \
Index: data/nation/bosnia.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/bosnia.ruleset,v
retrieving revision 1.3
diff -u -r1.3 bosnia.ruleset
--- data/nation/bosnia.ruleset 27 Oct 2004 21:08:22 -0000 1.3
+++ data/nation/bosnia.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Bosnia & Herzegovina")
plural=_("?plural:Bosnians")
-class=_("Modern")
+groups=_("Modern"), _("European")
leader="Kulin Ban", "Ban Stjepan", "Kotromanic", "Tvrtko",
"Stjepan Tvrtko I", "Prijezda I", "Stjepan Tomas",
"Filipovic Nikola", "Avdo Humo", "Seid Maglajlija",
Index: data/nation/brazilian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/brazilian.ruleset,v
retrieving revision 1.13
diff -u -r1.13 brazilian.ruleset
--- data/nation/brazilian.ruleset 9 Sep 2004 18:01:42 -0000 1.13
+++ data/nation/brazilian.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Brazilian")
plural=_("?plural:Brazilians")
-class=_("Modern")
+groups=_("Modern"), _("American")
legend=_("Brazil was founded as a colony of Portugal but became \
independent in 1822AD. It is the only country in the New World that \
has been the seat of a monarchy.")
Index: data/nation/byzantium.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/byzantium.ruleset,v
retrieving revision 1.1
diff -u -r1.1 byzantium.ruleset
--- data/nation/byzantium.ruleset 15 Dec 2004 02:02:51 -0000 1.1
+++ data/nation/byzantium.ruleset 8 Mar 2005 20:48:41 -0000
@@ -3,7 +3,7 @@
name=_("Byzantine")
plural=_("?plural:Byzantines")
-class=_("Historical")
+groups=_("Mediaval")
legend=_("At the time of the decline of the old Roman empire, the Emperor\
Constanine moved the empire's capital to Byzantium and formed a new empire\
mostly known as the Eastern Roman empire or the Byzantine empire. This\
Index: data/nation/canadian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/canadian.ruleset,v
retrieving revision 1.9
diff -u -r1.9 canadian.ruleset
--- data/nation/canadian.ruleset 22 Sep 2004 16:13:53 -0000 1.9
+++ data/nation/canadian.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Canadian")
plural=_("?plural:Canadians")
-class=_("Modern")
+groups=_("Modern"), _("American")
leader="Pierre Trudeau", "John A. MacDonald", "John Diefenbaker", "Mackenzie
King"
leader_sex="Male", "Male", "Male", "Male"
flag="f.canada"
Index: data/nation/carthaginian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/carthaginian.ruleset,v
retrieving revision 1.8
diff -u -r1.8 carthaginian.ruleset
--- data/nation/carthaginian.ruleset 24 Jul 2004 12:26:06 -0000 1.8
+++ data/nation/carthaginian.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Carthaginian")
plural=_("?plural:Carthaginians")
-class=_("Historical")
+groups=_("Ancient"), _("African")
legend=_("The Carthaginians, descendants of Phoenician traders, \
ran a naval empire in the Mediterranean from the 5th to 2nd centuries \
BC. Carthage was destroyed by Rome in 146BC.")
Index: data/nation/catalan.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/catalan.ruleset,v
retrieving revision 1.12
diff -u -r1.12 catalan.ruleset
--- data/nation/catalan.ruleset 9 Sep 2004 18:01:42 -0000 1.12
+++ data/nation/catalan.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Catalan")
plural=_("?plural:Catalans")
-class=_("Historical")
+groups= _("European")
legend=_("Catalunya (aka Catalonia in English) is the north-eastern-most \
coastal region of Spain near the southern foot of the Pyrenees.")
leader="Guifré el Pilós", "Ramon Berenguer IV", "Jaume I", "Pere II",
Index: data/nation/chilean.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/chilean.ruleset,v
retrieving revision 1.14
diff -u -r1.14 chilean.ruleset
--- data/nation/chilean.ruleset 9 Sep 2004 18:01:42 -0000 1.14
+++ data/nation/chilean.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Chilean")
plural=_("?plural:Chileans")
-class=_("Modern")
+groups=_("Modern"), _("American")
legend=_("Chile is located on the south-western coast of South America.")
leader="Pedro de Valdivia", "Bernardo O'Higgins", "José Miguel Carrera",
"Manuel Blanco Encalada", "Diego Portales", "Manuel Montt",
Index: data/nation/chinese.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/chinese.ruleset,v
retrieving revision 1.9
diff -u -r1.9 chinese.ruleset
--- data/nation/chinese.ruleset 18 Oct 2004 16:38:28 -0000 1.9
+++ data/nation/chinese.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Chinese")
plural=_("?plural:Chinese")
-class=_("Modern")
+groups=_("Ancient"), _("Mediaval"), _("Modern"), _("Asian")
legend=_("China is the oldest major civilization that is still in existence \
today, with written records dating back over 3,500 years. After first being \
unified by the Qin dynasty in 221BC, China alternated between periods of \
Index: data/nation/columbian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/columbian.ruleset,v
retrieving revision 1.1
diff -u -r1.1 columbian.ruleset
--- data/nation/columbian.ruleset 17 Sep 2004 05:32:41 -0000 1.1
+++ data/nation/columbian.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Columbian")
plural=_("?plural:Columbians")
-class=_("Modern")
+groups=_("Modern"), _("American")
leader="S. Bolívar", "G.J. Quesada"
leader_sex="Male", "Male"
flag="f.columbia"
Index: data/nation/cornish.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/cornish.ruleset,v
retrieving revision 1.8
diff -u -r1.8 cornish.ruleset
--- data/nation/cornish.ruleset 24 Jul 2004 12:26:06 -0000 1.8
+++ data/nation/cornish.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name = _("Cornish")
plural = _("?plural:Cornish")
-class=_("Historical")
+groups= _("Mediaval"), _("European")
legend=_("Cornwall is a region in the extreme southwest of England, \
traditionally the home of the legendary King Arthur.")
leader = "Arthur", "Jonathen Trelawny", "Thomas Flamank", "Michael Joseph",
Index: data/nation/croatian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/croatian.ruleset,v
retrieving revision 1.8
diff -u -r1.8 croatian.ruleset
--- data/nation/croatian.ruleset 24 Jul 2004 12:26:06 -0000 1.8
+++ data/nation/croatian.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Croatian")
plural=_("?plural:Croatians")
-class=_("Modern")
+groups=_("Modern"), _("European")
legend=_("Croatia is the region of the Southern Slavs that was held by the \
Austro-Hungarian Empire, rather than coming under Ottoman rule after the \
collapse of Byzantium. During most of the 20th century it was part of the \
Index: data/nation/czech.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/czech.ruleset,v
retrieving revision 1.8
diff -u -r1.8 czech.ruleset
--- data/nation/czech.ruleset 17 Jan 2005 18:20:19 -0000 1.8
+++ data/nation/czech.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name = _("Czech")
plural = _("?plural:Czechs")
-class=_("Modern")
+groups=_("Modern"), _("Mediaval"), _("European")
legend=_("Today's Czech Republic was until 1993 part of Czechoslovakia, \
which had been until 1918 part of the Austro-Hungarian Empire.")
leader = "Jan Lucemburský", "Otakar II", "Karel IV", "Václav", "Jiří z
Poděbrad",
Index: data/nation/danish.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/danish.ruleset,v
retrieving revision 1.15
diff -u -r1.15 danish.ruleset
--- data/nation/danish.ruleset 9 Sep 2004 18:01:42 -0000 1.15
+++ data/nation/danish.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Danish")
plural=_("?plural:Danes")
-class=_("Modern")
+groups=_("Modern"), _("Mediaval"), _("European")
; /* TRANS: The third letter in "Blatand" should be */
; /* TRANS: A+00E5 LATIN SMALL LETTER A WITH RING if available in */
; /* TRANS: your charset. In ISO-8859-1 (ISO Latin 1) this is 0xE5. */
Index: data/nation/dunedain.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/dunedain.ruleset,v
retrieving revision 1.11
diff -u -r1.11 dunedain.ruleset
--- data/nation/dunedain.ruleset 9 Sep 2004 18:01:42 -0000 1.11
+++ data/nation/dunedain.ruleset 8 Mar 2005 20:48:41 -0000
@@ -6,7 +6,7 @@
name=_("Dunedain")
plural=_("?plural:Dunedan")
-class=_("Fictional")
+groups=_("Fictional")
legend=_("The Men of the West from J.R.R. Tolkien's Middle Earth fantasies.")
leader="Elros", "Tar-Ancalimë", "Míriel", "Elendil", "Isildur", "Aragorn",
"Tarannon Falastur", "Thorongil", "Ar-Pharazon", "Beruthiel"
Index: data/nation/dutch.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/dutch.ruleset,v
retrieving revision 1.11
diff -u -r1.11 dutch.ruleset
--- data/nation/dutch.ruleset 24 Jul 2004 12:26:06 -0000 1.11
+++ data/nation/dutch.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Dutch")
plural=_("?plural:Dutch")
-class=_("Modern")
+groups=_("Modern"), _("Mediaval"), _("European")
leader="Willem", "Maurits", "Emma", "Wilhelmina", "Juliana", "Beatrix"
leader_sex="Male", "Male", "Female", "Female", "Female", "Female"
flag="f.netherlands"
Index: data/nation/egyptian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/egyptian.ruleset,v
retrieving revision 1.8
diff -u -r1.8 egyptian.ruleset
--- data/nation/egyptian.ruleset 24 Jul 2004 12:26:06 -0000 1.8
+++ data/nation/egyptian.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Egyptian")
plural=_("?plural:Egyptians")
-class=_("Historical")
+groups=_("Ancient"), _("Modern"), _("African")
legend=_("Egypt was the second-oldest of the world's civilizations. Since \
ancient times it has been unusually urbanized, supporting a large population \
on silt deposited by the annual floodings of the Nile.")
Index: data/nation/elvish.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/elvish.ruleset,v
retrieving revision 1.2
diff -u -r1.2 elvish.ruleset
--- data/nation/elvish.ruleset 24 Sep 2004 19:45:43 -0000 1.2
+++ data/nation/elvish.ruleset 8 Mar 2005 20:48:41 -0000
@@ -3,7 +3,7 @@
name=_("Elves")
plural=_("?plural:Elves")
-class=_("Fictional")
+groups=_("Fictional")
; /* <-- avoid gettext warnings
; Starting with the six High Kings of the Noldor, folowed by other kings (some
are not real Kings, but in the Third Age it's close enough :-)
; Elrond COULD have been High King, but never made claim to the Kingship, so I
include him as well (and most people know him)
Index: data/nation/english.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/english.ruleset,v
retrieving revision 1.10
diff -u -r1.10 english.ruleset
--- data/nation/english.ruleset 24 Jul 2004 12:26:06 -0000 1.10
+++ data/nation/english.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("English")
plural=_("?plural:English")
-class=_("Modern")
+groups=_("Modern"), _("Mediaval"), _("European")
legend=_("England was unified by Alfred the Great of Wessex in the late \
9th century AD, only to be conquered by William of Normandy a century later, \
in the last successful invasion of the country.")
Index: data/nation/estonian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/estonian.ruleset,v
retrieving revision 1.9
diff -u -r1.9 estonian.ruleset
--- data/nation/estonian.ruleset 9 Sep 2004 18:01:42 -0000 1.9
+++ data/nation/estonian.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Estonian")
plural=_("?plural:Estonians")
-class=_("Modern")
+groups=_("Modern"), _("European")
legend=_("Estonia is a small country on the south shore of the eastern \
Baltic Sea. Its people and language are closely related to those of \
Finland.")
Index: data/nation/ethiopian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/ethiopian.ruleset,v
retrieving revision 1.3
diff -u -r1.3 ethiopian.ruleset
--- data/nation/ethiopian.ruleset 24 Jul 2004 12:26:06 -0000 1.3
+++ data/nation/ethiopian.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Ethiopian")
plural=_("?plural:Ethiopians")
-class=_("Modern")
+groups=_("Modern"), _("Ancient"), _("African")
leader="Zara Yakob", "Menelik II", "Haile Selassies", "Zoskales", "Gedara",
"Lalibela", "Yekuno Amlak", "Tewodros II"
leader_sex="Male", "Male", "Male", "Male", "Male",
Index: data/nation/filipino.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/filipino.ruleset,v
retrieving revision 1.12
diff -u -r1.12 filipino.ruleset
--- data/nation/filipino.ruleset 24 Jul 2004 12:26:06 -0000 1.12
+++ data/nation/filipino.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Filipino")
plural=_("?plural:Filipinos")
-class=_("Modern")
+groups=_("Modern")
legend=_("After centuries of Spanish rule, the Philippines were ceded to the \
Americans in 1898. They attained home rule in 1935 and independence in 1946.")
leader="Ramon Magsagay","Jose Rizal", "Luis Taruc", "Sergio Osmena",
Index: data/nation/finnish.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/finnish.ruleset,v
retrieving revision 1.10
diff -u -r1.10 finnish.ruleset
--- data/nation/finnish.ruleset 9 Sep 2004 18:01:42 -0000 1.10
+++ data/nation/finnish.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Finnish")
plural=_("?plural:Finns")
-class=_("Modern")
+groups=_("Modern"), _("European")
legend=_("Finland is a small, cold country on the northern fringe of Europe, \
noted for exporting timber, cellular phones, and world-class operating \
systems.")
Index: data/nation/french.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/french.ruleset,v
retrieving revision 1.11
diff -u -r1.11 french.ruleset
--- data/nation/french.ruleset 9 Sep 2004 18:01:42 -0000 1.11
+++ data/nation/french.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("French")
plural=_("?plural:French")
-class=_("Modern")
+groups=_("Modern"), _("Mediaval"), _("European")
leader="Napoleon", "Charlemagne", "Louis XIV", "Charles de Gaulle",
"Vercingetorix", "Chlodwig", "Charles Martel"
leader_sex="Male", "Male", "Male", "Male", "Male", "Male", "Male"
Index: data/nation/galician.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/galician.ruleset,v
retrieving revision 1.2
diff -u -r1.2 galician.ruleset
--- data/nation/galician.ruleset 17 Sep 2004 08:00:57 -0000 1.2
+++ data/nation/galician.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Galician")
plural=_("?plural:Galicians")
-class=_("Historical")
+groups= _("European")
leader="Don Afonso", "Diego Xelmírez", "Hermerico", "Pedro Pardo de Cela",
"Rosalía de Castro", "Don Manuel"
leader_sex="Male", "Male", "Male", "Male",
Index: data/nation/german.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/german.ruleset,v
retrieving revision 1.17
diff -u -r1.17 german.ruleset
--- data/nation/german.ruleset 9 Sep 2004 18:01:42 -0000 1.17
+++ data/nation/german.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name = _("German")
plural = _("?plural:Germans")
-class = _("Modern")
+groups = _("Modern"), _("Mediaval"), _("European")
legend = _("Germany was united in 1871 by the Prussian military \
force. After World War I it became a republic, but fell into \
Index: data/nation/greek.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/greek.ruleset,v
retrieving revision 1.10
diff -u -r1.10 greek.ruleset
--- data/nation/greek.ruleset 24 Jul 2004 12:26:06 -0000 1.10
+++ data/nation/greek.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Greek")
plural=_("?plural:Greeks")
-class=_("Historical")
+groups=_("Ancient"), _("Mediaval"), _("Modern"), _("European")
legend=_("The ancient Greeks, between Mycenae and the Roman conquest.")
leader="Alexander", "Perikles", "Leonidas", "Solon"
leader_sex="Male", "Male", "Male", "Male"
Index: data/nation/hobbits.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/hobbits.ruleset,v
retrieving revision 1.3
diff -u -r1.3 hobbits.ruleset
--- data/nation/hobbits.ruleset 15 Dec 2004 07:18:03 -0000 1.3
+++ data/nation/hobbits.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Hobbit")
plural=_("?plural:Hobbits")
-class=_("Fictional")
+groups=_("Fictional")
; These are pretty arbitrary. Peregrin was Thain of Tookland;
; Meriadoc was Master of Brandybuck; others were mayor of hobbiton.
;
Index: data/nation/hungarian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/hungarian.ruleset,v
retrieving revision 1.9
diff -u -r1.9 hungarian.ruleset
--- data/nation/hungarian.ruleset 9 Sep 2004 18:01:42 -0000 1.9
+++ data/nation/hungarian.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Hungarian")
plural=_("?plural:Hungarians")
-class=_("Modern")
+groups=_("Mediaval"), _("Modern"), _("European")
leader="Árpád", "Szent István", "Károly Róbert",
"Hunyadi Mátyás", "Mária Terézia", "Batthyány"
leader_sex="Male", "Male", "Male", "Male", "Female", "Male"
Index: data/nation/icelandic.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/icelandic.ruleset,v
retrieving revision 1.2
diff -u -r1.2 icelandic.ruleset
--- data/nation/icelandic.ruleset 12 Sep 2004 18:24:09 -0000 1.2
+++ data/nation/icelandic.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Icelandic")
plural=_("?plural:Icelanders")
-class=_("Modern")
+groups=_("Modern")
leader= "Jón Sigurdsson",
"Ingólfur Arnarson",
"Davíð Oddsson",
Index: data/nation/inca.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/inca.ruleset,v
retrieving revision 1.9
diff -u -r1.9 inca.ruleset
--- data/nation/inca.ruleset 24 Jul 2004 12:26:06 -0000 1.9
+++ data/nation/inca.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Inca")
plural=_("?plural:Incas")
-class=_("Historical")
+groups=_("Mediaval"), _("American")
legend=_("The Inca were an Amerind people of the Northern Andes who \
conquered an empire stretching along the west coast of South America \
from what is now southern Chile nearly to the Equator. They had the bad \
Index: data/nation/indian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/indian.ruleset,v
retrieving revision 1.8
diff -u -r1.8 indian.ruleset
--- data/nation/indian.ruleset 24 Jul 2004 12:26:06 -0000 1.8
+++ data/nation/indian.ruleset 8 Mar 2005 20:48:41 -0000
@@ -1,7 +1,7 @@
[nation_indian]
name=_("Indian")
-class=_("Modern")
+groups=_("Ancient"), _("Mediaval"), _("Modern"), _("Asian")
plural=_("?plural:Indians")
leader="Gandhi", "Ashoka", "Chandragupta", "Indira Gandhi"
leader_sex="Male", "Male", "Male", "Female"
Index: data/nation/indonesian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/indonesian.ruleset,v
retrieving revision 1.1
diff -u -r1.1 indonesian.ruleset
--- data/nation/indonesian.ruleset 17 Sep 2004 05:32:41 -0000 1.1
+++ data/nation/indonesian.ruleset 8 Mar 2005 20:48:41 -0000
@@ -2,7 +2,7 @@
name=_("Indonesian")
plural=_("?plural:Indonesians")
-class=_("Modern")
+groups=_("Modern")
leader="Sukarno", "Suharto", "Habibie", "Wahid"
leader_sex="Male", "Male", "Male", "Male"
flag="f.indonesia"
Index: data/nation/irish.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/irish.ruleset,v
retrieving revision 1.11
diff -u -r1.11 irish.ruleset
--- data/nation/irish.ruleset 1 Aug 2004 13:36:52 -0000 1.11
+++ data/nation/irish.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name = _("Irish")
plural = _("?plural:Irish")
-class=_("Modern")
+groups=_("Mediaval"), _("Modern"), _("European")
legend=_("Ireland held out against the Romans and Vikings but was \
conquered by the Normans in 1171. It was ruled by the English until 1922 \
when most of the country was granted limited autonomy, becoming a republic \
Index: data/nation/israeli.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/israeli.ruleset,v
retrieving revision 1.9
diff -u -r1.9 israeli.ruleset
--- data/nation/israeli.ruleset 24 Jul 2004 12:26:06 -0000 1.9
+++ data/nation/israeli.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Israeli")
plural=_("?plural:Israelis")
-class=_("Modern")
+groups=_("Ancient"), _("Modern")
legend=_("The nation of Israel was founded in 1948 as a scattered collection \
of cantons in British Palestine, and has gradually expanded through winning \
a series of wars launched against it in 1948, 1967 and 1973.")
Index: data/nation/italian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/italian.ruleset,v
retrieving revision 1.9
diff -u -r1.9 italian.ruleset
--- data/nation/italian.ruleset 22 Feb 2005 18:31:31 -0000 1.9
+++ data/nation/italian.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name = _("Italian")
plural = _("?plural:Italians")
-class=_("Modern")
+groups=_("Mediaval"), _("Modern"), _("European")
legend=_("The Italian nation was unified in 1870AD after decades of \
campaigning by indigenous nationalists. It was a monarchy under the \
House of Savoy until 1922, then a fascist state until 1945 after which \
Index: data/nation/japanese.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/japanese.ruleset,v
retrieving revision 1.10
diff -u -r1.10 japanese.ruleset
--- data/nation/japanese.ruleset 24 Jul 2004 12:26:06 -0000 1.10
+++ data/nation/japanese.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Japanese")
plural=_("?plural:Japanese")
-class=_("Modern")
+groups=_("Mediaval"), _("Modern"), _("Asian")
leader="Jimmu Tenno", "Mutsuhito", "Hirohito",
"Oda Nobunaga", "Tokugawa Ieyasu"
leader_sex="Male", "Male", "Male", "Male", "Male"
Index: data/nation/kampuchean.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/kampuchean.ruleset,v
retrieving revision 1.2
diff -u -r1.2 kampuchean.ruleset
--- data/nation/kampuchean.ruleset 17 Sep 2004 08:35:14 -0000 1.2
+++ data/nation/kampuchean.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Kampuchean")
plural=_("?plural:Kampucheans")
-class=_("Modern")
+groups=_("Modern"), _("Asian")
leader="Pol Pot", "Norodom Sihanouk", "Hun Sen", "Ang Chan", "Jayavarman"
leader_sex="Male", "Male", "Male", "Male", "Male"
flag="f.kampuchea"
Index: data/nation/kenyan.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/kenyan.ruleset,v
retrieving revision 1.9
diff -u -r1.9 kenyan.ruleset
--- data/nation/kenyan.ruleset 28 Aug 2004 11:46:47 -0000 1.9
+++ data/nation/kenyan.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name = _("Kenyan")
plural = _("?plural:Kenyans")
-class=_("Modern")
+groups=_("Modern"), _("African")
leader = "Kenyatta", "Nabongo", "Wangari Maathai", "Ezekiel Apindi"
leader_sex = "Male", "Male", "Female", "Male"
flag = "f.kenya"
Index: data/nation/korean.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/korean.ruleset,v
retrieving revision 1.8
diff -u -r1.8 korean.ruleset
--- data/nation/korean.ruleset 24 Jul 2004 12:26:06 -0000 1.8
+++ data/nation/korean.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Korean")
plural=_("?plural:Koreans")
-class=_("Modern")
+groups=_("Modern"), _("Mediaval"), _("Asian")
leader="T'aejong", "Kim Ir Sen", "Pak Dzonghyi", "Wang Gon"
leader_sex="Male", "Male", "Male", "Male"
flag="f.korea"
Index: data/nation/latvian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/latvian.ruleset,v
retrieving revision 1.9
diff -u -r1.9 latvian.ruleset
--- data/nation/latvian.ruleset 24 Jul 2004 12:26:06 -0000 1.9
+++ data/nation/latvian.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Latvian")
plural=_("?plural:Latvians")
-class=_("Modern")
+groups=_("Modern"), _("European")
leader="Karlis Ulmanis", "Guntis Ulmanis",
"Vaira Vike Freiberga", "Namejs"
leader_sex="Male", "Male",
Index: data/nation/lithuanian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/lithuanian.ruleset,v
retrieving revision 1.8
diff -u -r1.8 lithuanian.ruleset
--- data/nation/lithuanian.ruleset 24 Jul 2004 12:26:06 -0000 1.8
+++ data/nation/lithuanian.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Lithuanian")
plural=_("?plural:Lithuanians")
-class=_("Modern")
+groups=_("Mediaval"), _("Modern"), _("European")
legend=_("Lithuania is a small country on the south coast of the Baltic \
Sea, northeast of Poland. Lithuanian is the most archaic and complex of \
the northern Indo-European languages")
Index: data/nation/malaysian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/malaysian.ruleset,v
retrieving revision 1.1
diff -u -r1.1 malaysian.ruleset
--- data/nation/malaysian.ruleset 17 Sep 2004 05:32:41 -0000 1.1
+++ data/nation/malaysian.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Malaysian")
plural=_("?plural:Malaysians")
-class=_("Modern")
+groups=_("Modern")
leader="Mahathir", "Anwar Ibrahim"
leader_sex="Male", "Male"
flag="f.malaysia"
Index: data/nation/martian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/martian.ruleset,v
retrieving revision 1.1
diff -u -r1.1 martian.ruleset
--- data/nation/martian.ruleset 17 Sep 2004 05:32:41 -0000 1.1
+++ data/nation/martian.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Martian")
plural=_("?plural:Martians")
-class=_("Fictional")
+groups=_("Fictional")
leader="Ray Bradbury", "Wernher von Braun", "Arthur C. Clarke",
"Isaac Asimov", "Gene Roddenberry"
leader_sex="Male", "Male", "Male", "Male", "Male"
Index: data/nation/mexican.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/mexican.ruleset,v
retrieving revision 1.1
diff -u -r1.1 mexican.ruleset
--- data/nation/mexican.ruleset 17 Sep 2004 05:32:41 -0000 1.1
+++ data/nation/mexican.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Mexican")
plural=_("?plural:Mexicans")
-class=_("Modern")
+groups=_("Modern"), _("American")
leader="B. Juárez", "Cárdenas"
leader_sex="Male", "Male"
flag="f.mexico"
Index: data/nation/mongol.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/mongol.ruleset,v
retrieving revision 1.8
diff -u -r1.8 mongol.ruleset
--- data/nation/mongol.ruleset 24 Jul 2004 12:26:06 -0000 1.8
+++ data/nation/mongol.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Mongol")
plural=_("?plural:Mongols")
-class=_("Historical")
+groups=_("Mediaval"), _("Modern"), _("Asian")
legend=_("In the centuries after their unification by Genghis Khan, the \
Mongols conquered the largest empire in human history, encompassing most \
of the continent of Asia. They became notorious for the utter ruthlessness \
Index: data/nation/mordor.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/mordor.ruleset,v
retrieving revision 1.9
diff -u -r1.9 mordor.ruleset
--- data/nation/mordor.ruleset 9 Sep 2004 18:01:42 -0000 1.9
+++ data/nation/mordor.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Mordor")
plural=_("?plural:Mordors")
-class=_("Fictional")
+groups=_("Fictional")
legend=_("The armies of the Dark Lord Sauron, from J.R.R. Tolkien's \
Middle Earth fantasies.")
leader="Sauron", "Angmar", "Gorthaur", "Melkor"
Index: data/nation/nigerian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/nigerian.ruleset,v
retrieving revision 1.1
diff -u -r1.1 nigerian.ruleset
--- data/nation/nigerian.ruleset 17 Sep 2004 05:32:41 -0000 1.1
+++ data/nation/nigerian.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Nigerian")
plural=_("?plural:Nigerians")
-class=_("Modern")
+groups=_("Modern"), _("African")
leader="Balewa", "Obasanjo"
leader_sex="Male", "Male"
flag="f.nigeria"
Index: data/nation/persian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/persian.ruleset,v
retrieving revision 1.8
diff -u -r1.8 persian.ruleset
--- data/nation/persian.ruleset 24 Jul 2004 12:26:06 -0000 1.8
+++ data/nation/persian.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Persian")
plural=_("?plural:Persians")
-class=_("Historical")
+groups=_("Ancient"), _("Asian")
legend=_("The first Persian (Achaemenid) Empire lasted from 550BC to 330BC; \
the second (Sassanid) from 226AD to 642AD.")
leader="Cyrus", "Darius", "Xerxes", "Ardashir"
Index: data/nation/phoenician.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/phoenician.ruleset,v
retrieving revision 1.1
diff -u -r1.1 phoenician.ruleset
--- data/nation/phoenician.ruleset 20 Sep 2004 15:47:59 -0000 1.1
+++ data/nation/phoenician.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Phoenician")
plural=_("?plural:Phoenicians")
-class=_("Historical")
+groups=_("Ancient")
leader="Hiram", "Agenor", "Eshmunazar", "Kadmos", "Ithobaal",
"Abd'ashtart"
leader_sex="Male", "Male", "Male", "Male", "Male",
Index: data/nation/polish.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/polish.ruleset,v
retrieving revision 1.17
diff -u -r1.17 polish.ruleset
--- data/nation/polish.ruleset 19 Oct 2004 09:21:13 -0000 1.17
+++ data/nation/polish.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Polish")
plural=_("?plural:Polish")
-class=_("Modern")
+groups=_("Mediaval"), _("Modern"), _("European")
leader="Mieszko I",
"Bolesław Chrobry",
"Władysław Łokietek",
Index: data/nation/portuguese.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/portuguese.ruleset,v
retrieving revision 1.10
diff -u -r1.10 portuguese.ruleset
--- data/nation/portuguese.ruleset 9 Sep 2004 18:01:42 -0000 1.10
+++ data/nation/portuguese.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Portuguese")
plural=_("?plural:Portuguese")
-class=_("Modern")
+groups=_("Mediaval"), _("Modern"), _("European")
legend=_("Portugal founded the first of the great mercantile empires \
in the 1400s on the shipbuilding advances funded by Prince Henry the \
Navigator.")
Index: data/nation/quebecois.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/quebecois.ruleset,v
retrieving revision 1.1
diff -u -r1.1 quebecois.ruleset
--- data/nation/quebecois.ruleset 17 Sep 2004 05:32:41 -0000 1.1
+++ data/nation/quebecois.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Quebecois")
plural=_("?plural:Quebecois")
-class=_("Historical")
+groups= _("American")
leader="Champlain", "Frontenac", "Montcalm", "Papineau",
"Rene Levesque"
leader_sex="Male", "Male", "Male", "Male", "Male"
Index: data/nation/roman.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/roman.ruleset,v
retrieving revision 1.13
diff -u -r1.13 roman.ruleset
--- data/nation/roman.ruleset 24 Jul 2004 12:26:06 -0000 1.13
+++ data/nation/roman.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Roman")
plural=_("?plural:Romans")
-class=_("Historical")
+groups=_("Ancient")
legend=_("Rome was, in legend, founded by Romulus in 753 BC. At its\
height, Rome controlled nearly all of Europe, northern Africa and\
Mesopotamia.")
Index: data/nation/russian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/russian.ruleset,v
retrieving revision 1.7
diff -u -r1.7 russian.ruleset
--- data/nation/russian.ruleset 24 Jul 2004 12:26:06 -0000 1.7
+++ data/nation/russian.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Russian")
plural=_("?plural:Russians")
-class=_("Modern")
+groups=_("Mediaval"), _("Modern"), _("European"), _("Asian")
legend=_("Russia originated as the Kievan Rus, territory seized during the \
early medieval period by Vikings from what is now Sweden.")
leader="Catherine II", "Ivan the Terrible", "Stalin", "Peter", "Anne"
Index: data/nation/scottish.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/scottish.ruleset,v
retrieving revision 1.14
diff -u -r1.14 scottish.ruleset
--- data/nation/scottish.ruleset 24 Jul 2004 12:26:06 -0000 1.14
+++ data/nation/scottish.ruleset 8 Mar 2005 20:48:48 -0000
@@ -1,7 +1,7 @@
[nation_scottish]
name=_("Scottish")
plural=_("?plural:Scots")
-class=_("Modern")
+groups=_("Mediaval"), _("Modern"), _("European")
legend=_("Scotland, originally settled in late Roman times by Irish \
raiders who displaced the native Picts, was an independent kingdom from \
around 1034AD to the Union of Crowns with England in 1701.")
Index: data/nation/serbian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/serbian.ruleset,v
retrieving revision 1.8
diff -u -r1.8 serbian.ruleset
--- data/nation/serbian.ruleset 24 Jul 2004 12:26:06 -0000 1.8
+++ data/nation/serbian.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Serbian")
plural=_("?plural:Serbians")
-class=_("Modern")
+groups=_("Modern"), _("European")
legend=_("Serbia is part of the region of the Southern Slavs that was \
conquered by the Ottomans after the collapse of the Byzantine Empire. \
During most of the 20th century it was part of the Yugoslav Federation.")
Index: data/nation/silesian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/silesian.ruleset,v
retrieving revision 1.13
diff -u -r1.13 silesian.ruleset
--- data/nation/silesian.ruleset 9 Feb 2005 09:05:11 -0000 1.13
+++ data/nation/silesian.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Silesian")
plural=_("?plural:Silesians")
-class=_("Historical")
+groups=_("Mediaval"), _("European")
legend=_("Silesia is a region of southern Poland that was at one time an \
independent kingdom.")
leader = "Władysław Wygnaniec",
Index: data/nation/singaporean.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/singaporean.ruleset,v
retrieving revision 1.8
diff -u -r1.8 singaporean.ruleset
--- data/nation/singaporean.ruleset 24 Jul 2004 12:26:06 -0000 1.8
+++ data/nation/singaporean.ruleset 8 Mar 2005 20:48:48 -0000
@@ -14,7 +14,7 @@
name=_("Singaporean")
plural=_("?plural:Singaporeans")
-class=_("Modern")
+groups=_("Modern")
legend=_("Singapore is a mercantile city-state located at the southernmost \
tip of the Malaysian Peninsula")
leader="Tengku Long", "Stamford Raffles", "W.A. Pickering", "Ong Teng Cheong",
Index: data/nation/sioux.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/sioux.ruleset,v
retrieving revision 1.8
diff -u -r1.8 sioux.ruleset
--- data/nation/sioux.ruleset 24 Jul 2004 12:26:06 -0000 1.8
+++ data/nation/sioux.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Sioux")
plural=_("?plural:Sioux")
-class=_("Historical")
+groups=_("Mediaval"), _("American")
leader="Sitting Bull", "Crazy Horse", "Little Crow", "Red Cloud"
leader_sex="Male", "Male", "Male", "Male"
flag="f.cheyenne"
Index: data/nation/slovenian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/slovenian.ruleset,v
retrieving revision 1.7
diff -u -r1.7 slovenian.ruleset
--- data/nation/slovenian.ruleset 24 Jul 2004 12:26:06 -0000 1.7
+++ data/nation/slovenian.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Slovenian")
plural=_("?plural:Slovenians")
-class=_("Modern")
+groups=_("Mediaval"), _("Modern"), _("European")
legend=_("Slovenia was the most western and northern republic of the old \
Yugoslav Federation.")
leader="Valuka", "Valtunk", "Kocelj", "Primoz Trubar"
Index: data/nation/spanish.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/spanish.ruleset,v
retrieving revision 1.10
diff -u -r1.10 spanish.ruleset
--- data/nation/spanish.ruleset 9 Sep 2004 18:01:42 -0000 1.10
+++ data/nation/spanish.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Spanish")
plural=_("?plural:Spanish")
-class=_("Modern")
+groups=_("Mediaval"),_("Modern"),_("European")
legend=_("The modern Spanish nation was formed when the rulers of the \
kingdoms of Castille and Aragon led the recapture of the Iberian peninsula \
from the Moslems. The Reconquista was completed in 1492AD, the same year \
Index: data/nation/sumerian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/sumerian.ruleset,v
retrieving revision 1.1
diff -u -r1.1 sumerian.ruleset
--- data/nation/sumerian.ruleset 17 Sep 2004 05:32:41 -0000 1.1
+++ data/nation/sumerian.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Sumerian")
plural=_("?plural:Sumerians")
-class=_("Historical")
+groups=_("Ancient"), _("Asian")
leader="Gilgamesh", "Lagislazuli", "Urukagina", "Urnammu", "Ibissin"
leader_sex="Male", "Male", "Male", "Male", "Male"
flag = "f.sumeria"
Index: data/nation/swedish.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/swedish.ruleset,v
retrieving revision 1.14
diff -u -r1.14 swedish.ruleset
--- data/nation/swedish.ruleset 9 Sep 2004 18:01:42 -0000 1.14
+++ data/nation/swedish.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Swedish")
plural=_("?plural:Swedes")
-class=_("Modern")
+groups=_("Mediaval"), _("Modern"), _("European")
leader=
"Erik Segergäll", "Olof Skötkonung", "Gustav Vasa", "Erik", "Karl",
Index: data/nation/swiss.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/swiss.ruleset,v
retrieving revision 1.4
diff -u -r1.4 swiss.ruleset
--- data/nation/swiss.ruleset 9 Sep 2004 18:01:42 -0000 1.4
+++ data/nation/swiss.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Swiss")
plural=_("?plural:Swiss")
-class=_("Modern")
+groups=_("Modern"), _("European")
leader= "Wilhelm Tell", "Arnold von Winkelried", "Gessler", "General
Guisan",
"Adolf Ogi", "Ruth Dreifuss", "Moritz Leuenberger",
"Christoph Blocher"
Index: data/nation/taiwanese.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/taiwanese.ruleset,v
retrieving revision 1.3
diff -u -r1.3 taiwanese.ruleset
--- data/nation/taiwanese.ruleset 1 Dec 2004 19:01:38 -0000 1.3
+++ data/nation/taiwanese.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Taiwanese")
plural=_("?plural:Taiwanese")
-class=_("Modern")
+groups=_("Modern"), _("Asian")
leader="Sun Yat Sen", "Chiang Kai Shek", "Lee Teng Hui", "Kung Fu Tse"
leader_sex="Male", "Male", "Male", "Male"
flag="f.taiwan"
Index: data/nation/thai.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/thai.ruleset,v
retrieving revision 1.10
diff -u -r1.10 thai.ruleset
--- data/nation/thai.ruleset 24 Jul 2004 12:26:06 -0000 1.10
+++ data/nation/thai.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Thai")
plural=_("?plural:Thai")
-class=_("Modern")
+groups=_("Modern"), _("Asian")
legend=_("The Thai kingdom was the only country in Southeast Asia to \
preserve its independence throught the colonial era of the 18th and \
19th centuries AD.")
Index: data/nation/turk.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/turk.ruleset,v
retrieving revision 1.9
diff -u -r1.9 turk.ruleset
--- data/nation/turk.ruleset 9 Sep 2004 18:01:42 -0000 1.9
+++ data/nation/turk.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Turk")
plural=_("?plural:Turks")
-class=_("Modern")
+groups=_("Mediaval"), _("Modern"), _("Asian")
legend=_("Modern Turkey is the successor state of the Ottoman Empire, which \
collapsed and was dismembered by the victors in World War I after backing \
the Central Powers. The country was subsequently reformed and secularized \
Index: data/nation/ukrainian.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/ukrainian.ruleset,v
retrieving revision 1.8
diff -u -r1.8 ukrainian.ruleset
--- data/nation/ukrainian.ruleset 24 Jul 2004 12:26:06 -0000 1.8
+++ data/nation/ukrainian.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Ukrainian")
plural=_("?plural:Ukrainians")
-class=_("Modern")
+groups=_("Modern"), _("European")
legend=_("The Ukraine is a vast region on the westernmost marches of the \
former Soviet Union. It includes some of the most fertile black-soil \
cropland on Earth.")
Index: data/nation/venezuelan.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/venezuelan.ruleset,v
retrieving revision 1.1
diff -u -r1.1 venezuelan.ruleset
--- data/nation/venezuelan.ruleset 23 Jan 2005 02:11:09 -0000 1.1
+++ data/nation/venezuelan.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,6 +2,7 @@
name=_("Venezuela")
plural=_("?plural:Venezolanos")
+groups=_("American"), _("Modern")
leader="Ambrosio Alfinger", "El Libertador Simón Bolivar",
"Cristobal Mendoza", "Jose Antonio Páez", "Gral. Juan Vicente Gómez",
"Carlos Andrés Pérez", "Rafael Caldera", "Hugo R. Chávez",
Index: data/nation/vietnamese.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/vietnamese.ruleset,v
retrieving revision 1.7
diff -u -r1.7 vietnamese.ruleset
--- data/nation/vietnamese.ruleset 24 Jul 2004 12:26:06 -0000 1.7
+++ data/nation/vietnamese.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Vietnamese")
plural=_("?plural:Vietnamese")
-class=_("Modern")
+groups=_("Ancient"), _("Modern"), _("Asian")
legend=_("The Vietnamese nation was founded in the first century AD by \
twin sisters who became the war leaders of a revolt against a Chinese \
military governor.")
Index: data/nation/viking.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/viking.ruleset,v
retrieving revision 1.14
diff -u -r1.14 viking.ruleset
--- data/nation/viking.ruleset 9 Sep 2004 18:01:42 -0000 1.14
+++ data/nation/viking.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Viking")
plural=_("?plural:Vikings")
-class=_("Historical")
+groups=_("Mediaval"), _("European")
legend=_("The Vikings raided and traded along the coasts of Europe \
between 800AD and 1100AD. Viking raiders eventually became the rulers of \
Normandy, Russia, and a short-lived kingdom in Sicily.")
Index: data/nation/welsh.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/welsh.ruleset,v
retrieving revision 1.8
diff -u -r1.8 welsh.ruleset
--- data/nation/welsh.ruleset 24 Jul 2004 12:26:06 -0000 1.8
+++ data/nation/welsh.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Welsh")
plural=_("?plural:Welsh")
-class=_("Historical")
+groups= _("Mediaval"), _("European")
legend=_("The Welsh at one time controlled all of what is now England \
until being driven into the mountainous western reaches by invading Saxons.")
leader="Llywelyn ap Gruffudd", "Hywel Dda", "Owain Glyndwr"
Index: data/nation/zulu.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/zulu.ruleset,v
retrieving revision 1.10
diff -u -r1.10 zulu.ruleset
--- data/nation/zulu.ruleset 24 Jul 2004 12:26:06 -0000 1.10
+++ data/nation/zulu.ruleset 8 Mar 2005 20:48:48 -0000
@@ -2,7 +2,7 @@
name=_("Zulu")
plural=_("?plural:Zulus")
-class=_("Historical")
+groups= _("African")
; /*
; According to <http://www.anglo.50megs.com/zulu_kings.htm>, this is the
; complete Zulu king list. It's in regnal order, except that Utshaka
Index: server/ruleset.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/ruleset.c,v
retrieving revision 1.230
diff -u -r1.230 ruleset.c
--- server/ruleset.c 2 Feb 2005 02:44:32 -0000 1.230
+++ server/ruleset.c 8 Mar 2005 20:48:57 -0000
@@ -1978,7 +1978,7 @@
struct government *gov;
int dim, i, j, k, nval;
char temp_name[MAX_LEN_NAME];
- char **leaders, **sec, **civilwar_nations;
+ char **leaders, **sec, **civilwar_nations, **groups;
const char *filename = secfile_filename(file);
(void) check_ruleset_capabilities(file, "+1.9", filename);
@@ -1987,6 +1987,13 @@
for( i=0; i<game.nation_count; i++) {
pl = get_nation_by_idx(i);
+
+ groups = secfile_lookup_str_vec(file, &dim, "%s.groups", sec[i]);
+ pl->num_groups = dim;
+ pl->groups = fc_malloc(sizeof(*(pl->groups)) * dim);
+ for (j = 0; j < dim; j++) {
+ pl->groups[j] = add_new_nation_group(groups[j]);
+ }
/* nation leaders */
@@ -2142,14 +2149,6 @@
pl->city_names = load_city_name_list(file, sec[i], ".cities");
- /* class and legend */
-
- pl->category =
- mystrdup(secfile_lookup_str_default(file, "", "%s.class", sec[i]));
- if (check_strlen(pl->category, MAX_LEN_NAME, "Class '%s' is too long")) {
- pl->category[MAX_LEN_NAME - 1] = '\0';
- }
-
pl->legend =
mystrdup(secfile_lookup_str_default(file, "", "%s.legend", sec[i]));
if (check_strlen(pl->legend, MAX_LEN_MSG, "Legend '%s' is too long")) {
@@ -2910,9 +2909,15 @@
}
packet.city_style = n->city_style;
memcpy(packet.init_techs, n->init_techs, sizeof(packet.init_techs));
- sz_strlcpy(packet.category, n->category);
+
sz_strlcpy(packet.legend, n->legend);
+ /* client needs only the names */
+ packet.group_count = n->num_groups;
+ for (i = 0; i < n->num_groups; i++) {
+ sz_strlcpy(packet.group_name[i], n->groups[i]->name);
+ }
+
lsend_packet_ruleset_nation(dest, &packet);
}
}
Index: server/srv_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/srv_main.c,v
retrieving revision 1.231
diff -u -r1.231 srv_main.c
--- server/srv_main.c 5 Mar 2005 00:06:26 -0000 1.231
+++ server/srv_main.c 8 Mar 2005 20:48:59 -0000
@@ -1234,64 +1234,21 @@
}
/**************************************************************************
- If all players have chosen the same nation class, return
- this class, otherwise return NULL.
-**************************************************************************/
-static char* find_common_class(void)
-{
- char* class = NULL;
- struct nation_type* nation;
-
- players_iterate(pplayer) {
- if (pplayer->nation == NO_NATION_SELECTED) {
- /* still undecided */
- continue;
- }
- nation = get_nation_by_idx(pplayer->nation);
- assert(nation->category != NULL);
- if (class == NULL) {
- /* Set the class. */
- class = nation->category;
- } else if (strcmp(nation->category, class) != 0) {
- /* Multiple classes are already being used. */
- return NULL;
- }
- } players_iterate_end;
-
- return class;
-}
-
-/**************************************************************************
- Select a random available nation. If 'class' is non-NULL, then choose
- a nation from that class if possible.
+ Select a random available nation.
**************************************************************************/
-static Nation_Type_id select_random_nation(const char* class)
+static Nation_Type_id select_random_nation()
{
Nation_Type_id i, available[game.playable_nation_count];
int count = 0;
-
+
/* Determine which nations are available. */
for (i = 0; i < game.playable_nation_count; i++) {
- struct nation_type *nation = get_nation_by_idx(i);
-
- if (nations_available[i]
- && (class == NULL || strcmp(nation->category, class) == 0)) {
+ if (nations_available[i]) {
available[count] = i;
count++;
}
}
-
- /* Handle the case where no nations are possible. */
- if (count == 0) {
- if (class) {
- /* Try other classes. */
- return select_random_nation(NULL);
- }
-
- /* Or else return an invalid value. */
- return NO_NATION_SELECTED;
- }
-
+
/* Then pick one. */
return available[myrand(count)];
}
@@ -1309,10 +1266,6 @@
appropriate number of players (game.aifill - game.nplayers) from
scratch, choosing a random nation and appropriate name for each.
- When we choose a nation randomly we try to consider only nations
- that are in the same class as nations choosen by other players.
- (I.e., if human player decides to play English, AI won't use Mordorians.)
-
If the AI player name is one of the leader names for the AI player's
nation, the player sex is set to the sex for that leader, else it
is chosen randomly. (So if English are ruled by Elisabeth, she is
@@ -1324,12 +1277,10 @@
char player_name[MAX_LEN_NAME];
struct player *pplayer;
int i, old_nplayers;
- char* common_class;
/* Select nations for AI players generated with server
* 'create <name>' command
*/
- common_class = find_common_class();
for (i=0; i<game.nplayers; i++) {
pplayer = &game.players[i];
@@ -1352,7 +1303,7 @@
continue;
}
- nation = select_random_nation(common_class);
+ nation = select_random_nation();
if (nation == NO_NATION_SELECTED) {
freelog(LOG_NORMAL,
_("Ran out of nations. AI controlled player %s not created."),
@@ -1376,13 +1327,6 @@
announce_ai_player(pplayer);
}
- /* We do this again, because user could type:
- * >create Hammurabi
- * >set aifill 5
- * Now we are sure that all AI-players will use historical class
- */
- common_class = find_common_class();
-
/* Create and pick nation and name for AI players needed to bring the
* total number of players to equal game.aifill
*/
@@ -1414,7 +1358,7 @@
}
for(;game.nplayers < game.aifill + i;) {
- nation = select_random_nation(common_class);
+ nation = select_random_nation();
assert(nation != NO_NATION_SELECTED);
mark_nation_as_used(nation);
pick_ai_player_name(nation, player_name);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#9596) Better nation selection,
Mateusz Stefek <=
|
|