mirror of
https://github.com/tstellar/bygfoot.git
synced 2025-01-31 07:54:50 +01:00
"Minor usability improvements."
This commit is contained in:
parent
fc18c0410e
commit
33c14b056f
31
ChangeLog
31
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
|
- fixed some minor bugs
|
||||||
- updated some translations
|
- updated translations
|
||||||
- switched to Gnu zip in the Windows port
|
- added Spanish and Chinese translations
|
||||||
|
- switched from 'arj' to GNU 'zip' in the Windows port
|
||||||
- added player streaks (hot/cold)
|
- added player streaks (hot/cold)
|
||||||
- added definition for the Netherlands (thanks to Zwakstroom)
|
- added definition for the Netherlands (thanks to Zwakstroom)
|
||||||
- added definition for the World Cup 2006 Germany
|
- added definition for the World Cup 2006 Germany
|
||||||
- minor definition system improvements
|
- minor definition system improvements
|
||||||
- boost costs money
|
- window geometry can be saved
|
||||||
- reworked the Brazilian definition, making it more like it is in
|
- boost and style change 'on the fly' during live games
|
||||||
reality
|
- added season results view (Figures -> Season results)
|
||||||
- added some nice pictures to the progress bar shown when
|
- added command line options
|
||||||
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)
|
|
||||||
|
|
||||||
|
|
||||||
09/10/2005: v1.9.1
|
09/10/2005: v1.9.1
|
||||||
- updated German and Dutch translations
|
- updated German and Dutch translations
|
||||||
|
@ -27,6 +27,73 @@
|
|||||||
<property name="homogeneous">False</property>
|
<property name="homogeneous">False</property>
|
||||||
<property name="spacing">0</property>
|
<property name="spacing">0</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkVBox" id="vbox34">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
<property name="spacing">0</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label69">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Choose country</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">5</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkComboBox" id="combo_country">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<signal name="changed" handler="on_combo_country_changed" last_modification_time="Sun, 21 Aug 2005 14:08:15 GMT"/>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">5</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label121">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Choose team</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">5</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkHPaned" id="hpaned1">
|
<widget class="GtkHPaned" id="hpaned1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@ -80,7 +147,6 @@
|
|||||||
<property name="rules_hint">True</property>
|
<property name="rules_hint">True</property>
|
||||||
<property name="reorderable">True</property>
|
<property name="reorderable">True</property>
|
||||||
<property name="enable_search">True</property>
|
<property name="enable_search">True</property>
|
||||||
<signal name="row_activated" handler="on_team_selection_tv_row_activated" last_modification_time="Tue, 27 Jan 2004 12:32:13 GMT"/>
|
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
@ -110,56 +176,10 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkVBox" id="vbox34">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="homogeneous">False</property>
|
|
||||||
<property name="spacing">0</property>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkLabel" id="label69">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">Choose country</property>
|
|
||||||
<property name="use_underline">False</property>
|
|
||||||
<property name="use_markup">False</property>
|
|
||||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
|
||||||
<property name="wrap">False</property>
|
|
||||||
<property name="selectable">False</property>
|
|
||||||
<property name="xalign">0.5</property>
|
|
||||||
<property name="yalign">0.5</property>
|
|
||||||
<property name="xpad">0</property>
|
|
||||||
<property name="ypad">5</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="padding">0</property>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkComboBox" id="combo_country">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<signal name="changed" handler="on_combo_country_changed" last_modification_time="Sun, 21 Aug 2005 14:08:15 GMT"/>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="padding">0</property>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="padding">5</property>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkHSeparator" id="hseparator11">
|
<widget class="GtkHSeparator" id="hseparator11">
|
||||||
<property name="width_request">1</property>
|
<property name="width_request">1</property>
|
||||||
<property name="height_request">5</property>
|
<property name="height_request">10</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
@ -172,7 +192,7 @@
|
|||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="label4">
|
<widget class="GtkLabel" id="label4">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Start in</property>
|
<property name="label" translatable="yes">Choose league to start in</property>
|
||||||
<property name="use_underline">False</property>
|
<property name="use_underline">False</property>
|
||||||
<property name="use_markup">False</property>
|
<property name="use_markup">False</property>
|
||||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
@ -214,16 +234,10 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkHBox" id="hbox54">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="homogeneous">False</property>
|
|
||||||
<property name="spacing">5</property>
|
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="label75">
|
<widget class="GtkLabel" id="label75">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Username</property>
|
<property name="label" translatable="yes">Choose username</property>
|
||||||
<property name="use_underline">False</property>
|
<property name="use_underline">False</property>
|
||||||
<property name="use_markup">False</property>
|
<property name="use_markup">False</property>
|
||||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
@ -241,6 +255,12 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkHBox" id="hbox54">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkEntry" id="entry_player_name">
|
<widget class="GtkEntry" id="entry_player_name">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@ -261,6 +281,13 @@
|
|||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkButton" id="button_add_player">
|
<widget class="GtkButton" id="button_add_player">
|
||||||
@ -336,13 +363,6 @@
|
|||||||
<property name="fill">False</property>
|
<property name="fill">False</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="padding">0</property>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkHSeparator" id="hseparator13">
|
<widget class="GtkHSeparator" id="hseparator13">
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -102,6 +102,18 @@ callback_player_clicked(gint idx, GdkEventButton *event)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if(event->button == 1)
|
if(event->button == 1)
|
||||||
|
{
|
||||||
|
if(stat0 == STATUS_SHOW_TRANSFER_LIST)
|
||||||
|
{
|
||||||
|
selected_row = -1;
|
||||||
|
transfer_add_remove_user_player(player_of_idx_team(current_user.tm, idx));
|
||||||
|
}
|
||||||
|
else if(stat0 == STATUS_SHOW_YA)
|
||||||
|
{
|
||||||
|
selected_row = idx;
|
||||||
|
on_menu_move_to_youth_academy_activate(NULL, NULL);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if(selected_row == -1)
|
if(selected_row == -1)
|
||||||
{
|
{
|
||||||
@ -128,24 +140,12 @@ callback_player_clicked(gint idx, GdkEventButton *event)
|
|||||||
if(stat0 == STATUS_MAIN)
|
if(stat0 == STATUS_MAIN)
|
||||||
treeview_show_next_opponent();
|
treeview_show_next_opponent();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if(event->button == 3)
|
else if(event->button == 3)
|
||||||
{
|
|
||||||
if(stat0 == STATUS_SHOW_TRANSFER_LIST)
|
|
||||||
{
|
|
||||||
selected_row = -1;
|
|
||||||
transfer_add_remove_user_player(player_of_idx_team(current_user.tm, idx));
|
|
||||||
}
|
|
||||||
else if(stat0 == STATUS_SHOW_YA)
|
|
||||||
{
|
|
||||||
selected_row = idx;
|
|
||||||
on_menu_move_to_youth_academy_activate(NULL, NULL);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
selected_row = idx;
|
selected_row = idx;
|
||||||
window_show_menu_player((GdkEvent*)event);
|
window_show_menu_player((GdkEvent*)event);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
setsav0;
|
setsav0;
|
||||||
}
|
}
|
||||||
@ -361,7 +361,8 @@ callback_transfer_list_user(gint button, gint idx)
|
|||||||
gchar buf[SMALL],
|
gchar buf[SMALL],
|
||||||
buf2[SMALL], buf3[SMALL];
|
buf2[SMALL], buf3[SMALL];
|
||||||
|
|
||||||
if(button == 3)
|
if(button == 3 ||
|
||||||
|
(button == 1 && trans(idx).offers->len == 0))
|
||||||
{
|
{
|
||||||
transfer_remove_player(idx);
|
transfer_remove_player(idx);
|
||||||
on_button_transfers_clicked(NULL, NULL);
|
on_button_transfers_clicked(NULL, NULL);
|
||||||
@ -369,9 +370,7 @@ callback_transfer_list_user(gint button, gint idx)
|
|||||||
}
|
}
|
||||||
else if(button == 1)
|
else if(button == 1)
|
||||||
{
|
{
|
||||||
if(trans(idx).offers->len == 0)
|
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)
|
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."));
|
game_gui_print_message(_("There are some offers for the player which you rejected or will see next week."));
|
||||||
else
|
else
|
||||||
@ -794,9 +793,10 @@ callback_show_youth_academy(void)
|
|||||||
attributes.on_off[PLAYER_LIST_ATTRIBUTE_ETAL] = 1;
|
attributes.on_off[PLAYER_LIST_ATTRIBUTE_ETAL] = 1;
|
||||||
|
|
||||||
if(stat0 != STATUS_SHOW_YA)
|
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")),
|
treeview_show_player_list(
|
||||||
|
GTK_TREE_VIEW(lookup_widget(window.main, "treeview_right")),
|
||||||
player_get_pointers_from_array(current_user.youth_academy.players),
|
player_get_pointers_from_array(current_user.youth_academy.players),
|
||||||
attributes, FALSE);
|
attributes, FALSE);
|
||||||
}
|
}
|
||||||
|
@ -175,12 +175,20 @@ on_button_transfers_clicked (GtkButton *button,
|
|||||||
if(sett_int("int_opt_disable_transfers"))
|
if(sett_int("int_opt_disable_transfers"))
|
||||||
game_gui_print_message(_("Transfers are disabled in this country definition."));
|
game_gui_print_message(_("Transfers are disabled in this country definition."));
|
||||||
else if(week < transfer_get_deadline() || transfer_list->len > 0)
|
else if(week < transfer_get_deadline() || transfer_list->len > 0)
|
||||||
|
{
|
||||||
|
if(stat0 != STATUS_SHOW_TRANSFER_LIST)
|
||||||
{
|
{
|
||||||
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(
|
||||||
game_gui_print_message_with_delay(_("Transfer deadline is Week %d"), transfer_get_deadline());
|
_("Left click to make an offer. Right click to remove offer."));
|
||||||
treeview_show_transfer_list(GTK_TREE_VIEW(lookup_widget(window.main, "treeview_right")));
|
game_gui_print_message_with_delay(
|
||||||
gtk_notebook_set_current_page(GTK_NOTEBOOK(lookup_widget(window.main, "notebook_player")), 1);
|
_("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();
|
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"))
|
if(pl->age > const_float("float_player_age_lower"))
|
||||||
game_gui_print_message(_("The player is too old for the youth academy."));
|
game_gui_print_message(_("The player is too old for the youth academy."));
|
||||||
else if(current_user.tm->players->len <= 11)
|
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 ==
|
else if(current_user.youth_academy.players->len ==
|
||||||
const_int("int_youth_academy_max_youths"))
|
const_int("int_youth_academy_max_youths"))
|
||||||
game_gui_print_message(_("There is no room in your youth academy."));
|
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:
|
case STATUS_SHOW_TRANSFER_LIST:
|
||||||
if(trans(idx - 1).tm == current_user.tm ||
|
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)
|
event->button == 1)
|
||||||
callback_transfer_list_clicked(event->button, idx - 1);
|
callback_transfer_list_clicked(event->button, idx - 1);
|
||||||
else if(event->button == 3)
|
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))
|
if(transfer_remove_offer(idx - 1, current_user.tm))
|
||||||
game_gui_print_message(_("Your offer has been removed."));
|
game_gui_print_message(_("Your offer has been removed."));
|
||||||
else
|
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;
|
return TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -639,9 +650,9 @@ on_treeview_right_button_press_event (GtkWidget *widget,
|
|||||||
break;
|
break;
|
||||||
case STATUS_SHOW_YA:
|
case STATUS_SHOW_YA:
|
||||||
selected_row = idx - 1;
|
selected_row = idx - 1;
|
||||||
if(event->button == 3)
|
if(event->button == 1)
|
||||||
on_menu_youth_move_to_team_activate(NULL, NULL);
|
on_menu_youth_move_to_team_activate(NULL, NULL);
|
||||||
else
|
else if(event->button == 3)
|
||||||
window_show_menu_youth((GdkEvent*)event);
|
window_show_menu_youth((GdkEvent*)event);
|
||||||
break;
|
break;
|
||||||
case STATUS_SHOW_JOB_EXCHANGE:
|
case STATUS_SHOW_JOB_EXCHANGE:
|
||||||
|
@ -453,7 +453,8 @@ lg_commentary_set_player_tokens(const LiveGameUnit *unit, const Fixture *fix)
|
|||||||
player_get_last_name(pl1->name));
|
player_get_last_name(pl1->name));
|
||||||
misc_token_add(token_rep,
|
misc_token_add(token_rep,
|
||||||
option_int("string_token_player_goals0", &tokens),
|
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,
|
misc_token_add(token_rep,
|
||||||
option_int("string_token_player_goals_all0", &tokens),
|
option_int("string_token_player_goals_all0", &tokens),
|
||||||
misc_int_to_char(player_all_games_goals(pl1, PLAYER_VALUE_GOALS)));
|
misc_int_to_char(player_all_games_goals(pl1, PLAYER_VALUE_GOALS)));
|
||||||
|
@ -474,7 +474,8 @@ live_game_event_injury(gint team, gint player, gboolean create_new)
|
|||||||
last_unit.event.player)->fitness =
|
last_unit.event.player)->fitness =
|
||||||
MAX(0, player_of_id_team(tms[last_unit.event.team],
|
MAX(0, player_of_id_team(tms[last_unit.event.team],
|
||||||
last_unit.event.player)->fitness -
|
last_unit.event.player)->fitness -
|
||||||
math_rnd(const_float("float_live_game_temp_injury_fitness_decrease_lower"),
|
math_rnd(
|
||||||
|
const_float("float_live_game_temp_injury_fitness_decrease_lower"),
|
||||||
const_float("float_live_game_temp_injury_fitness_decrease_upper")));
|
const_float("float_live_game_temp_injury_fitness_decrease_upper")));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -612,7 +613,8 @@ live_game_event_scoring_chance(void)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
last_unit.event.player =
|
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 =
|
last_unit.event.player2 =
|
||||||
game_get_player(tms[last_unit.possession], last_unit.area, 0,
|
game_get_player(tms[last_unit.possession], last_unit.area, 0,
|
||||||
@ -708,6 +710,9 @@ live_game_event_general(gboolean create_new)
|
|||||||
debug > 130)
|
debug > 130)
|
||||||
printf("\t\tlive_game_event_general\n");
|
printf("\t\tlive_game_event_general\n");
|
||||||
|
|
||||||
|
if(create_new && stat0 == STATUS_LIVE_GAME_PAUSE)
|
||||||
|
return;
|
||||||
|
|
||||||
if(create_new)
|
if(create_new)
|
||||||
{
|
{
|
||||||
new.minute = live_game_get_minute();
|
new.minute = live_game_get_minute();
|
||||||
|
@ -70,16 +70,6 @@ on_team_selection_cancel_clicked (GtkButton *button,
|
|||||||
main_exit_program(EXIT_OK, NULL);
|
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
|
void
|
||||||
on_team_selection_load_clicked (GtkButton *button,
|
on_team_selection_load_clicked (GtkButton *button,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
|
@ -35,11 +35,6 @@ on_team_selection_cancel_clicked (GtkButton *button,
|
|||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
void
|
void
|
||||||
on_team_selection_tv_row_activated (GtkTreeView *treeview,
|
|
||||||
GtkTreePath *path,
|
|
||||||
GtkTreeViewColumn *column,
|
|
||||||
gpointer user_data);
|
|
||||||
void
|
|
||||||
on_team_selection_ok_clicked (GtkButton *button,
|
on_team_selection_ok_clicked (GtkButton *button,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
@ -173,7 +168,6 @@ on_button_sponsors_clicked (GtkButton *button,
|
|||||||
void
|
void
|
||||||
on_button_sponsors_wait_clicked (GtkButton *button,
|
on_button_sponsors_wait_clicked (GtkButton *button,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
#endif
|
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
on_eventbox_lg_style_button_press_event
|
on_eventbox_lg_style_button_press_event
|
||||||
@ -186,3 +180,4 @@ on_eventbox_lg_boost_button_press_event
|
|||||||
(GtkWidget *widget,
|
(GtkWidget *widget,
|
||||||
GdkEventButton *event,
|
GdkEventButton *event,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
#endif
|
||||||
|
@ -31,21 +31,22 @@ create_window_startup (void)
|
|||||||
{
|
{
|
||||||
GtkWidget *window_startup;
|
GtkWidget *window_startup;
|
||||||
GtkWidget *vbox2;
|
GtkWidget *vbox2;
|
||||||
|
GtkWidget *vbox34;
|
||||||
|
GtkWidget *label69;
|
||||||
|
GtkWidget *combo_country;
|
||||||
|
GtkWidget *label121;
|
||||||
GtkWidget *hpaned1;
|
GtkWidget *hpaned1;
|
||||||
GtkWidget *scrolledwindow10;
|
GtkWidget *scrolledwindow10;
|
||||||
GtkWidget *treeview_users;
|
GtkWidget *treeview_users;
|
||||||
GtkWidget *scrolledwindow1;
|
GtkWidget *scrolledwindow1;
|
||||||
GtkWidget *treeview_startup;
|
GtkWidget *treeview_startup;
|
||||||
GtkWidget *hseparator10;
|
GtkWidget *hseparator10;
|
||||||
GtkWidget *vbox34;
|
|
||||||
GtkWidget *label69;
|
|
||||||
GtkWidget *combo_country;
|
|
||||||
GtkWidget *hseparator11;
|
GtkWidget *hseparator11;
|
||||||
GtkWidget *label4;
|
GtkWidget *label4;
|
||||||
GtkWidget *comboboxentry_start_league;
|
GtkWidget *comboboxentry_start_league;
|
||||||
GtkWidget *hseparator12;
|
GtkWidget *hseparator12;
|
||||||
GtkWidget *hbox54;
|
|
||||||
GtkWidget *label75;
|
GtkWidget *label75;
|
||||||
|
GtkWidget *hbox54;
|
||||||
GtkWidget *entry_player_name;
|
GtkWidget *entry_player_name;
|
||||||
GtkWidget *button_add_player;
|
GtkWidget *button_add_player;
|
||||||
GtkWidget *alignment19;
|
GtkWidget *alignment19;
|
||||||
@ -94,6 +95,24 @@ create_window_startup (void)
|
|||||||
gtk_widget_show (vbox2);
|
gtk_widget_show (vbox2);
|
||||||
gtk_container_add (GTK_CONTAINER (window_startup), 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 ();
|
hpaned1 = gtk_hpaned_new ();
|
||||||
gtk_widget_show (hpaned1);
|
gtk_widget_show (hpaned1);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox2), hpaned1, TRUE, TRUE, 0);
|
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_box_pack_start (GTK_BOX (vbox2), hseparator10, FALSE, FALSE, 0);
|
||||||
gtk_widget_set_size_request (hseparator10, 1, 5);
|
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 ();
|
hseparator11 = gtk_hseparator_new ();
|
||||||
gtk_widget_show (hseparator11);
|
gtk_widget_show (hseparator11);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox2), hseparator11, FALSE, FALSE, 0);
|
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_widget_show (label4);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox2), label4, FALSE, FALSE, 0);
|
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_box_pack_start (GTK_BOX (vbox2), hseparator12, FALSE, FALSE, 0);
|
||||||
gtk_widget_set_size_request (hseparator12, 1, 5);
|
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);
|
hbox54 = gtk_hbox_new (FALSE, 5);
|
||||||
gtk_widget_show (hbox54);
|
gtk_widget_show (hbox54);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox2), hbox54, FALSE, TRUE, 0);
|
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 ();
|
entry_player_name = gtk_entry_new ();
|
||||||
gtk_widget_show (entry_player_name);
|
gtk_widget_show (entry_player_name);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox54), entry_player_name, TRUE, TRUE, 0);
|
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 ();
|
button_add_player = gtk_button_new ();
|
||||||
gtk_widget_show (button_add_player);
|
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);
|
alignment19 = gtk_alignment_new (0.5, 0.5, 0, 0);
|
||||||
gtk_widget_show (alignment19);
|
gtk_widget_show (alignment19);
|
||||||
@ -326,15 +332,12 @@ create_window_startup (void)
|
|||||||
g_signal_connect ((gpointer) window_startup, "delete_event",
|
g_signal_connect ((gpointer) window_startup, "delete_event",
|
||||||
G_CALLBACK (on_team_selection_cancel_clicked),
|
G_CALLBACK (on_team_selection_cancel_clicked),
|
||||||
NULL);
|
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_signal_connect ((gpointer) combo_country, "changed",
|
||||||
G_CALLBACK (on_combo_country_changed),
|
G_CALLBACK (on_combo_country_changed),
|
||||||
NULL);
|
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_signal_connect ((gpointer) entry_player_name, "activate",
|
||||||
G_CALLBACK (on_entry_player_name_activate),
|
G_CALLBACK (on_entry_player_name_activate),
|
||||||
NULL);
|
NULL);
|
||||||
@ -357,21 +360,22 @@ create_window_startup (void)
|
|||||||
/* Store pointers to all widgets, for use by lookup_widget(). */
|
/* Store pointers to all widgets, for use by lookup_widget(). */
|
||||||
GLADE_HOOKUP_OBJECT_NO_REF (window_startup, window_startup, "window_startup");
|
GLADE_HOOKUP_OBJECT_NO_REF (window_startup, window_startup, "window_startup");
|
||||||
GLADE_HOOKUP_OBJECT (window_startup, vbox2, "vbox2");
|
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, hpaned1, "hpaned1");
|
||||||
GLADE_HOOKUP_OBJECT (window_startup, scrolledwindow10, "scrolledwindow10");
|
GLADE_HOOKUP_OBJECT (window_startup, scrolledwindow10, "scrolledwindow10");
|
||||||
GLADE_HOOKUP_OBJECT (window_startup, treeview_users, "treeview_users");
|
GLADE_HOOKUP_OBJECT (window_startup, treeview_users, "treeview_users");
|
||||||
GLADE_HOOKUP_OBJECT (window_startup, scrolledwindow1, "scrolledwindow1");
|
GLADE_HOOKUP_OBJECT (window_startup, scrolledwindow1, "scrolledwindow1");
|
||||||
GLADE_HOOKUP_OBJECT (window_startup, treeview_startup, "treeview_startup");
|
GLADE_HOOKUP_OBJECT (window_startup, treeview_startup, "treeview_startup");
|
||||||
GLADE_HOOKUP_OBJECT (window_startup, hseparator10, "hseparator10");
|
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, hseparator11, "hseparator11");
|
||||||
GLADE_HOOKUP_OBJECT (window_startup, label4, "label4");
|
GLADE_HOOKUP_OBJECT (window_startup, label4, "label4");
|
||||||
GLADE_HOOKUP_OBJECT (window_startup, comboboxentry_start_league, "comboboxentry_start_league");
|
GLADE_HOOKUP_OBJECT (window_startup, comboboxentry_start_league, "comboboxentry_start_league");
|
||||||
GLADE_HOOKUP_OBJECT (window_startup, hseparator12, "hseparator12");
|
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, 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, entry_player_name, "entry_player_name");
|
||||||
GLADE_HOOKUP_OBJECT (window_startup, button_add_player, "button_add_player");
|
GLADE_HOOKUP_OBJECT (window_startup, button_add_player, "button_add_player");
|
||||||
GLADE_HOOKUP_OBJECT (window_startup, alignment19, "alignment19");
|
GLADE_HOOKUP_OBJECT (window_startup, alignment19, "alignment19");
|
||||||
|
@ -108,22 +108,29 @@ transfer_add_cpu_offers(void)
|
|||||||
if(team_is_user(trans(i).tm) != -1 &&
|
if(team_is_user(trans(i).tm) != -1 &&
|
||||||
trans(i).offers->len == 0 &&
|
trans(i).offers->len == 0 &&
|
||||||
math_rnd(0, 1) < const_float("float_transfer_offer_prob_max") -
|
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")))
|
(user_from_team(trans(i).tm)->scout % 10 *
|
||||||
transfer_add_offer(i, transfer_team_get_new(),
|
const_float("float_transfer_offer_prob_reduce")))
|
||||||
(gint)rint((gfloat)player_of_id_team(trans(i).tm, trans(i).id)->value *
|
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(
|
(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][0],
|
||||||
scout_factor_bounds[user_from_team(trans(i).tm)->scout % 10][1]))),
|
scout_factor_bounds[user_from_team(trans(i).tm)->scout % 10][1]))), 2),
|
||||||
-1);
|
-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Return a random team as a potential buyer for a user player. */
|
/** Return a random team as a potential buyer for a user player. */
|
||||||
Team*
|
Team*
|
||||||
transfer_team_get_new(void)
|
transfer_team_get_new(void)
|
||||||
{
|
{
|
||||||
gint rndom;
|
gint rndom;
|
||||||
GPtrArray *league_teams = team_get_sorted(team_compare_func, TEAM_COMPARE_UNSORTED, FALSE),
|
GPtrArray *league_teams = team_get_sorted(team_compare_func,
|
||||||
*cup_teams = team_get_sorted(team_compare_func, TEAM_COMPARE_UNSORTED, TRUE);
|
TEAM_COMPARE_UNSORTED, FALSE),
|
||||||
|
*cup_teams = team_get_sorted(team_compare_func,
|
||||||
|
TEAM_COMPARE_UNSORTED, TRUE);
|
||||||
Team *return_value = NULL;
|
Team *return_value = NULL;
|
||||||
|
|
||||||
while(return_value == NULL || team_is_user(return_value) != -1)
|
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(transoff(i, j).status != TRANSFER_OFFER_REJECTED2)
|
||||||
{
|
{
|
||||||
if(player_of_id_team(trans(i).tm, trans(i).id)->value > transoff(i, j).fee &&
|
if(player_of_id_team(trans(i).tm, trans(i).id)->value >
|
||||||
player_of_id_team(trans(i).tm, trans(i).id)->wage > transoff(i, j).wage)
|
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),
|
user_event_add(
|
||||||
|
user_from_team(transoff(i, j).tm),
|
||||||
EVENT_TYPE_TRANSFER_OFFER_REJECTED_FEE_WAGE,
|
EVENT_TYPE_TRANSFER_OFFER_REJECTED_FEE_WAGE,
|
||||||
transoff(i, j).fee, transoff(i, j).wage,
|
transoff(i, j).fee, transoff(i, j).wage,
|
||||||
trans(i).tm, player_of_id_team(trans(i).tm, trans(i).id)->name);
|
trans(i).tm,
|
||||||
|
player_of_id_team(trans(i).tm, trans(i).id)->name);
|
||||||
transoff(i, j).status = TRANSFER_OFFER_REJECTED;
|
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),
|
user_event_add(
|
||||||
|
user_from_team(transoff(i, j).tm),
|
||||||
EVENT_TYPE_TRANSFER_OFFER_REJECTED_FEE,
|
EVENT_TYPE_TRANSFER_OFFER_REJECTED_FEE,
|
||||||
transoff(i, j).fee, transoff(i, j).wage,
|
transoff(i, j).fee, transoff(i, j).wage,
|
||||||
trans(i).tm, player_of_id_team(trans(i).tm, trans(i).id)->name);
|
trans(i).tm,
|
||||||
|
player_of_id_team(trans(i).tm, trans(i).id)->name);
|
||||||
transoff(i, j).status = TRANSFER_OFFER_REJECTED;
|
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),
|
user_event_add(
|
||||||
|
user_from_team(transoff(i, j).tm),
|
||||||
EVENT_TYPE_TRANSFER_OFFER_REJECTED_WAGE,
|
EVENT_TYPE_TRANSFER_OFFER_REJECTED_WAGE,
|
||||||
transoff(i, j).fee, transoff(i, j).wage,
|
transoff(i, j).fee, transoff(i, j).wage,
|
||||||
trans(i).tm, player_of_id_team(trans(i).tm, trans(i).id)->name);
|
trans(i).tm,
|
||||||
|
player_of_id_team(trans(i).tm, trans(i).id)->name);
|
||||||
transoff(i, j).status = TRANSFER_OFFER_REJECTED;
|
transoff(i, j).status = TRANSFER_OFFER_REJECTED;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -257,7 +274,8 @@ transfer_add_new_players(void)
|
|||||||
const_int("int_transfer_max_players") - transfer_list->len);
|
const_int("int_transfer_max_players") - transfer_list->len);
|
||||||
|
|
||||||
for(i=0;i<number_of_new;i++)
|
for(i=0;i<number_of_new;i++)
|
||||||
transfer_add_player(transfer_player_get_new(
|
transfer_add_player(
|
||||||
|
transfer_player_get_new(
|
||||||
(math_rnd(0, 1) < const_float("float_transfer_cup_percentage") &&
|
(math_rnd(0, 1) < const_float("float_transfer_cup_percentage") &&
|
||||||
query_cup_transfer())),
|
query_cup_transfer())),
|
||||||
math_rndi(const_int("int_transfer_time_lower"),
|
math_rndi(const_int("int_transfer_time_lower"),
|
||||||
@ -303,12 +321,16 @@ transfer_add_player(Player *pl, gint time)
|
|||||||
|
|
||||||
for(i=0;i<4;i++)
|
for(i=0;i<4;i++)
|
||||||
{
|
{
|
||||||
deviance_value = math_rnd(-(i + 1) * const_float("float_transfer_scout_deviance_value"),
|
deviance_value =
|
||||||
|
math_rnd(-(i + 1) * const_float("float_transfer_scout_deviance_value"),
|
||||||
(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"),
|
deviance_wage =
|
||||||
|
math_rnd(-(i + 1) * const_float("float_transfer_scout_deviance_wage"),
|
||||||
(i + 1) * const_float("float_transfer_scout_deviance_wage"));
|
(i + 1) * const_float("float_transfer_scout_deviance_wage"));
|
||||||
new.fee[i] = (gint)rint((gfloat)pl->value * (1 + deviance_value));
|
new.fee[i] = math_round_integer(
|
||||||
new.wage[i] = (gint)rint((gfloat)pl->wage * (1 + deviance_wage));
|
(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);
|
g_array_append_val(transfer_list, new);
|
||||||
@ -453,10 +475,12 @@ transfer_add_remove_user_player(Player *pl)
|
|||||||
{
|
{
|
||||||
if(week < transfer_get_deadline())
|
if(week < transfer_get_deadline())
|
||||||
{
|
{
|
||||||
transfer_add_player(pl,
|
transfer_add_player(
|
||||||
|
pl,
|
||||||
(gint)rint(((gfloat)const_int("int_transfer_time_lower") +
|
(gint)rint(((gfloat)const_int("int_transfer_time_lower") +
|
||||||
(gfloat)const_int("int_transfer_time_upper")) / 2));
|
(gfloat)const_int("int_transfer_time_upper")) / 2));
|
||||||
game_gui_print_message(_("%s has been added to the transfer list for %d weeks."),
|
game_gui_print_message(
|
||||||
|
_("%s has been added to the transfer list for %d weeks."),
|
||||||
pl->name,
|
pl->name,
|
||||||
(gint)rint(((gfloat)const_int("int_transfer_time_lower") +
|
(gint)rint(((gfloat)const_int("int_transfer_time_lower") +
|
||||||
(gfloat)const_int("int_transfer_time_upper")) / 2));
|
(gfloat)const_int("int_transfer_time_upper")) / 2));
|
||||||
|
@ -703,6 +703,9 @@ treeview_helper_team_selection(GtkTreeViewColumn *col,
|
|||||||
g_object_set(renderer, "text", ((Team*)team_pointer)->name, NULL);
|
g_object_set(renderer, "text", ((Team*)team_pointer)->name, NULL);
|
||||||
else if(column == 4)
|
else if(column == 4)
|
||||||
{
|
{
|
||||||
|
if(stat0 == STATUS_TEAM_SELECTION)
|
||||||
|
strcpy(buf, "");
|
||||||
|
else
|
||||||
sprintf(buf, "%.1f", team_get_average_skill((Team*)team_pointer, FALSE));
|
sprintf(buf, "%.1f", team_get_average_skill((Team*)team_pointer, FALSE));
|
||||||
g_object_set(renderer, "text", buf, NULL);
|
g_object_set(renderer, "text", buf, NULL);
|
||||||
}
|
}
|
||||||
|
@ -633,8 +633,8 @@ user_history_add(User *user, gint type, const gchar *team_name,
|
|||||||
g_array_index(user->history, UserHistory, i).season == season &&
|
g_array_index(user->history, UserHistory, i).season == season &&
|
||||||
strcmp(g_array_index(user->history, UserHistory, i).team_name,
|
strcmp(g_array_index(user->history, UserHistory, i).team_name,
|
||||||
team_name) == 0 &&
|
team_name) == 0 &&
|
||||||
strcmp(g_array_index(user->history, UserHistory, i).string[1],
|
strcmp(g_array_index(user->history, UserHistory, i).string[0],
|
||||||
string1) == 0)
|
string0) == 0)
|
||||||
{
|
{
|
||||||
/** Same cup round. */
|
/** Same cup round. */
|
||||||
if(strcmp(g_array_index(user->history, UserHistory, i).string[2],
|
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)
|
if(string0 != NULL)
|
||||||
misc_string_assign(&his->string[0], string0);
|
misc_string_assign(&his->string[0], string0);
|
||||||
|
if(string1 != NULL)
|
||||||
|
misc_string_assign(&his->string[1], string1);
|
||||||
if(string2 != NULL)
|
if(string2 != NULL)
|
||||||
misc_string_assign(&his->string[2], string2);
|
misc_string_assign(&his->string[2], string2);
|
||||||
g_array_sort(user->history, (GCompareFunc)user_history_compare);
|
g_array_sort(user->history, (GCompareFunc)user_history_compare);
|
||||||
|
@ -27,8 +27,8 @@ string_contrib_entry Cristian Spoiala (Romania)
|
|||||||
string_contrib_entry Sebastian Vöcking (Germany)
|
string_contrib_entry Sebastian Vöcking (Germany)
|
||||||
|
|
||||||
string_contrib_title Translations
|
string_contrib_title Translations
|
||||||
string_contrib_entry Alexandre Beraud (French)
|
string_contrib_entry Alexandre Beraud, Arnaud Le Rouzic (French)
|
||||||
string_contrib_entry Győző Both (German)
|
string_contrib_entry Győző Both, Michael Trent (German)
|
||||||
string_contrib_entry Tobe & Arne Deprez (Dutch)
|
string_contrib_entry Tobe & Arne Deprez (Dutch)
|
||||||
string_contrib_entry Marcelo Garrone, Carlos Garces (Spanish)
|
string_contrib_entry Marcelo Garrone, Carlos Garces (Spanish)
|
||||||
string_contrib_entry Kristian Poul Herkild (Danish)
|
string_contrib_entry Kristian Poul Herkild (Danish)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user