diff --git a/ChangeLog b/ChangeLog
index 765666cd..7691b6dd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,22 +1,25 @@
-10/10/2005: v1.9.2
+11/16/2005: v1.9.3
+ - updated German country definition (thanks to Sebastian Vöcking)
+ - added strategies for CPU teams
+ - added option to randomise teams in cups in the startup window
+ (relevant for the World Cup definition, mainly)
+ - added betting
+ - minor bugfixes
+
+
+10/16/2005: v1.9.2
- fixed some minor bugs
- - updated some translations
- - switched to Gnu zip in the Windows port
+ - updated translations
+ - added Spanish and Chinese translations
+ - switched from 'arj' to GNU 'zip' in the Windows port
- added player streaks (hot/cold)
- added definition for the Netherlands (thanks to Zwakstroom)
- added definition for the World Cup 2006 Germany
- minor definition system improvements
- - boost costs money
- - reworked the Brazilian definition, making it more like it is in
- reality
- - added some nice pictures to the progress bar shown when
- calculating results or loading/saving games
- - added search popup to the teams list in the startup window (just
- type a few letters to begin search)
- - added job exchange (including jobs from abroad!)
- - added betting
- - added definition for Greece (thanks to Theodore Dimitriadis)
-
+ - window geometry can be saved
+ - boost and style change 'on the fly' during live games
+ - added season results view (Figures -> Season results)
+ - added command line options
09/10/2005: v1.9.1
- updated German and Dutch translations
diff --git a/bygfoot_misc.glade b/bygfoot_misc.glade
index e2108c43..616f8b7d 100644
--- a/bygfoot_misc.glade
+++ b/bygfoot_misc.glade
@@ -27,6 +27,73 @@
False
0
+
+
+ True
+ False
+ 0
+
+
+
+ True
+ Choose country
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 5
+
+
+ 0
+ False
+ False
+
+
+
+
+
+ True
+
+
+
+ 0
+ True
+ True
+
+
+
+
+ 5
+ False
+ True
+
+
+
+
+
+ True
+ Choose team
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 5
+
+
+ 0
+ False
+ False
+
+
+
True
@@ -80,7 +147,6 @@
True
True
True
-
@@ -110,56 +176,10 @@
-
-
- True
- False
- 0
-
-
-
- True
- Choose country
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 5
-
-
- 0
- False
- False
-
-
-
-
-
- True
-
-
-
- 0
- True
- True
-
-
-
-
- 5
- False
- True
-
-
-
1
- 5
+ 10
True
@@ -172,7 +192,7 @@
True
- Start in
+ Choose league to start in
False
False
GTK_JUSTIFY_LEFT
@@ -214,33 +234,33 @@
+
+
+ True
+ Choose username
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+
+
+ 0
+ False
+ False
+
+
+
True
False
5
-
-
- True
- Username
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
-
-
- 0
- False
- False
-
-
-
True
@@ -261,81 +281,6 @@
True
-
-
-
- True
- True
- GTK_RELIEF_NORMAL
- True
-
-
-
-
- True
- 0.5
- 0.5
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
- True
- False
- 2
-
-
-
- True
- gtk-add
- 4
- 0.5
- 0.5
- 0
- 0
-
-
- 0
- False
- False
-
-
-
-
-
- True
- Add user
- True
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
-
-
- 0
- False
- False
-
-
-
-
-
-
-
-
- 0
- False
- False
-
-
0
@@ -344,6 +289,81 @@
+
+
+ True
+ True
+ GTK_RELIEF_NORMAL
+ True
+
+
+
+
+ True
+ 0.5
+ 0.5
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+ True
+ False
+ 2
+
+
+
+ True
+ gtk-add
+ 4
+ 0.5
+ 0.5
+ 0
+ 0
+
+
+ 0
+ False
+ False
+
+
+
+
+
+ True
+ Add user
+ True
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+
+
+ 0
+ False
+ False
+
+
+
+
+
+
+
+
+ 0
+ False
+ False
+
+
+
1
diff --git a/locale/bg/LC_MESSAGES/bygfoot.mo b/locale/bg/LC_MESSAGES/bygfoot.mo
index 644a4ed8..310afec7 100644
Binary files a/locale/bg/LC_MESSAGES/bygfoot.mo and b/locale/bg/LC_MESSAGES/bygfoot.mo differ
diff --git a/locale/da/LC_MESSAGES/bygfoot.mo b/locale/da/LC_MESSAGES/bygfoot.mo
index 88eb0678..3be8a13a 100644
Binary files a/locale/da/LC_MESSAGES/bygfoot.mo and b/locale/da/LC_MESSAGES/bygfoot.mo differ
diff --git a/locale/de/LC_MESSAGES/bygfoot.mo b/locale/de/LC_MESSAGES/bygfoot.mo
index e2380b6c..741580b3 100644
Binary files a/locale/de/LC_MESSAGES/bygfoot.mo and b/locale/de/LC_MESSAGES/bygfoot.mo differ
diff --git a/locale/es/LC_MESSAGES/bygfoot.mo b/locale/es/LC_MESSAGES/bygfoot.mo
index a49b3bee..d94e1207 100644
Binary files a/locale/es/LC_MESSAGES/bygfoot.mo and b/locale/es/LC_MESSAGES/bygfoot.mo differ
diff --git a/locale/fr/LC_MESSAGES/bygfoot.mo b/locale/fr/LC_MESSAGES/bygfoot.mo
index 9b3cbccf..bab90a7b 100644
Binary files a/locale/fr/LC_MESSAGES/bygfoot.mo and b/locale/fr/LC_MESSAGES/bygfoot.mo differ
diff --git a/locale/nl/LC_MESSAGES/bygfoot.mo b/locale/nl/LC_MESSAGES/bygfoot.mo
index ccdfff37..af635726 100644
Binary files a/locale/nl/LC_MESSAGES/bygfoot.mo and b/locale/nl/LC_MESSAGES/bygfoot.mo differ
diff --git a/locale/pl/LC_MESSAGES/bygfoot.mo b/locale/pl/LC_MESSAGES/bygfoot.mo
index 2fbed26c..0aaeb6c3 100644
Binary files a/locale/pl/LC_MESSAGES/bygfoot.mo and b/locale/pl/LC_MESSAGES/bygfoot.mo differ
diff --git a/locale/ro/LC_MESSAGES/bygfoot.mo b/locale/ro/LC_MESSAGES/bygfoot.mo
index df113fd5..7031fc83 100644
Binary files a/locale/ro/LC_MESSAGES/bygfoot.mo and b/locale/ro/LC_MESSAGES/bygfoot.mo differ
diff --git a/locale/zh/LC_MESSAGES/bygfoot.mo b/locale/zh/LC_MESSAGES/bygfoot.mo
index bfc18bbc..3f7cf65e 100644
Binary files a/locale/zh/LC_MESSAGES/bygfoot.mo and b/locale/zh/LC_MESSAGES/bygfoot.mo differ
diff --git a/src/callback_func.c b/src/callback_func.c
index 33809a5f..ec3994ef 100644
--- a/src/callback_func.c
+++ b/src/callback_func.c
@@ -102,33 +102,6 @@ callback_player_clicked(gint idx, GdkEventButton *event)
return;
if(event->button == 1)
- {
- if(selected_row == -1)
- {
- selected_row = idx;
- return;
- }
-
- player_swap(current_user.tm, selected_row,
- current_user.tm, idx);
- if(opt_user_int("int_opt_user_swap_adapts") == 1 &&
- current_user.tm->structure !=
- team_find_appropriate_structure(current_user.tm))
- {
- team_change_structure(current_user.tm,
- team_find_appropriate_structure(current_user.tm));
- team_rearrange(current_user.tm);
- }
-
- game_gui_write_av_skills();
-
- selected_row = -1;
-
- treeview_show_user_player_list();
- if(stat0 == STATUS_MAIN)
- treeview_show_next_opponent();
- }
- else if(event->button == 3)
{
if(stat0 == STATUS_SHOW_TRANSFER_LIST)
{
@@ -142,10 +115,37 @@ callback_player_clicked(gint idx, GdkEventButton *event)
}
else
{
- selected_row = idx;
- window_show_menu_player((GdkEvent*)event);
+ if(selected_row == -1)
+ {
+ selected_row = idx;
+ return;
+ }
+
+ player_swap(current_user.tm, selected_row,
+ current_user.tm, idx);
+ if(opt_user_int("int_opt_user_swap_adapts") == 1 &&
+ current_user.tm->structure !=
+ team_find_appropriate_structure(current_user.tm))
+ {
+ team_change_structure(current_user.tm,
+ team_find_appropriate_structure(current_user.tm));
+ team_rearrange(current_user.tm);
+ }
+
+ game_gui_write_av_skills();
+
+ selected_row = -1;
+
+ treeview_show_user_player_list();
+ if(stat0 == STATUS_MAIN)
+ treeview_show_next_opponent();
}
}
+ else if(event->button == 3)
+ {
+ selected_row = idx;
+ window_show_menu_player((GdkEvent*)event);
+ }
setsav0;
}
@@ -361,7 +361,8 @@ callback_transfer_list_user(gint button, gint idx)
gchar buf[SMALL],
buf2[SMALL], buf3[SMALL];
- if(button == 3)
+ if(button == 3 ||
+ (button == 1 && trans(idx).offers->len == 0))
{
transfer_remove_player(idx);
on_button_transfers_clicked(NULL, NULL);
@@ -369,10 +370,8 @@ callback_transfer_list_user(gint button, gint idx)
}
else if(button == 1)
{
- if(trans(idx).offers->len == 0)
- game_gui_print_message(_("There are no offers for the player."));
- else if(trans(idx).offers->len > 0 &&
- transoff(idx, 0).status != TRANSFER_OFFER_ACCEPTED)
+ if(trans(idx).offers->len > 0 &&
+ transoff(idx, 0).status != TRANSFER_OFFER_ACCEPTED)
game_gui_print_message(_("There are some offers for the player which you rejected or will see next week."));
else
{
@@ -794,9 +793,10 @@ callback_show_youth_academy(void)
attributes.on_off[PLAYER_LIST_ATTRIBUTE_ETAL] = 1;
if(stat0 != STATUS_SHOW_YA)
- game_gui_print_message(_("Right click to move players to and from the youth academy; left click for context menu."));
+ game_gui_print_message(_("Left click to move players to and from the youth academy; right click for context menu."));
- treeview_show_player_list(GTK_TREE_VIEW(lookup_widget(window.main, "treeview_right")),
- player_get_pointers_from_array(current_user.youth_academy.players),
- attributes, FALSE);
+ treeview_show_player_list(
+ GTK_TREE_VIEW(lookup_widget(window.main, "treeview_right")),
+ player_get_pointers_from_array(current_user.youth_academy.players),
+ attributes, FALSE);
}
diff --git a/src/callbacks.c b/src/callbacks.c
index ce012293..b6dff548 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -176,11 +176,19 @@ on_button_transfers_clicked (GtkButton *button,
game_gui_print_message(_("Transfers are disabled in this country definition."));
else if(week < transfer_get_deadline() || transfer_list->len > 0)
{
- stat0 = STATUS_SHOW_TRANSFER_LIST;
- game_gui_print_message(_("Left click to make an offer. Right click to remove offer."));
- game_gui_print_message_with_delay(_("Transfer deadline is Week %d"), transfer_get_deadline());
- treeview_show_transfer_list(GTK_TREE_VIEW(lookup_widget(window.main, "treeview_right")));
- gtk_notebook_set_current_page(GTK_NOTEBOOK(lookup_widget(window.main, "notebook_player")), 1);
+ if(stat0 != STATUS_SHOW_TRANSFER_LIST)
+ {
+ stat0 = STATUS_SHOW_TRANSFER_LIST;
+ game_gui_print_message(
+ _("Left click to make an offer. Right click to remove offer."));
+ game_gui_print_message_with_delay(
+ _("Transfer deadline is Week %d"), transfer_get_deadline());
+ }
+
+ treeview_show_transfer_list(
+ GTK_TREE_VIEW(lookup_widget(window.main, "treeview_right")));
+ gtk_notebook_set_current_page(
+ GTK_NOTEBOOK(lookup_widget(window.main, "notebook_player")), 1);
gui_set_arrows();
}
@@ -533,7 +541,8 @@ on_menu_move_to_youth_academy_activate (GtkMenuItem *menuitem,
if(pl->age > const_float("float_player_age_lower"))
game_gui_print_message(_("The player is too old for the youth academy."));
else if(current_user.tm->players->len <= 11)
- game_gui_print_message(_("You can't move the player, there are too few players in your team."));
+ game_gui_print_message(
+ _("You can't move the player, there are too few players in your team."));
else if(current_user.youth_academy.players->len ==
const_int("int_youth_academy_max_youths"))
game_gui_print_message(_("There is no room in your youth academy."));
@@ -616,7 +625,8 @@ on_treeview_right_button_press_event (GtkWidget *widget,
{
case STATUS_SHOW_TRANSFER_LIST:
if(trans(idx - 1).tm == current_user.tm ||
- (trans(idx - 1).offers->len > 0 && transoff(idx - 1, 0).status == TRANSFER_OFFER_ACCEPTED) ||
+ (trans(idx - 1).offers->len > 0 &&
+ transoff(idx - 1, 0).status == TRANSFER_OFFER_ACCEPTED) ||
event->button == 1)
callback_transfer_list_clicked(event->button, idx - 1);
else if(event->button == 3)
@@ -624,7 +634,8 @@ on_treeview_right_button_press_event (GtkWidget *widget,
if(transfer_remove_offer(idx - 1, current_user.tm))
game_gui_print_message(_("Your offer has been removed."));
else
- game_gui_print_message(_("You haven't made an offer for the player."));
+ game_gui_print_message(
+ _("You haven't made an offer for the player."));
return TRUE;
}
break;
@@ -639,9 +650,9 @@ on_treeview_right_button_press_event (GtkWidget *widget,
break;
case STATUS_SHOW_YA:
selected_row = idx - 1;
- if(event->button == 3)
+ if(event->button == 1)
on_menu_youth_move_to_team_activate(NULL, NULL);
- else
+ else if(event->button == 3)
window_show_menu_youth((GdkEvent*)event);
break;
case STATUS_SHOW_JOB_EXCHANGE:
diff --git a/src/lg_commentary.c b/src/lg_commentary.c
index 3c9b5c79..0856bca6 100644
--- a/src/lg_commentary.c
+++ b/src/lg_commentary.c
@@ -453,7 +453,8 @@ lg_commentary_set_player_tokens(const LiveGameUnit *unit, const Fixture *fix)
player_get_last_name(pl1->name));
misc_token_add(token_rep,
option_int("string_token_player_goals0", &tokens),
- misc_int_to_char(player_games_goals_get(pl1, fix->clid, PLAYER_VALUE_GOALS)));
+ misc_int_to_char(player_games_goals_get(
+ pl1, fix->clid, PLAYER_VALUE_GOALS)));
misc_token_add(token_rep,
option_int("string_token_player_goals_all0", &tokens),
misc_int_to_char(player_all_games_goals(pl1, PLAYER_VALUE_GOALS)));
diff --git a/src/live_game.c b/src/live_game.c
index 27f38d44..b1a06e24 100644
--- a/src/live_game.c
+++ b/src/live_game.c
@@ -474,8 +474,9 @@ live_game_event_injury(gint team, gint player, gboolean create_new)
last_unit.event.player)->fitness =
MAX(0, player_of_id_team(tms[last_unit.event.team],
last_unit.event.player)->fitness -
- math_rnd(const_float("float_live_game_temp_injury_fitness_decrease_lower"),
- const_float("float_live_game_temp_injury_fitness_decrease_upper")));
+ math_rnd(
+ const_float("float_live_game_temp_injury_fitness_decrease_lower"),
+ const_float("float_live_game_temp_injury_fitness_decrease_upper")));
}
live_game_finish_unit();
@@ -612,7 +613,8 @@ live_game_event_scoring_chance(void)
else
{
last_unit.event.player =
- game_get_player(tms[last_unit.possession], last_unit.area, 0, -1, TRUE);
+ game_get_player(
+ tms[last_unit.possession], last_unit.area, 0, -1, TRUE);
last_unit.event.player2 =
game_get_player(tms[last_unit.possession], last_unit.area, 0,
@@ -708,6 +710,9 @@ live_game_event_general(gboolean create_new)
debug > 130)
printf("\t\tlive_game_event_general\n");
+ if(create_new && stat0 == STATUS_LIVE_GAME_PAUSE)
+ return;
+
if(create_new)
{
new.minute = live_game_get_minute();
diff --git a/src/misc_callbacks.c b/src/misc_callbacks.c
index 767f4a64..3e946244 100644
--- a/src/misc_callbacks.c
+++ b/src/misc_callbacks.c
@@ -70,16 +70,6 @@ on_team_selection_cancel_clicked (GtkButton *button,
main_exit_program(EXIT_OK, NULL);
}
-
-void
-on_team_selection_tv_row_activated (GtkTreeView *treeview,
- GtkTreePath *path,
- GtkTreeViewColumn *column,
- gpointer user_data)
-{
- on_button_add_player_clicked(NULL, NULL);
-}
-
void
on_team_selection_load_clicked (GtkButton *button,
gpointer user_data)
diff --git a/src/misc_callbacks.h b/src/misc_callbacks.h
index 9ce5f5e6..2c8d92b0 100644
--- a/src/misc_callbacks.h
+++ b/src/misc_callbacks.h
@@ -35,11 +35,6 @@ on_team_selection_cancel_clicked (GtkButton *button,
gpointer user_data);
void
-on_team_selection_tv_row_activated (GtkTreeView *treeview,
- GtkTreePath *path,
- GtkTreeViewColumn *column,
- gpointer user_data);
-void
on_team_selection_ok_clicked (GtkButton *button,
gpointer user_data);
@@ -173,7 +168,6 @@ on_button_sponsors_clicked (GtkButton *button,
void
on_button_sponsors_wait_clicked (GtkButton *button,
gpointer user_data);
-#endif
gboolean
on_eventbox_lg_style_button_press_event
@@ -186,3 +180,4 @@ on_eventbox_lg_boost_button_press_event
(GtkWidget *widget,
GdkEventButton *event,
gpointer user_data);
+#endif
diff --git a/src/misc_interface.c b/src/misc_interface.c
index 5e923e25..c2904746 100644
--- a/src/misc_interface.c
+++ b/src/misc_interface.c
@@ -31,21 +31,22 @@ create_window_startup (void)
{
GtkWidget *window_startup;
GtkWidget *vbox2;
+ GtkWidget *vbox34;
+ GtkWidget *label69;
+ GtkWidget *combo_country;
+ GtkWidget *label121;
GtkWidget *hpaned1;
GtkWidget *scrolledwindow10;
GtkWidget *treeview_users;
GtkWidget *scrolledwindow1;
GtkWidget *treeview_startup;
GtkWidget *hseparator10;
- GtkWidget *vbox34;
- GtkWidget *label69;
- GtkWidget *combo_country;
GtkWidget *hseparator11;
GtkWidget *label4;
GtkWidget *comboboxentry_start_league;
GtkWidget *hseparator12;
- GtkWidget *hbox54;
GtkWidget *label75;
+ GtkWidget *hbox54;
GtkWidget *entry_player_name;
GtkWidget *button_add_player;
GtkWidget *alignment19;
@@ -94,6 +95,24 @@ create_window_startup (void)
gtk_widget_show (vbox2);
gtk_container_add (GTK_CONTAINER (window_startup), vbox2);
+ vbox34 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_show (vbox34);
+ gtk_box_pack_start (GTK_BOX (vbox2), vbox34, FALSE, TRUE, 5);
+
+ label69 = gtk_label_new (_("Choose country"));
+ gtk_widget_show (label69);
+ gtk_box_pack_start (GTK_BOX (vbox34), label69, FALSE, FALSE, 0);
+ gtk_misc_set_padding (GTK_MISC (label69), 0, 5);
+
+ combo_country = gtk_combo_box_new_text ();
+ gtk_widget_show (combo_country);
+ gtk_box_pack_start (GTK_BOX (vbox34), combo_country, TRUE, TRUE, 0);
+
+ label121 = gtk_label_new (_("Choose team"));
+ gtk_widget_show (label121);
+ gtk_box_pack_start (GTK_BOX (vbox2), label121, FALSE, FALSE, 0);
+ gtk_misc_set_padding (GTK_MISC (label121), 0, 5);
+
hpaned1 = gtk_hpaned_new ();
gtk_widget_show (hpaned1);
gtk_box_pack_start (GTK_BOX (vbox2), hpaned1, TRUE, TRUE, 0);
@@ -128,25 +147,12 @@ create_window_startup (void)
gtk_box_pack_start (GTK_BOX (vbox2), hseparator10, FALSE, FALSE, 0);
gtk_widget_set_size_request (hseparator10, 1, 5);
- vbox34 = gtk_vbox_new (FALSE, 0);
- gtk_widget_show (vbox34);
- gtk_box_pack_start (GTK_BOX (vbox2), vbox34, FALSE, TRUE, 5);
-
- label69 = gtk_label_new (_("Choose country"));
- gtk_widget_show (label69);
- gtk_box_pack_start (GTK_BOX (vbox34), label69, FALSE, FALSE, 0);
- gtk_misc_set_padding (GTK_MISC (label69), 0, 5);
-
- combo_country = gtk_combo_box_new_text ();
- gtk_widget_show (combo_country);
- gtk_box_pack_start (GTK_BOX (vbox34), combo_country, TRUE, TRUE, 0);
-
hseparator11 = gtk_hseparator_new ();
gtk_widget_show (hseparator11);
gtk_box_pack_start (GTK_BOX (vbox2), hseparator11, FALSE, FALSE, 0);
- gtk_widget_set_size_request (hseparator11, 1, 5);
+ gtk_widget_set_size_request (hseparator11, 1, 10);
- label4 = gtk_label_new (_("Start in"));
+ label4 = gtk_label_new (_("Choose league to start in"));
gtk_widget_show (label4);
gtk_box_pack_start (GTK_BOX (vbox2), label4, FALSE, FALSE, 0);
@@ -159,14 +165,14 @@ create_window_startup (void)
gtk_box_pack_start (GTK_BOX (vbox2), hseparator12, FALSE, FALSE, 0);
gtk_widget_set_size_request (hseparator12, 1, 5);
+ label75 = gtk_label_new (_("Choose username"));
+ gtk_widget_show (label75);
+ gtk_box_pack_start (GTK_BOX (vbox2), label75, FALSE, FALSE, 0);
+
hbox54 = gtk_hbox_new (FALSE, 5);
gtk_widget_show (hbox54);
gtk_box_pack_start (GTK_BOX (vbox2), hbox54, FALSE, TRUE, 0);
- label75 = gtk_label_new (_("Username"));
- gtk_widget_show (label75);
- gtk_box_pack_start (GTK_BOX (hbox54), label75, FALSE, FALSE, 0);
-
entry_player_name = gtk_entry_new ();
gtk_widget_show (entry_player_name);
gtk_box_pack_start (GTK_BOX (hbox54), entry_player_name, TRUE, TRUE, 0);
@@ -175,7 +181,7 @@ create_window_startup (void)
button_add_player = gtk_button_new ();
gtk_widget_show (button_add_player);
- gtk_box_pack_start (GTK_BOX (hbox54), button_add_player, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox2), button_add_player, FALSE, FALSE, 0);
alignment19 = gtk_alignment_new (0.5, 0.5, 0, 0);
gtk_widget_show (alignment19);
@@ -326,15 +332,12 @@ create_window_startup (void)
g_signal_connect ((gpointer) window_startup, "delete_event",
G_CALLBACK (on_team_selection_cancel_clicked),
NULL);
- g_signal_connect ((gpointer) treeview_users, "button_press_event",
- G_CALLBACK (on_treeview_users_button_press_event),
- NULL);
- g_signal_connect ((gpointer) treeview_startup, "row_activated",
- G_CALLBACK (on_team_selection_tv_row_activated),
- NULL);
g_signal_connect ((gpointer) combo_country, "changed",
G_CALLBACK (on_combo_country_changed),
NULL);
+ g_signal_connect ((gpointer) treeview_users, "button_press_event",
+ G_CALLBACK (on_treeview_users_button_press_event),
+ NULL);
g_signal_connect ((gpointer) entry_player_name, "activate",
G_CALLBACK (on_entry_player_name_activate),
NULL);
@@ -357,21 +360,22 @@ create_window_startup (void)
/* Store pointers to all widgets, for use by lookup_widget(). */
GLADE_HOOKUP_OBJECT_NO_REF (window_startup, window_startup, "window_startup");
GLADE_HOOKUP_OBJECT (window_startup, vbox2, "vbox2");
+ GLADE_HOOKUP_OBJECT (window_startup, vbox34, "vbox34");
+ GLADE_HOOKUP_OBJECT (window_startup, label69, "label69");
+ GLADE_HOOKUP_OBJECT (window_startup, combo_country, "combo_country");
+ GLADE_HOOKUP_OBJECT (window_startup, label121, "label121");
GLADE_HOOKUP_OBJECT (window_startup, hpaned1, "hpaned1");
GLADE_HOOKUP_OBJECT (window_startup, scrolledwindow10, "scrolledwindow10");
GLADE_HOOKUP_OBJECT (window_startup, treeview_users, "treeview_users");
GLADE_HOOKUP_OBJECT (window_startup, scrolledwindow1, "scrolledwindow1");
GLADE_HOOKUP_OBJECT (window_startup, treeview_startup, "treeview_startup");
GLADE_HOOKUP_OBJECT (window_startup, hseparator10, "hseparator10");
- GLADE_HOOKUP_OBJECT (window_startup, vbox34, "vbox34");
- GLADE_HOOKUP_OBJECT (window_startup, label69, "label69");
- GLADE_HOOKUP_OBJECT (window_startup, combo_country, "combo_country");
GLADE_HOOKUP_OBJECT (window_startup, hseparator11, "hseparator11");
GLADE_HOOKUP_OBJECT (window_startup, label4, "label4");
GLADE_HOOKUP_OBJECT (window_startup, comboboxentry_start_league, "comboboxentry_start_league");
GLADE_HOOKUP_OBJECT (window_startup, hseparator12, "hseparator12");
- GLADE_HOOKUP_OBJECT (window_startup, hbox54, "hbox54");
GLADE_HOOKUP_OBJECT (window_startup, label75, "label75");
+ GLADE_HOOKUP_OBJECT (window_startup, hbox54, "hbox54");
GLADE_HOOKUP_OBJECT (window_startup, entry_player_name, "entry_player_name");
GLADE_HOOKUP_OBJECT (window_startup, button_add_player, "button_add_player");
GLADE_HOOKUP_OBJECT (window_startup, alignment19, "alignment19");
diff --git a/src/transfer.c b/src/transfer.c
index bc3387bc..3412ad4d 100644
--- a/src/transfer.c
+++ b/src/transfer.c
@@ -108,22 +108,29 @@ transfer_add_cpu_offers(void)
if(team_is_user(trans(i).tm) != -1 &&
trans(i).offers->len == 0 &&
math_rnd(0, 1) < const_float("float_transfer_offer_prob_max") -
- (user_from_team(trans(i).tm)->scout % 10 * const_float("float_transfer_offer_prob_reduce")))
- transfer_add_offer(i, transfer_team_get_new(),
- (gint)rint((gfloat)player_of_id_team(trans(i).tm, trans(i).id)->value *
- (1 + math_rnd(
- scout_factor_bounds[user_from_team(trans(i).tm)->scout % 10][0],
- scout_factor_bounds[user_from_team(trans(i).tm)->scout % 10][1]))),
- -1);
+ (user_from_team(trans(i).tm)->scout % 10 *
+ const_float("float_transfer_offer_prob_reduce")))
+ transfer_add_offer(
+ i, transfer_team_get_new(),
+ math_round_integer(
+ (gint)rint(
+ (gfloat)player_of_id_team(trans(i).tm, trans(i).id)->value *
+ (1 + math_rnd(
+ scout_factor_bounds[user_from_team(trans(i).tm)->scout % 10][0],
+ scout_factor_bounds[user_from_team(trans(i).tm)->scout % 10][1]))), 2),
+ -1);
}
+
/** Return a random team as a potential buyer for a user player. */
Team*
transfer_team_get_new(void)
{
gint rndom;
- GPtrArray *league_teams = team_get_sorted(team_compare_func, TEAM_COMPARE_UNSORTED, FALSE),
- *cup_teams = team_get_sorted(team_compare_func, TEAM_COMPARE_UNSORTED, TRUE);
+ GPtrArray *league_teams = team_get_sorted(team_compare_func,
+ TEAM_COMPARE_UNSORTED, FALSE),
+ *cup_teams = team_get_sorted(team_compare_func,
+ TEAM_COMPARE_UNSORTED, TRUE);
Team *return_value = NULL;
while(return_value == NULL || team_is_user(return_value) != -1)
@@ -206,29 +213,39 @@ transfer_evaluate_offers(void)
{
if(transoff(i, j).status != TRANSFER_OFFER_REJECTED2)
{
- if(player_of_id_team(trans(i).tm, trans(i).id)->value > transoff(i, j).fee &&
- player_of_id_team(trans(i).tm, trans(i).id)->wage > transoff(i, j).wage)
+ if(player_of_id_team(trans(i).tm, trans(i).id)->value >
+ transoff(i, j).fee &&
+ player_of_id_team(trans(i).tm, trans(i).id)->wage >
+ transoff(i, j).wage)
{
- user_event_add(user_from_team(transoff(i, j).tm),
- EVENT_TYPE_TRANSFER_OFFER_REJECTED_FEE_WAGE,
- transoff(i, j).fee, transoff(i, j).wage,
- trans(i).tm, player_of_id_team(trans(i).tm, trans(i).id)->name);
+ user_event_add(
+ user_from_team(transoff(i, j).tm),
+ EVENT_TYPE_TRANSFER_OFFER_REJECTED_FEE_WAGE,
+ transoff(i, j).fee, transoff(i, j).wage,
+ trans(i).tm,
+ player_of_id_team(trans(i).tm, trans(i).id)->name);
transoff(i, j).status = TRANSFER_OFFER_REJECTED;
}
- else if(player_of_id_team(trans(i).tm, trans(i).id)->value > transoff(i, j).fee)
+ else if(player_of_id_team(trans(i).tm, trans(i).id)->value >
+ transoff(i, j).fee)
{
- user_event_add(user_from_team(transoff(i, j).tm),
- EVENT_TYPE_TRANSFER_OFFER_REJECTED_FEE,
- transoff(i, j).fee, transoff(i, j).wage,
- trans(i).tm, player_of_id_team(trans(i).tm, trans(i).id)->name);
+ user_event_add(
+ user_from_team(transoff(i, j).tm),
+ EVENT_TYPE_TRANSFER_OFFER_REJECTED_FEE,
+ transoff(i, j).fee, transoff(i, j).wage,
+ trans(i).tm,
+ player_of_id_team(trans(i).tm, trans(i).id)->name);
transoff(i, j).status = TRANSFER_OFFER_REJECTED;
}
- else if(player_of_id_team(trans(i).tm, trans(i).id)->wage > transoff(i, j).wage)
+ else if(player_of_id_team(trans(i).tm, trans(i).id)->wage >
+ transoff(i, j).wage)
{
- user_event_add(user_from_team(transoff(i, j).tm),
- EVENT_TYPE_TRANSFER_OFFER_REJECTED_WAGE,
- transoff(i, j).fee, transoff(i, j).wage,
- trans(i).tm, player_of_id_team(trans(i).tm, trans(i).id)->name);
+ user_event_add(
+ user_from_team(transoff(i, j).tm),
+ EVENT_TYPE_TRANSFER_OFFER_REJECTED_WAGE,
+ transoff(i, j).fee, transoff(i, j).wage,
+ trans(i).tm,
+ player_of_id_team(trans(i).tm, trans(i).id)->name);
transoff(i, j).status = TRANSFER_OFFER_REJECTED;
}
else
@@ -257,11 +274,12 @@ transfer_add_new_players(void)
const_int("int_transfer_max_players") - transfer_list->len);
for(i=0;ivalue * (1 + deviance_value));
- new.wage[i] = (gint)rint((gfloat)pl->wage * (1 + deviance_wage));
+ deviance_value =
+ math_rnd(-(i + 1) * const_float("float_transfer_scout_deviance_value"),
+ (i + 1) * const_float("float_transfer_scout_deviance_value"));
+ deviance_wage =
+ math_rnd(-(i + 1) * const_float("float_transfer_scout_deviance_wage"),
+ (i + 1) * const_float("float_transfer_scout_deviance_wage"));
+ new.fee[i] = math_round_integer(
+ (gint)rint((gfloat)pl->value * (1 + deviance_value)), 2);
+ new.wage[i] = math_round_integer(
+ (gint)rint((gfloat)pl->wage * (1 + deviance_wage)), 2);
}
g_array_append_val(transfer_list, new);
@@ -453,13 +475,15 @@ transfer_add_remove_user_player(Player *pl)
{
if(week < transfer_get_deadline())
{
- transfer_add_player(pl,
- (gint)rint(((gfloat)const_int("int_transfer_time_lower") +
- (gfloat)const_int("int_transfer_time_upper")) / 2));
- game_gui_print_message(_("%s has been added to the transfer list for %d weeks."),
- pl->name,
- (gint)rint(((gfloat)const_int("int_transfer_time_lower") +
- (gfloat)const_int("int_transfer_time_upper")) / 2));
+ transfer_add_player(
+ pl,
+ (gint)rint(((gfloat)const_int("int_transfer_time_lower") +
+ (gfloat)const_int("int_transfer_time_upper")) / 2));
+ game_gui_print_message(
+ _("%s has been added to the transfer list for %d weeks."),
+ pl->name,
+ (gint)rint(((gfloat)const_int("int_transfer_time_lower") +
+ (gfloat)const_int("int_transfer_time_upper")) / 2));
}
else
{
diff --git a/src/treeview_helper.c b/src/treeview_helper.c
index 6529bcd2..01c139bd 100644
--- a/src/treeview_helper.c
+++ b/src/treeview_helper.c
@@ -703,7 +703,10 @@ treeview_helper_team_selection(GtkTreeViewColumn *col,
g_object_set(renderer, "text", ((Team*)team_pointer)->name, NULL);
else if(column == 4)
{
- sprintf(buf, "%.1f", team_get_average_skill((Team*)team_pointer, FALSE));
+ if(stat0 == STATUS_TEAM_SELECTION)
+ strcpy(buf, "");
+ else
+ sprintf(buf, "%.1f", team_get_average_skill((Team*)team_pointer, FALSE));
g_object_set(renderer, "text", buf, NULL);
}
else
diff --git a/src/user.c b/src/user.c
index c1625ebe..6f151eaa 100644
--- a/src/user.c
+++ b/src/user.c
@@ -633,8 +633,8 @@ user_history_add(User *user, gint type, const gchar *team_name,
g_array_index(user->history, UserHistory, i).season == season &&
strcmp(g_array_index(user->history, UserHistory, i).team_name,
team_name) == 0 &&
- strcmp(g_array_index(user->history, UserHistory, i).string[1],
- string1) == 0)
+ strcmp(g_array_index(user->history, UserHistory, i).string[0],
+ string0) == 0)
{
/** Same cup round. */
if(strcmp(g_array_index(user->history, UserHistory, i).string[2],
@@ -663,6 +663,8 @@ user_history_add(User *user, gint type, const gchar *team_name,
{
if(string0 != NULL)
misc_string_assign(&his->string[0], string0);
+ if(string1 != NULL)
+ misc_string_assign(&his->string[1], string1);
if(string2 != NULL)
misc_string_assign(&his->string[2], string2);
g_array_sort(user->history, (GCompareFunc)user_history_compare);
diff --git a/support_files/bygfoot_help b/support_files/bygfoot_help
index c14192f4..e6f97b32 100644
--- a/support_files/bygfoot_help
+++ b/support_files/bygfoot_help
@@ -27,8 +27,8 @@ string_contrib_entry Cristian Spoiala (Romania)
string_contrib_entry Sebastian Vöcking (Germany)
string_contrib_title Translations
-string_contrib_entry Alexandre Beraud (French)
-string_contrib_entry Győző Both (German)
+string_contrib_entry Alexandre Beraud, Arnaud Le Rouzic (French)
+string_contrib_entry Győző Both, Michael Trent (German)
string_contrib_entry Tobe & Arne Deprez (Dutch)
string_contrib_entry Marcelo Garrone, Carlos Garces (Spanish)
string_contrib_entry Kristian Poul Herkild (Danish)