mirror of
https://github.com/tstellar/bygfoot.git
synced 2025-02-20 21:40:45 +01:00
"Bugfixes, add_week, supernational."
This commit is contained in:
parent
06f95acc6c
commit
24679ad5f2
File diff suppressed because one or more lines are too long
@ -1032,12 +1032,14 @@
|
||||
<child>
|
||||
<widget class="GtkButton" id="button_yesno_no">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Esc</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-no</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<signal name="clicked" handler="on_button_yesno_no_clicked" last_modification_time="Sun, 20 Mar 2005 19:13:41 GMT"/>
|
||||
<accelerator key="Escape" modifiers="0" signal="clicked"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
@ -1976,7 +1978,7 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label50">
|
||||
<widget class="GtkLabel" id="label_contributors">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Contributors</property>
|
||||
<property name="use_underline">False</property>
|
||||
|
143
po/bygfoot.pot
143
po/bygfoot.pot
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2005-06-23 17:34+0200\n"
|
||||
"POT-Creation-Date: 2005-06-23 23:51+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -177,7 +177,7 @@ msgid "This is your first season."
|
||||
msgstr ""
|
||||
|
||||
#: src/callbacks.c:399 src/callbacks.c:415 src/callbacks.c:431
|
||||
#: src/callbacks.c:449 src/callbacks.c:788 src/callbacks.c:804
|
||||
#: src/callbacks.c:449 src/callbacks.c:794 src/callbacks.c:810
|
||||
msgid "You haven't selected a player."
|
||||
msgstr ""
|
||||
|
||||
@ -218,20 +218,24 @@ msgstr ""
|
||||
msgid "No match stored."
|
||||
msgstr ""
|
||||
|
||||
#: src/callbacks.c:738
|
||||
#: src/callbacks.c:722 src/game_gui.c:309
|
||||
msgid "Boost ON is disabled in this country definition."
|
||||
msgstr ""
|
||||
|
||||
#: src/callbacks.c:744
|
||||
msgid "Finances are disabled in this country definition."
|
||||
msgstr ""
|
||||
|
||||
#: src/callbacks.c:743
|
||||
#: src/callbacks.c:749
|
||||
msgid ""
|
||||
"Left-click: get loan; Right-click: pay back; Middle click: stadium window."
|
||||
msgstr ""
|
||||
|
||||
#: src/callbacks.c:757
|
||||
#: src/callbacks.c:763
|
||||
msgid "Stadium management is disabled in this country definition."
|
||||
msgstr ""
|
||||
|
||||
#: src/callbacks.c:782
|
||||
#: src/callbacks.c:788
|
||||
msgid "Contracts are disabled in this country definition."
|
||||
msgstr ""
|
||||
|
||||
@ -310,11 +314,11 @@ msgstr ""
|
||||
msgid " (OG)"
|
||||
msgstr ""
|
||||
|
||||
#: src/game_gui.c:325
|
||||
#: src/game_gui.c:333
|
||||
msgid "Next week you'll fire him and hire a new one."
|
||||
msgstr ""
|
||||
|
||||
#: src/game_gui.c:519
|
||||
#: src/game_gui.c:530
|
||||
#, c-format
|
||||
msgid ""
|
||||
"The team owners have fired you because of financial mismanagement. Luckily, "
|
||||
@ -322,7 +326,7 @@ msgid ""
|
||||
"some information on %s:"
|
||||
msgstr ""
|
||||
|
||||
#: src/game_gui.c:522
|
||||
#: src/game_gui.c:533
|
||||
#, c-format
|
||||
msgid ""
|
||||
"The team owners have fired you because of unsuccessfulness. Luckily, the "
|
||||
@ -330,49 +334,49 @@ msgid ""
|
||||
"information on %s:"
|
||||
msgstr ""
|
||||
|
||||
#: src/game_gui.c:525
|
||||
#: src/game_gui.c:536
|
||||
#, c-format
|
||||
msgid ""
|
||||
"The owners of %s are deeply impressed by your success with %s and would like "
|
||||
"to hire you. Here's some information on %s:"
|
||||
msgstr ""
|
||||
|
||||
#: src/game_gui.c:528
|
||||
#: src/game_gui.c:539
|
||||
msgid "Accept?"
|
||||
msgstr ""
|
||||
|
||||
#: src/game_gui.c:530
|
||||
#: src/game_gui.c:541
|
||||
msgid " (NOTE: If you don't, the game is over for you.)"
|
||||
msgstr ""
|
||||
|
||||
#: src/game_gui.c:581
|
||||
#: src/game_gui.c:592
|
||||
#, c-format
|
||||
msgid "Job offers set to %s."
|
||||
msgstr ""
|
||||
|
||||
#: src/game_gui.c:588
|
||||
#: src/game_gui.c:599
|
||||
#, c-format
|
||||
msgid "Live game set to %s."
|
||||
msgstr ""
|
||||
|
||||
#: src/game_gui.c:595
|
||||
#: src/game_gui.c:606
|
||||
#, c-format
|
||||
msgid "Overwrite set to %s."
|
||||
msgstr ""
|
||||
|
||||
#: src/game_gui.c:615
|
||||
#: src/game_gui.c:626
|
||||
msgid ""
|
||||
"Bygfoot is a very intuitive and simple game, so there isn't a full-grown "
|
||||
"documentation. However, if you have trouble, there are a few places to go.\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/game_gui.c:617
|
||||
#: src/game_gui.c:628
|
||||
msgid ""
|
||||
"At the Bygfoot forums you can report bugs, ask for help and discuss the game "
|
||||
"(you don't have to register):\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/game_gui.c:619
|
||||
#: src/game_gui.c:630
|
||||
msgid ""
|
||||
"\n"
|
||||
"If you feel you've found out something about the game that has to be shared, "
|
||||
@ -611,15 +615,15 @@ msgstr ""
|
||||
msgid "_Help"
|
||||
msgstr ""
|
||||
|
||||
#: src/interface.c:806 src/misc2_interface.c:1014
|
||||
#: src/interface.c:806 src/misc2_interface.c:1027
|
||||
msgid "About"
|
||||
msgstr ""
|
||||
|
||||
#: src/interface.c:814 src/misc2_interface.c:1028
|
||||
#: src/interface.c:814 src/misc2_interface.c:1041
|
||||
msgid "Contributors"
|
||||
msgstr ""
|
||||
|
||||
#: src/interface.c:822 src/misc2_interface.c:1054
|
||||
#: src/interface.c:822 src/misc2_interface.c:1067
|
||||
msgid "Help"
|
||||
msgstr ""
|
||||
|
||||
@ -1546,7 +1550,7 @@ msgstr ""
|
||||
msgid "Remove user %s from the game?"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc2_interface.c:71 src/window.c:436
|
||||
#: src/misc2_interface.c:71 src/window.c:453
|
||||
msgid "Job offer"
|
||||
msgstr ""
|
||||
|
||||
@ -1584,67 +1588,68 @@ msgstr ""
|
||||
msgid "Average skill:"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc2_interface.c:221 src/player.c:1136 src/treeview_helper.c:1082
|
||||
#: src/misc2_interface.c:221 src/player.c:1131 src/treeview_helper.c:1082
|
||||
msgid "OK"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc2_interface.c:434 src/misc2_interface.c:1061
|
||||
#: src/misc2_interface.c:1156 src/misc_interface.c:263
|
||||
#: src/misc_interface.c:1018 src/options_interface.c:978
|
||||
#: src/misc2_interface.c:434 src/misc2_interface.c:521
|
||||
#: src/misc2_interface.c:1074 src/misc2_interface.c:1169
|
||||
#: src/misc_interface.c:263 src/misc_interface.c:1018
|
||||
#: src/options_interface.c:978
|
||||
msgid "Esc"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc2_interface.c:590
|
||||
#: src/misc2_interface.c:603
|
||||
msgid "1 year"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc2_interface.c:598
|
||||
#: src/misc2_interface.c:611
|
||||
msgid "3 years"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc2_interface.c:606
|
||||
#: src/misc2_interface.c:619
|
||||
msgid "4 years"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc2_interface.c:614
|
||||
#: src/misc2_interface.c:627
|
||||
msgid "2 years"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc2_interface.c:677
|
||||
#: src/misc2_interface.c:690
|
||||
msgid "Make offer"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc2_interface.c:764
|
||||
#: src/misc2_interface.c:777
|
||||
msgid "Users -- click to remove"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc2_interface.c:779
|
||||
#: src/misc2_interface.c:792
|
||||
msgid "Click on a user to remove him from the game."
|
||||
msgstr ""
|
||||
|
||||
#: src/misc2_interface.c:785
|
||||
#: src/misc2_interface.c:798
|
||||
msgid "Available teams"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc2_interface.c:821 src/misc_interface.c:190
|
||||
#: src/misc2_interface.c:834 src/misc_interface.c:190
|
||||
msgid "Add user"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc2_interface.c:897
|
||||
#: src/misc2_interface.c:910
|
||||
msgid "Debug"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc2_interface.c:904
|
||||
#: src/misc2_interface.c:917
|
||||
msgid ""
|
||||
"Bygfoot debug window. If you got here by accident, CLOSE IMMEDIATELY "
|
||||
"(otherwise your CPU will be destroyed by overheating)."
|
||||
msgstr ""
|
||||
|
||||
#: src/misc2_interface.c:1144 src/misc_interface.c:994
|
||||
#: src/misc2_interface.c:1157 src/misc_interface.c:994
|
||||
msgid "Return"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc2_interface.c:1173
|
||||
#: src/misc2_interface.c:1186
|
||||
msgid "Decide later"
|
||||
msgstr ""
|
||||
|
||||
@ -1733,7 +1738,7 @@ msgstr ""
|
||||
msgid "_Resume last game"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc_interface.c:409 src/window.c:466
|
||||
#: src/misc_interface.c:409 src/window.c:483
|
||||
msgid "Select font"
|
||||
msgstr ""
|
||||
|
||||
@ -2223,56 +2228,56 @@ msgid ""
|
||||
"this user starts a new game)"
|
||||
msgstr ""
|
||||
|
||||
#: src/player.c:565
|
||||
#: src/player.c:559
|
||||
msgid "You can't replace a banned player."
|
||||
msgstr ""
|
||||
|
||||
#: src/player.c:1029
|
||||
#: src/player.c:1023
|
||||
#, c-format
|
||||
msgid "%s's contract expires in %.1f years."
|
||||
msgstr ""
|
||||
|
||||
#: src/player.c:1139
|
||||
#: src/player.c:1134
|
||||
msgid "Concussion"
|
||||
msgstr ""
|
||||
|
||||
#: src/player.c:1142
|
||||
#: src/player.c:1137
|
||||
msgid "Pulled muscle"
|
||||
msgstr ""
|
||||
|
||||
#: src/player.c:1145
|
||||
#: src/player.c:1140
|
||||
msgid "Hamstring"
|
||||
msgstr ""
|
||||
|
||||
#: src/player.c:1148
|
||||
#: src/player.c:1143
|
||||
msgid "Groin injury"
|
||||
msgstr ""
|
||||
|
||||
#: src/player.c:1151
|
||||
#: src/player.c:1146
|
||||
msgid "Fractured ankle"
|
||||
msgstr ""
|
||||
|
||||
#: src/player.c:1154
|
||||
#: src/player.c:1149
|
||||
msgid "Broken rib"
|
||||
msgstr ""
|
||||
|
||||
#: src/player.c:1157
|
||||
#: src/player.c:1152
|
||||
msgid "Broken leg"
|
||||
msgstr ""
|
||||
|
||||
#: src/player.c:1160
|
||||
#: src/player.c:1155
|
||||
msgid "Broken ankle"
|
||||
msgstr ""
|
||||
|
||||
#: src/player.c:1163
|
||||
#: src/player.c:1158
|
||||
msgid "Broken arm"
|
||||
msgstr ""
|
||||
|
||||
#: src/player.c:1166
|
||||
#: src/player.c:1161
|
||||
msgid "Broken shoulder"
|
||||
msgstr ""
|
||||
|
||||
#: src/player.c:1169
|
||||
#: src/player.c:1164
|
||||
msgid "Torn crucial ligament"
|
||||
msgstr ""
|
||||
|
||||
@ -2514,7 +2519,7 @@ msgstr ""
|
||||
msgid "Stadium"
|
||||
msgstr ""
|
||||
|
||||
#: src/treeview.c:1229 src/window.c:279
|
||||
#: src/treeview.c:1229 src/window.c:296
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Improvement in progress.\n"
|
||||
@ -3104,56 +3109,60 @@ msgid ""
|
||||
"the contract."
|
||||
msgstr ""
|
||||
|
||||
#: src/window.c:36
|
||||
#: src/window.c:39
|
||||
msgid "News"
|
||||
msgstr ""
|
||||
|
||||
#: src/window.c:53
|
||||
msgid "Didn't find file 'bygfoot_help'."
|
||||
msgstr ""
|
||||
|
||||
#: src/window.c:119
|
||||
#: src/window.c:136
|
||||
msgid "Bygfoot Save Files"
|
||||
msgstr ""
|
||||
|
||||
#: src/window.c:125
|
||||
#: src/window.c:142
|
||||
msgid "All Files"
|
||||
msgstr ""
|
||||
|
||||
#: src/window.c:289
|
||||
#: src/window.c:306
|
||||
msgid "No improvements currently in progress."
|
||||
msgstr ""
|
||||
|
||||
#: src/window.c:358
|
||||
#: src/window.c:375
|
||||
#, c-format
|
||||
msgid "Welcome to Bygfoot %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/window.c:395
|
||||
#: src/window.c:412
|
||||
msgid "Erm..."
|
||||
msgstr ""
|
||||
|
||||
#: src/window.c:414
|
||||
#: src/window.c:431
|
||||
msgid "Numbers..."
|
||||
msgstr ""
|
||||
|
||||
#: src/window.c:425
|
||||
#: src/window.c:442
|
||||
msgid "Your stadium"
|
||||
msgstr ""
|
||||
|
||||
#: src/window.c:458
|
||||
#: src/window.c:475
|
||||
msgid "Options"
|
||||
msgstr ""
|
||||
|
||||
#: src/window.c:481
|
||||
#: src/window.c:498
|
||||
msgid "Contract offer"
|
||||
msgstr ""
|
||||
|
||||
#: src/window.c:489
|
||||
#: src/window.c:506
|
||||
msgid "User management"
|
||||
msgstr ""
|
||||
|
||||
#: src/window.c:512
|
||||
#: src/window.c:529
|
||||
msgid "Transfer offer"
|
||||
msgstr ""
|
||||
|
||||
#: src/window.c:520
|
||||
#: src/window.c:537
|
||||
msgid "Sponsorship offers"
|
||||
msgstr ""
|
||||
|
||||
|
@ -10,7 +10,6 @@
|
||||
#endif
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "gettext_macros.h"
|
||||
|
||||
/**
|
||||
@ -70,6 +69,7 @@
|
||||
enum ExitCodes
|
||||
{
|
||||
EXIT_OK = 0, /**< Normal exit. */
|
||||
EXIT_GENERAL, /**< A general, multi-purpose exit code. */
|
||||
EXIT_NO_COUNTRY_FILES, /**< Exit when no country files have been found. */
|
||||
EXIT_FILE_OPEN_FAILED, /**< A file could not be opened. */
|
||||
EXIT_PRINT_ERROR, /**< Exit when the print_error function is called on a set error.*/
|
||||
@ -102,10 +102,6 @@ typedef struct
|
||||
|
||||
/** Pointer array holding all cups. */
|
||||
GPtrArray *allcups;
|
||||
|
||||
/** Whether we have a supernational cup
|
||||
(which leads to disabling transfers, finances and stadium). */
|
||||
gboolean supernational;
|
||||
} Country;
|
||||
|
||||
/** Struct used for having all the windows
|
||||
|
@ -72,7 +72,7 @@ callback_player_clicked(gint idx, GdkEventButton *event)
|
||||
/* Only accept single-clicks right now. */
|
||||
if(event->type != GDK_BUTTON_PRESS)
|
||||
return;
|
||||
|
||||
|
||||
if(event->button == 1)
|
||||
{
|
||||
if(selected_row[0] == -1)
|
||||
|
@ -142,7 +142,7 @@ void
|
||||
on_button_transfers_clicked (GtkButton *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
if(country.supernational)
|
||||
if(opt_int("int_opt_disable_transfers"))
|
||||
game_gui_print_message(_("Transfers are disabled in this country definition."));
|
||||
else if(week < transfer_get_deadline())
|
||||
{
|
||||
@ -393,7 +393,7 @@ void
|
||||
on_menu_put_on_transfer_list_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
if(country.supernational)
|
||||
if(opt_int("int_opt_disable_transfers"))
|
||||
game_gui_print_message(_("Transfers are disabled in this country definition."));
|
||||
else if(selected_row[0] == -1)
|
||||
game_gui_print_message(_("You haven't selected a player."));
|
||||
@ -716,7 +716,13 @@ on_eventbox_boost_button_press_event (GtkWidget *widget,
|
||||
else
|
||||
return FALSE;
|
||||
|
||||
team_change_attribute_with_message(current_user.tm, TEAM_ATTRIBUTE_BOOST, new_boost);
|
||||
if(new_boost == 1 && opt_int("int_opt_disable_boost_on"))
|
||||
{
|
||||
new_boost = 0;
|
||||
game_gui_print_message(_("Boost ON is disabled in this country definition."));
|
||||
}
|
||||
else
|
||||
team_change_attribute_with_message(current_user.tm, TEAM_ATTRIBUTE_BOOST, new_boost);
|
||||
|
||||
game_gui_write_meters();
|
||||
game_gui_write_radio_items();
|
||||
@ -733,7 +739,7 @@ void
|
||||
on_menu_show_finances_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
if(country.supernational)
|
||||
if(opt_int("int_opt_disable_finances"))
|
||||
{
|
||||
game_gui_print_message(_("Finances are disabled in this country definition."));
|
||||
return;
|
||||
@ -752,7 +758,7 @@ void
|
||||
on_menu_show_stadium_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
if(country.supernational)
|
||||
if(opt_int("int_opt_disable_stadium"))
|
||||
{
|
||||
game_gui_print_message(_("Stadium management is disabled in this country definition."));
|
||||
return;
|
||||
@ -777,7 +783,7 @@ void
|
||||
on_menu_offer_new_contract_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
if(country.supernational)
|
||||
if(opt_int("int_opt_disable_contracts"))
|
||||
{
|
||||
game_gui_print_message(_("Contracts are disabled in this country definition."));
|
||||
return;
|
||||
|
@ -25,7 +25,7 @@ finance_update_user_weekly(User *user)
|
||||
const_float("float_finance_scout_factor3"),
|
||||
const_float("float_finance_scout_factor4")};
|
||||
|
||||
if(country.supernational)
|
||||
if(opt_int("int_opt_disable_finances"))
|
||||
return;
|
||||
|
||||
if(week % 2 == 1)
|
||||
|
@ -252,7 +252,7 @@ game_initialize(Fixture *fix)
|
||||
ticket_income =
|
||||
fix->attendance * const_int("int_team_stadium_ticket_price");
|
||||
|
||||
if(!country.supernational && user_idx[0] != -1 && fix->home_advantage)
|
||||
if(!opt_int("int_opt_disable_finances") && user_idx[0] != -1 && fix->home_advantage)
|
||||
{
|
||||
usr(user_idx[0]).money += ticket_income;
|
||||
usr(user_idx[0]).money_in[1][MON_IN_TICKET] += ticket_income;
|
||||
|
@ -199,7 +199,7 @@ game_gui_set_main_window_header(void)
|
||||
gui_label_set_text_from_int(label_round, week_round, FALSE);
|
||||
gui_label_set_text_from_int(label_rank, week_round, FALSE);
|
||||
|
||||
if(!country.supernational)
|
||||
if(!opt_int("int_opt_disable_finances"))
|
||||
{
|
||||
misc_print_grouped_int(current_user.money, buf, FALSE);
|
||||
gtk_label_set_text(label_money, buf);
|
||||
@ -300,8 +300,16 @@ game_gui_read_radio_items(GtkWidget *widget)
|
||||
|
||||
for(i=0;i<3;i++)
|
||||
if(widget == boost[i])
|
||||
{
|
||||
current_user.tm->boost = i - 1;
|
||||
|
||||
if(current_user.tm->boost == 1 && opt_int("int_opt_disable_boost_on"))
|
||||
{
|
||||
current_user.tm->boost = 0;
|
||||
game_gui_print_message(_("Boost ON is disabled in this country definition."));
|
||||
}
|
||||
}
|
||||
|
||||
for(i=0;i<5;i++)
|
||||
if(widget == style[i])
|
||||
current_user.tm->style = i - 2;
|
||||
@ -324,6 +332,9 @@ game_gui_read_radio_items(GtkWidget *widget)
|
||||
old_physio != current_user.physio)
|
||||
game_gui_print_message(_("Next week you'll fire him and hire a new one."));
|
||||
|
||||
game_gui_write_meters();
|
||||
game_gui_write_radio_items();
|
||||
|
||||
treeview_show_next_opponent();
|
||||
}
|
||||
|
||||
|
11
src/main.c
11
src/main.c
@ -29,8 +29,7 @@ main_init_variables(void)
|
||||
ligs = cps = NULL;
|
||||
acps = NULL;
|
||||
country.name = country.symbol = country.sid = NULL;
|
||||
country.supernational = FALSE;
|
||||
|
||||
|
||||
season = week = week_round = 1;
|
||||
|
||||
for(i=0;i<COUNT_END;i++)
|
||||
@ -68,6 +67,14 @@ main_init_variables(void)
|
||||
file_load_conf_files();
|
||||
|
||||
language_set(language_get_code_index(opt_str("string_opt_language_code")) + 1);
|
||||
|
||||
/** Some of these (or all) are disabled (set to 1) in supernational
|
||||
country defs. */
|
||||
option_add(&options, "int_opt_disable_finances", 0, NULL);
|
||||
option_add(&options, "int_opt_disable_transfers", 0, NULL);
|
||||
option_add(&options, "int_opt_disable_stadium", 0, NULL);
|
||||
option_add(&options, "int_opt_disable_contracts", 0, NULL);
|
||||
option_add(&options, "int_opt_disable_boost_on", 0, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -483,6 +483,12 @@ create_window_yesno (void)
|
||||
GtkWidget *hbox18;
|
||||
GtkWidget *button_yesno_yes;
|
||||
GtkWidget *button_yesno_no;
|
||||
GtkAccelGroup *accel_group;
|
||||
GtkTooltips *tooltips;
|
||||
|
||||
tooltips = gtk_tooltips_new ();
|
||||
|
||||
accel_group = gtk_accel_group_new ();
|
||||
|
||||
window_yesno = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window_yesno), 5);
|
||||
@ -512,6 +518,10 @@ create_window_yesno (void)
|
||||
button_yesno_no = gtk_button_new_from_stock ("gtk-no");
|
||||
gtk_widget_show (button_yesno_no);
|
||||
gtk_box_pack_start (GTK_BOX (hbox18), button_yesno_no, TRUE, TRUE, 0);
|
||||
gtk_tooltips_set_tip (tooltips, button_yesno_no, _("Esc"), NULL);
|
||||
gtk_widget_add_accelerator (button_yesno_no, "clicked", accel_group,
|
||||
GDK_Escape, 0,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
g_signal_connect ((gpointer) window_yesno, "delete_event",
|
||||
G_CALLBACK (on_window_yesno_delete_event),
|
||||
@ -531,6 +541,9 @@ create_window_yesno (void)
|
||||
GLADE_HOOKUP_OBJECT (window_yesno, hbox18, "hbox18");
|
||||
GLADE_HOOKUP_OBJECT (window_yesno, button_yesno_yes, "button_yesno_yes");
|
||||
GLADE_HOOKUP_OBJECT (window_yesno, button_yesno_no, "button_yesno_no");
|
||||
GLADE_HOOKUP_OBJECT_NO_REF (window_yesno, tooltips, "tooltips");
|
||||
|
||||
gtk_window_add_accel_group (GTK_WINDOW (window_yesno), accel_group);
|
||||
|
||||
return window_yesno;
|
||||
}
|
||||
@ -964,7 +977,7 @@ create_window_help (void)
|
||||
GtkWidget *label49;
|
||||
GtkWidget *scrolledwindow4;
|
||||
GtkWidget *treeview_contributors;
|
||||
GtkWidget *label50;
|
||||
GtkWidget *label_contributors;
|
||||
GtkWidget *vbox25;
|
||||
GtkWidget *image13;
|
||||
GtkWidget *label_help_text1;
|
||||
@ -1025,9 +1038,9 @@ create_window_help (void)
|
||||
gtk_widget_show (treeview_contributors);
|
||||
gtk_container_add (GTK_CONTAINER (scrolledwindow4), treeview_contributors);
|
||||
|
||||
label50 = gtk_label_new (_("Contributors"));
|
||||
gtk_widget_show (label50);
|
||||
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), label50);
|
||||
label_contributors = gtk_label_new (_("Contributors"));
|
||||
gtk_widget_show (label_contributors);
|
||||
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), label_contributors);
|
||||
|
||||
vbox25 = gtk_vbox_new (FALSE, 3);
|
||||
gtk_widget_show (vbox25);
|
||||
@ -1080,7 +1093,7 @@ create_window_help (void)
|
||||
GLADE_HOOKUP_OBJECT (window_help, label49, "label49");
|
||||
GLADE_HOOKUP_OBJECT (window_help, scrolledwindow4, "scrolledwindow4");
|
||||
GLADE_HOOKUP_OBJECT (window_help, treeview_contributors, "treeview_contributors");
|
||||
GLADE_HOOKUP_OBJECT (window_help, label50, "label50");
|
||||
GLADE_HOOKUP_OBJECT (window_help, label_contributors, "label_contributors");
|
||||
GLADE_HOOKUP_OBJECT (window_help, vbox25, "vbox25");
|
||||
GLADE_HOOKUP_OBJECT (window_help, image13, "image13");
|
||||
GLADE_HOOKUP_OBJECT (window_help, label_help_text1, "label_help_text1");
|
||||
|
26
src/option.c
26
src/option.c
@ -123,3 +123,29 @@ option_set_int(const gchar *name, OptionList *optionlist, gint new_value)
|
||||
else
|
||||
((Option*)element)->value = new_value;
|
||||
}
|
||||
|
||||
|
||||
/** Add an option to the optionlist with the given values. */
|
||||
void
|
||||
option_add(OptionList *optionlist, const gchar *name, gint int_value, const gchar *string_value)
|
||||
{
|
||||
gint i;
|
||||
Option new;
|
||||
gpointer element = g_datalist_get_data(&optionlist->datalist, name);
|
||||
|
||||
if(element != NULL)
|
||||
{
|
||||
g_warning("Option named '%s' already contained in optionlist.", name);
|
||||
main_exit_program(EXIT_GENERAL, NULL);
|
||||
}
|
||||
|
||||
new.name = g_string_new(name);
|
||||
new.value = int_value;
|
||||
new.string_value = (string_value == NULL) ? NULL : g_string_new(string_value);
|
||||
|
||||
g_array_append_val(optionlist->list, new);
|
||||
|
||||
for(i=0;i<optionlist->list->len;i++)
|
||||
g_datalist_set_data(&optionlist->datalist, g_array_index(optionlist->list, Option, i).name->str,
|
||||
&g_array_index(optionlist->list, Option, i));
|
||||
}
|
||||
|
@ -54,4 +54,7 @@ option_set_string(const gchar *name, OptionList *optionlist, const gchar *new_va
|
||||
void
|
||||
option_set_int(const gchar *name, OptionList *optionlist, gint new_value);
|
||||
|
||||
void
|
||||
option_add(OptionList *optionlist, const gchar *name, gint int_value, const gchar *string_value);
|
||||
|
||||
#endif
|
||||
|
@ -83,10 +83,10 @@ on_checkbutton_save_global_button_press_event
|
||||
g_free(conf_file);
|
||||
|
||||
option_gui_set_up_window();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
@ -101,8 +101,9 @@ on_checkbutton_save_user_button_press_event
|
||||
{
|
||||
file_load_user_conf_file(¤t_user);
|
||||
option_gui_set_up_window();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
13
src/player.c
13
src/player.c
@ -10,6 +10,7 @@
|
||||
#include "option.h"
|
||||
#include "player.h"
|
||||
#include "team.h"
|
||||
#include "transfer.h"
|
||||
#include "user.h"
|
||||
|
||||
/** Create and return a new player.
|
||||
@ -477,13 +478,6 @@ player_compare_substitute_func(gconstpointer a, gconstpointer b, gpointer data)
|
||||
return_value =
|
||||
misc_float_compare(skill_for_pos1, skill_for_pos2);
|
||||
|
||||
/* printf("%s %d %s %d %d\n", pl1->name->str, pl1->pos, pl2->name->str, */
|
||||
/* pl2->pos, return_value); */
|
||||
/* printf("\t gaski %.1f %.1f skipos %.1f %.1f struc %d %d\n", */
|
||||
/* (gfloat)game_skill1 / 10000, (gfloat)game_skill2 / 10000, */
|
||||
/* (gfloat)skill_for_pos1 / 10000, (gfloat)skill_for_pos2 / 10000, */
|
||||
/* good_structure1, good_structure2); */
|
||||
|
||||
return return_value;
|
||||
}
|
||||
|
||||
@ -1018,11 +1012,11 @@ player_update_weekly(Team *tm, gint idx)
|
||||
{
|
||||
pl->age += 0.0192;
|
||||
|
||||
if(!country.supernational)
|
||||
if(!opt_int("int_opt_disable_contracts"))
|
||||
pl->contract -= 0.0192;
|
||||
}
|
||||
|
||||
if(!country.supernational && debug < 50 &&
|
||||
if(!opt_int("int_opt_disable_contracts") && debug < 50 &&
|
||||
pl->contract * 12 <= opt_user_int("int_opt_user_contract_limit") &&
|
||||
(pl->contract + 0.0192) * 12 > opt_user_int("int_opt_user_contract_limit"))
|
||||
{
|
||||
@ -1057,6 +1051,7 @@ player_remove_contract(Team *tm, gint idx)
|
||||
void
|
||||
player_remove_from_team(Team *tm, gint idx)
|
||||
{
|
||||
transfer_remove_player_ptr(player_of_idx_team(tm, idx));
|
||||
free_player(player_of_idx_team(tm, idx));
|
||||
g_array_remove_index(tm->players, idx);
|
||||
}
|
||||
|
@ -107,10 +107,12 @@ start_new_season(void)
|
||||
fixture_write_league_fixtures(&lig(i));
|
||||
|
||||
for(i=cps->len - 1; i >= 0; i--)
|
||||
if(cp(i).add_week == 0)
|
||||
if(cp(i).add_week >= 0)
|
||||
{
|
||||
cup_reset(&cp(i));
|
||||
fixture_write_cup_fixtures(&cp(i));
|
||||
|
||||
if(cp(i).add_week == 0)
|
||||
fixture_write_cup_fixtures(&cp(i));
|
||||
}
|
||||
else if(cp(i).add_week == -1)
|
||||
{
|
||||
|
@ -20,7 +20,7 @@ transfer_update(void)
|
||||
gint i, j;
|
||||
|
||||
if(week > transfer_get_deadline() ||
|
||||
country.supernational)
|
||||
opt_int("int_opt_disable_transfers"))
|
||||
return;
|
||||
|
||||
if(week == transfer_get_deadline())
|
||||
|
@ -2359,8 +2359,8 @@ treeview_show_language_combo(void)
|
||||
gtk_combo_box_set_model(combo_languages, model);
|
||||
g_object_unref(model);
|
||||
|
||||
gtk_combo_box_entry_set_text_column(GTK_COMBO_BOX_ENTRY(combo_languages), 1);
|
||||
|
||||
if(gtk_combo_box_entry_get_text_column(GTK_COMBO_BOX_ENTRY(combo_languages)) == -1)
|
||||
gtk_combo_box_entry_set_text_column(GTK_COMBO_BOX_ENTRY(combo_languages), 1);
|
||||
gtk_cell_layout_clear(GTK_CELL_LAYOUT(combo_languages));
|
||||
|
||||
renderer = gtk_cell_renderer_pixbuf_new();
|
||||
|
@ -101,7 +101,7 @@ user_set_up_team(User *user)
|
||||
user_set_up_finances(user);
|
||||
user_set_up_counters(user);
|
||||
|
||||
user->counters[COUNT_USER_NEW_SPONSOR] = (country.supernational) ? -5 : 1;
|
||||
user->counters[COUNT_USER_NEW_SPONSOR] = (opt_int("int_opt_disable_finances")) ? -5 : 1;
|
||||
}
|
||||
|
||||
|
||||
|
17
src/window.c
17
src/window.c
@ -22,6 +22,23 @@
|
||||
#include "user.h"
|
||||
#include "window.h"
|
||||
|
||||
/** Show the window with the news. */
|
||||
void
|
||||
window_show_news(void)
|
||||
{
|
||||
GtkNotebook *nb = NULL;
|
||||
|
||||
window_create(WINDOW_HELP);
|
||||
|
||||
nb = GTK_NOTEBOOK(lookup_widget(window.help, "notebook1"));
|
||||
|
||||
gtk_notebook_remove_page(nb, 0);
|
||||
gtk_notebook_remove_page(nb, -1);
|
||||
|
||||
gtk_label_set_text(GTK_LABEL(lookup_widget(window.help, "label_contributors")),
|
||||
_("News"));
|
||||
}
|
||||
|
||||
/** Show the help/about window.
|
||||
@param page Which notebook page to display. */
|
||||
void
|
||||
|
@ -65,4 +65,7 @@ window_live_set_spinbuttons(void);
|
||||
void
|
||||
window_show_transfer_dialog(const gchar *text);
|
||||
|
||||
void
|
||||
window_show_news(void);
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "file.h"
|
||||
#include "free.h"
|
||||
#include "misc.h"
|
||||
#include "option.h"
|
||||
#include "variables.h"
|
||||
#include "xml_cup.h"
|
||||
#include "xml_country.h"
|
||||
@ -140,7 +141,13 @@ xml_country_read_text (GMarkupParseContext *context,
|
||||
else if(state == STATE_SID)
|
||||
country.sid = g_string_new(buf);
|
||||
else if(state == STATE_SUPERNATIONAL)
|
||||
country.supernational = int_value;
|
||||
{
|
||||
opt_set_int("int_opt_disable_finances", 1);
|
||||
opt_set_int("int_opt_disable_transfers", 1);
|
||||
opt_set_int("int_opt_disable_stadium", 1);
|
||||
opt_set_int("int_opt_disable_contracts", 1);
|
||||
opt_set_int("int_opt_disable_boost_on", 1);
|
||||
}
|
||||
else if(state == STATE_LEAGUE)
|
||||
xml_league_read(buf, ligs);
|
||||
else if(state == STATE_CUP)
|
||||
@ -191,7 +198,12 @@ xml_country_read(const gchar *country_name)
|
||||
g_free(file_name);
|
||||
|
||||
free_country(TRUE);
|
||||
country.supernational = FALSE;
|
||||
|
||||
opt_set_int("int_opt_disable_finances", 0);
|
||||
opt_set_int("int_opt_disable_transfers", 0);
|
||||
opt_set_int("int_opt_disable_stadium", 0);
|
||||
opt_set_int("int_opt_disable_contracts", 0);
|
||||
opt_set_int("int_opt_disable_boost_on", 0);
|
||||
|
||||
if(g_markup_parse_context_parse(context, file_contents, length, &error))
|
||||
{
|
||||
|
@ -15,7 +15,6 @@ enum XmlLoadSaveCountryTags
|
||||
TAG_MISC_WEEK_ROUND,
|
||||
TAG_MISC_COUNTER,
|
||||
TAG_MISC_ALLCUP,
|
||||
TAG_MISC_SUPERNATIONAL,
|
||||
TAG_END
|
||||
};
|
||||
|
||||
@ -67,7 +66,6 @@ xml_loadsave_misc_end_element (GMarkupParseContext *context,
|
||||
tag == TAG_SYMBOL ||
|
||||
tag == TAG_SID ||
|
||||
tag == TAG_MISC_ALLCUP ||
|
||||
tag == TAG_MISC_SUPERNATIONAL ||
|
||||
tag == TAG_MISC_COUNTER ||
|
||||
tag == TAG_MISC_SEASON ||
|
||||
tag == TAG_MISC_WEEK ||
|
||||
@ -113,8 +111,6 @@ xml_loadsave_misc_text (GMarkupParseContext *context,
|
||||
counters[countidx] = int_value;
|
||||
else if(state == TAG_MISC_ALLCUP)
|
||||
g_ptr_array_add(acps, cup_from_clid(int_value));
|
||||
else if(state == TAG_MISC_SUPERNATIONAL)
|
||||
country.supernational = int_value;
|
||||
}
|
||||
|
||||
|
||||
@ -175,7 +171,6 @@ xml_loadsave_misc_write(const gchar *prefix)
|
||||
xml_write_g_string(fil, country.name, TAG_NAME, I0);
|
||||
xml_write_g_string(fil, country.symbol, TAG_SYMBOL, I0);
|
||||
xml_write_g_string(fil, country.sid, TAG_SID, I0);
|
||||
xml_write_int(fil, country.supernational, TAG_MISC_SUPERNATIONAL, I0);
|
||||
xml_write_int(fil, season, TAG_MISC_SEASON, I0);
|
||||
xml_write_int(fil, week, TAG_MISC_WEEK, I0);
|
||||
xml_write_int(fil, week_round, TAG_MISC_WEEK_ROUND, I0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user