"Supernational countries."

This commit is contained in:
gyboth 2005-06-22 17:44:33 +00:00
parent b79f54177a
commit a0074cc159
12 changed files with 134 additions and 62 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-06-22 18:03+0200\n"
"POT-Creation-Date: 2005-06-22 19:41+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"
@ -71,7 +71,7 @@ msgid ""
"player's value. Do you accept?"
msgstr ""
#: src/callback_func.c:383 src/callbacks.c:529
#: src/callback_func.c:383 src/callbacks.c:533
msgid "Your offer has been removed."
msgstr ""
@ -148,77 +148,93 @@ msgstr ""
msgid "The current game state is unsaved and will be lost. Continue?"
msgstr ""
#: src/callbacks.c:148
#: src/callbacks.c:146 src/callbacks.c:397
msgid "Transfers are disabled in this country definition."
msgstr ""
#: src/callbacks.c:150
msgid "Left click to make an offer. Right click to remove offer."
msgstr ""
#: src/callbacks.c:155
#: src/callbacks.c:157
msgid "The transfer deadline is over."
msgstr ""
#: src/callbacks.c:164 src/callbacks.c:557 src/callbacks.c:574
#: src/callbacks.c:166 src/callbacks.c:561 src/callbacks.c:578
msgid "You still have some transfer business to manage."
msgstr ""
#: src/callbacks.c:168
#: src/callbacks.c:170
msgid "At least one user didn't take his turn this week. Continue?"
msgstr ""
#: src/callbacks.c:174
#: src/callbacks.c:176
msgid "There are injured or banned players in one of the user teams. Continue?"
msgstr ""
#: src/callbacks.c:379
#: src/callbacks.c:381
msgid "This is your first season."
msgstr ""
#: src/callbacks.c:395 src/callbacks.c:411 src/callbacks.c:427
#: src/callbacks.c:445 src/callbacks.c:766 src/callbacks.c:782
#: src/callbacks.c:399 src/callbacks.c:415 src/callbacks.c:431
#: src/callbacks.c:449 src/callbacks.c:788 src/callbacks.c:804
msgid "You haven't selected a player."
msgstr ""
#: src/callbacks.c:397
#: src/callbacks.c:401
msgid "The player is already on the list."
msgstr ""
#: src/callbacks.c:413
#: src/callbacks.c:417
msgid "The player is not on the list."
msgstr ""
#: src/callbacks.c:429
#: src/callbacks.c:433
msgid "Your team can't have less than 11 players."
msgstr ""
#: src/callbacks.c:450
#: src/callbacks.c:454
msgid "Penalty/free kick shooter deselected."
msgstr ""
#: src/callbacks.c:456
#: src/callbacks.c:460
#, c-format
msgid "%s will shoot penalties and free kicks when he plays."
msgstr ""
#: src/callbacks.c:531
#: src/callbacks.c:535
msgid "You haven't made an offer for the player."
msgstr ""
#: src/callbacks.c:590
#: src/callbacks.c:594
msgid "Enter a structure. The digits must sum up to 10."
msgstr ""
#: src/callbacks.c:591
#: src/callbacks.c:595
msgid "Structure"
msgstr ""
#: src/callbacks.c:624 src/callbacks.c:640
#: src/callbacks.c:628 src/callbacks.c:644
msgid "No match stored."
msgstr ""
#: src/callbacks.c:733
#: src/callbacks.c:738
msgid "Finances are disabled in this country definition."
msgstr ""
#: src/callbacks.c:743
msgid ""
"Left-click: get loan; Right-click: pay back; Middle click: stadium window."
msgstr ""
#: src/callbacks.c:757
msgid "Stadium management is disabled in this country definition."
msgstr ""
#: src/callbacks.c:782
msgid "Contracts are disabled in this country definition."
msgstr ""
#: src/cup.c:765
msgid " -- Second leg"
msgstr ""
@ -252,24 +268,24 @@ msgstr ""
msgid "Quarter-final"
msgstr ""
#: src/finance.c:97
#: src/finance.c:100
msgid "You have to pay back your loan this week."
msgstr ""
#: src/finance.c:101
#: src/finance.c:104
msgid "Your bank account has to be above your drawing credit limit next week."
msgstr ""
#: src/finance.c:164
#: src/finance.c:167
#, c-format
msgid "You have %d weeks to pay back your loan."
msgstr ""
#: src/finance.c:187
#: src/finance.c:190
msgid "You are free from debt."
msgstr ""
#: src/finance.c:194
#: src/finance.c:197
#, c-format
msgid "You have %d weeks to pay back the rest of your loan."
msgstr ""
@ -294,11 +310,11 @@ msgstr ""
msgid " (OG)"
msgstr ""
#: src/game_gui.c:317
#: src/game_gui.c:325
msgid "Next week you'll fire him and hire a new one."
msgstr ""
#: src/game_gui.c:511
#: src/game_gui.c:519
#, c-format
msgid ""
"The team owners have fired you because of financial mismanagement. Luckily, "
@ -306,7 +322,7 @@ msgid ""
"some information on %s:"
msgstr ""
#: src/game_gui.c:514
#: src/game_gui.c:522
#, c-format
msgid ""
"The team owners have fired you because of unsuccessfulness. Luckily, the "
@ -314,49 +330,49 @@ msgid ""
"information on %s:"
msgstr ""
#: src/game_gui.c:517
#: src/game_gui.c:525
#, 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:520
#: src/game_gui.c:528
msgid "Accept?"
msgstr ""
#: src/game_gui.c:522
#: src/game_gui.c:530
msgid " (NOTE: If you don't, the game is over for you.)"
msgstr ""
#: src/game_gui.c:573
#: src/game_gui.c:581
#, c-format
msgid "Job offers set to %s."
msgstr ""
#: src/game_gui.c:580
#: src/game_gui.c:588
#, c-format
msgid "Live game set to %s."
msgstr ""
#: src/game_gui.c:587
#: src/game_gui.c:595
#, c-format
msgid "Overwrite set to %s."
msgstr ""
#: src/game_gui.c:607
#: src/game_gui.c:615
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:609
#: src/game_gui.c:617
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:611
#: src/game_gui.c:619
msgid ""
"\n"
"If you feel you've found out something about the game that has to be shared, "
@ -1568,7 +1584,7 @@ msgstr ""
msgid "Average skill:"
msgstr ""
#: src/misc2_interface.c:221 src/player.c:1134 src/treeview_helper.c:1082
#: src/misc2_interface.c:221 src/player.c:1136 src/treeview_helper.c:1082
msgid "OK"
msgstr ""
@ -2211,52 +2227,52 @@ msgstr ""
msgid "You can't replace a banned player."
msgstr ""
#: src/player.c:1027
#: src/player.c:1029
#, c-format
msgid "%s's contract expires in %.1f years."
msgstr ""
#: src/player.c:1137
#: src/player.c:1139
msgid "Concussion"
msgstr ""
#: src/player.c:1140
#: src/player.c:1142
msgid "Pulled muscle"
msgstr ""
#: src/player.c:1143
#: src/player.c:1145
msgid "Hamstring"
msgstr ""
#: src/player.c:1146
#: src/player.c:1148
msgid "Groin injury"
msgstr ""
#: src/player.c:1149
#: src/player.c:1151
msgid "Fractured ankle"
msgstr ""
#: src/player.c:1152
#: src/player.c:1154
msgid "Broken rib"
msgstr ""
#: src/player.c:1155
#: src/player.c:1157
msgid "Broken leg"
msgstr ""
#: src/player.c:1158
#: src/player.c:1160
msgid "Broken ankle"
msgstr ""
#: src/player.c:1161
#: src/player.c:1163
msgid "Broken arm"
msgstr ""
#: src/player.c:1164
#: src/player.c:1166
msgid "Broken shoulder"
msgstr ""
#: src/player.c:1167
#: src/player.c:1169
msgid "Torn crucial ligament"
msgstr ""
@ -2317,7 +2333,7 @@ msgstr ""
msgid "W "
msgstr ""
#: src/transfer.c:434
#: src/transfer.c:435
#, c-format
msgid "%s has been added to the transfer list for %d weeks."
msgstr ""

View File

@ -102,6 +102,10 @@ 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

View File

@ -142,7 +142,9 @@ void
on_button_transfers_clicked (GtkButton *button,
gpointer user_data)
{
if(week < transfer_get_deadline())
if(country.supernational)
game_gui_print_message(_("Transfers are disabled in this country definition."));
else if(week < transfer_get_deadline())
{
stat0 = STATUS_SHOW_TRANSFER_LIST;
game_gui_print_message(_("Left click to make an offer. Right click to remove offer."));
@ -391,7 +393,9 @@ void
on_menu_put_on_transfer_list_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
if(selected_row[0] == -1)
if(country.supernational)
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."));
else if(query_transfer_player_is_on_list(player_of_idx_team(current_user.tm, selected_row[0])))
game_gui_print_message(_("The player is already on the list."));
@ -729,6 +733,12 @@ void
on_menu_show_finances_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
if(country.supernational)
{
game_gui_print_message(_("Finances are disabled in this country definition."));
return;
}
stat0 = STATUS_SHOW_FINANCES;
game_gui_print_message(_("Left-click: get loan; Right-click: pay back; Middle click: stadium window."));
treeview_show_finances(GTK_TREE_VIEW(lookup_widget(window.main, "treeview_right")),
@ -742,6 +752,12 @@ void
on_menu_show_stadium_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
if(country.supernational)
{
game_gui_print_message(_("Stadium management is disabled in this country definition."));
return;
}
window_show_stadium();
}
@ -761,6 +777,12 @@ void
on_menu_offer_new_contract_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
if(country.supernational)
{
game_gui_print_message(_("Contracts are disabled in this country definition."));
return;
}
if(selected_row[0] == -1)
{
game_gui_print_message(_("You haven't selected a player."));

View File

@ -25,6 +25,9 @@ finance_update_user_weekly(User *user)
const_float("float_finance_scout_factor3"),
const_float("float_finance_scout_factor4")};
if(country.supernational)
return;
if(week % 2 == 1)
{
for(i=0;i<MON_OUT_END;i++)

View File

@ -252,7 +252,7 @@ game_initialize(Fixture *fix)
ticket_income =
fix->attendance * const_int("int_team_stadium_ticket_price");
if(user_idx[0] != -1 && fix->home_advantage)
if(!country.supernational && 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;

View File

@ -199,8 +199,16 @@ 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);
misc_print_grouped_int(current_user.money, buf, FALSE);
gtk_label_set_text(label_money, buf);
if(!country.supernational)
{
misc_print_grouped_int(current_user.money, buf, FALSE);
gtk_label_set_text(label_money, buf);
}
else
{
gtk_widget_hide(GTK_WIDGET(label_money));
gtk_widget_hide(GTK_WIDGET(lookup_widget(window.main, "label34")));
}
gui_label_set_text_from_int(label_rank,
team_get_league_rank(current_user.tm), FALSE);

View File

@ -29,6 +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;

View File

@ -1017,12 +1017,14 @@ player_update_weekly(Team *tm, gint idx)
if(debug < 50)
{
pl->age += 0.0192;
pl->contract -= 0.0192;
if(!country.supernational)
pl->contract -= 0.0192;
}
if(pl->contract * 12 <= opt_user_int("int_opt_user_contract_limit") &&
(pl->contract + 0.0192) * 12 > opt_user_int("int_opt_user_contract_limit") &&
debug < 50)
if(!country.supernational && 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"))
{
sprintf(buf, _("%s's contract expires in %.1f years."),
pl->name->str, pl->contract);

View File

@ -19,7 +19,8 @@ transfer_update(void)
{
gint i, j;
if(week > transfer_get_deadline())
if(week > transfer_get_deadline() ||
country.supernational)
return;
if(week == transfer_get_deadline())

View File

@ -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] = 1;
user->counters[COUNT_USER_NEW_SPONSOR] = (country.supernational) ? -5 : 1;
}

View File

@ -13,6 +13,7 @@
#define TAG_NAME "name"
#define TAG_SYMBOL "symbol"
#define TAG_SID "sid"
#define TAG_SUPERNATIONAL "supernational"
#define TAG_LEAGUES "leagues"
#define TAG_LEAGUE "league"
#define TAG_CUPS "cups"
@ -27,6 +28,7 @@ enum XmlCountryStates
STATE_NAME,
STATE_SYMBOL,
STATE_SID,
STATE_SUPERNATIONAL,
STATE_LEAGUES,
STATE_LEAGUE,
STATE_CUPS,
@ -59,6 +61,8 @@ xml_country_read_start_element (GMarkupParseContext *context,
state = STATE_SYMBOL;
else if(strcmp(element_name, TAG_SID) == 0)
state = STATE_SID;
else if(strcmp(element_name, TAG_SUPERNATIONAL) == 0)
state = STATE_SUPERNATIONAL;
else if(strcmp(element_name, TAG_LEAGUES) == 0)
{
state = STATE_LEAGUES;
@ -94,6 +98,7 @@ xml_country_read_end_element (GMarkupParseContext *context,
if(strcmp(element_name, TAG_NAME) == 0 ||
strcmp(element_name, TAG_SYMBOL) == 0 ||
strcmp(element_name, TAG_SID) == 0 ||
strcmp(element_name, TAG_SUPERNATIONAL) == 0 ||
strcmp(element_name, TAG_LEAGUES) == 0 ||
strcmp(element_name, TAG_CUPS) == 0)
state = STATE_COUNTRY;
@ -121,16 +126,21 @@ xml_country_read_text (GMarkupParseContext *context,
GError **error)
{
gchar buf[text_len + 1];
gint int_value;
strncpy(buf, text, text_len);
buf[text_len] = '\0';
int_value = (gint)g_ascii_strtod(buf, NULL);
if(state == STATE_NAME)
country.name = g_string_new(buf);
else if(state == STATE_SYMBOL)
country.symbol = g_string_new(buf);
else if(state == STATE_SID)
country.sid = g_string_new(buf);
else if(state == STATE_SUPERNATIONAL)
country.supernational = int_value;
else if(state == STATE_LEAGUE)
xml_league_read(buf, ligs);
else if(state == STATE_CUP)

View File

@ -15,6 +15,7 @@ enum XmlLoadSaveCountryTags
TAG_MISC_WEEK_ROUND,
TAG_MISC_COUNTER,
TAG_MISC_ALLCUP,
TAG_MISC_SUPERNATIONAL,
TAG_END
};
@ -66,6 +67,7 @@ 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 ||
@ -111,6 +113,8 @@ 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;
}
@ -171,6 +175,7 @@ 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);