1
1
mirror of https://github.com/tstellar/bygfoot.git synced 2025-01-31 07:54:50 +01:00

"Transfer changes."

This commit is contained in:
gyboth 2005-05-27 18:48:36 +00:00
parent c2a293550b
commit 7fa6160cef
19 changed files with 527 additions and 317 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-05-26 18:52+0200\n"
"POT-Creation-Date: 2005-05-27 20: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"
@ -46,34 +46,69 @@ msgstr ""
msgid "Payback"
msgstr ""
#: src/callback_func.c:295
#: src/callback_func.c:305
msgid " more"
msgstr ""
#: src/callback_func.c:307
msgid " less"
msgstr ""
#: src/callback_func.c:309
#, c-format
msgid ""
"%s would like to buy %s. They offer %s for him, which is %s than the "
"player's value. Do you accept?"
msgstr ""
#: src/callback_func.c:333 src/callbacks.c:528
msgid "Your offer has been removed."
msgstr ""
#: src/callback_func.c:339
msgid "Your roster is already full. You can't buy more players."
msgstr ""
#: src/callback_func.c:299
#: src/callback_func.c:346
#, c-format
msgid ""
"You offered a transfer fee of %s and a wage of %s for %s. The owners and the "
"player are satisfied with your offer. Do you still want to buy the player?"
msgstr ""
#: src/callback_func.c:372
msgid "The team owners are considering your offer currently."
msgstr ""
#: src/callback_func.c:377
msgid ""
"The player is locked (the team owners are considering an offer currently)."
msgstr ""
#: src/callback_func.c:382
#, c-format
msgid ""
"You are making an offer for %s. Your scout's recommendations for value and "
"wage are preset."
msgstr ""
#: src/callback_func.c:304
#: src/callback_func.c:387
msgid "Fee"
msgstr ""
#: src/callback_func.c:305 src/treeview.c:257 src/treeview.c:1851
#: src/callback_func.c:388 src/treeview.c:257 src/treeview.c:1851
msgid "Wage"
msgstr ""
#: src/callback_func.c:322
#: src/callback_func.c:405
msgid "You can't offer a new contract if the old one is still above 2 years."
msgstr ""
#: src/callback_func.c:327
#: src/callback_func.c:410
msgid "The player won't negotiate with you anymore."
msgstr ""
#: src/callback_func.c:341
#: src/callback_func.c:424
#, c-format
msgid ""
"You are negotiating with %s about a new contract. Pay attention to what "
@ -83,7 +118,7 @@ msgid ""
"Your scout's recommendations are preset:"
msgstr ""
#: src/callback_func.c:461
#: src/callback_func.c:544
#, c-format
msgid ""
"You want to fire %s. Since his contract expires in %.1f years, he demands a "
@ -103,7 +138,7 @@ msgid "This is your first season."
msgstr ""
#: src/callbacks.c:394 src/callbacks.c:410 src/callbacks.c:426
#: src/callbacks.c:444 src/callbacks.c:740 src/callbacks.c:756
#: src/callbacks.c:444 src/callbacks.c:742 src/callbacks.c:758
msgid "You haven't selected a player."
msgstr ""
@ -128,23 +163,19 @@ msgstr ""
msgid "%s will shoot penalties and free kicks when he plays."
msgstr ""
#: src/callbacks.c:526
msgid "Your offer has been removed."
msgstr ""
#: src/callbacks.c:528
#: src/callbacks.c:530
msgid "You haven't made an offer for the player."
msgstr ""
#: src/callbacks.c:577
#: src/callbacks.c:579
msgid "Enter a structure. The digits must sum up to 10."
msgstr ""
#: src/callbacks.c:578
#: src/callbacks.c:580
msgid "Structure"
msgstr ""
#: src/callbacks.c:611 src/callbacks.c:627
#: src/callbacks.c:613 src/callbacks.c:629
msgid "No match stored."
msgstr ""
@ -1275,22 +1306,22 @@ msgstr ""
msgid "You didn't have enough money to buy %s or your roster was full."
msgstr ""
#: src/misc2_callback_func.c:76
#: src/misc2_callback_func.c:97
#, c-format
msgid "The structure value %d is invalid."
msgstr ""
#: src/misc2_callback_func.c:116
#: src/misc2_callback_func.c:137
#, c-format
msgid "%s accepts your offer."
msgstr ""
#: src/misc2_callback_func.c:125
#: src/misc2_callback_func.c:146
#, c-format
msgid "%s rejects your offer. You may still make %d offers."
msgstr ""
#: src/misc2_callback_func.c:132
#: src/misc2_callback_func.c:153
#, c-format
msgid ""
"%s rejects your offer and won't negotiate with you anymore. You should sell "
@ -1305,11 +1336,11 @@ msgstr ""
msgid "Your offer will be considered next week."
msgstr ""
#: src/misc2_callbacks.c:264
#: src/misc2_callbacks.c:267
msgid "You can't play Bygfoot without users!"
msgstr ""
#: src/misc2_callbacks.c:269
#: src/misc2_callbacks.c:272
#, c-format
msgid "Remove user %s from the game?"
msgstr ""
@ -1352,7 +1383,7 @@ msgstr ""
msgid "Average skill:"
msgstr ""
#: src/misc2_interface.c:221 src/player.c:1068 src/treeview_helper.c:1033
#: src/misc2_interface.c:221 src/player.c:1068 src/treeview_helper.c:1063
msgid "OK"
msgstr ""
@ -2011,7 +2042,7 @@ msgstr ""
msgid "ON"
msgstr ""
#: src/transfer.c:428
#: src/transfer.c:416
#, c-format
msgid "%s has been added to the transfer list for %d weeks."
msgstr ""
@ -2086,7 +2117,7 @@ msgstr ""
msgid "Goals (regular)"
msgstr ""
#: src/treeview.c:651 src/treeview_helper.c:720
#: src/treeview.c:651 src/treeview_helper.c:721
msgid "Shots"
msgstr ""
@ -2106,11 +2137,11 @@ msgstr ""
msgid "Fouls"
msgstr ""
#: src/treeview.c:656 src/treeview_helper.c:721
#: src/treeview.c:656 src/treeview_helper.c:722
msgid "Yellows"
msgstr ""
#: src/treeview.c:657 src/treeview_helper.c:722
#: src/treeview.c:657 src/treeview_helper.c:723
msgid "Reds"
msgstr ""
@ -2337,7 +2368,7 @@ msgstr ""
msgid "Latest results"
msgstr ""
#: src/treeview.c:1602 src/treeview.c:2083 src/treeview_helper.c:719
#: src/treeview.c:1602 src/treeview.c:2083 src/treeview_helper.c:720
msgid "Goals"
msgstr ""
@ -2444,69 +2475,69 @@ msgstr ""
msgid "Season %d"
msgstr ""
#: src/treeview_helper.c:704
#: src/treeview_helper.c:705
msgid "Player doesn't negotiate anymore"
msgstr ""
#: src/treeview_helper.c:706
#: src/treeview_helper.c:707
msgid "Player accepts new offers"
msgstr ""
#: src/treeview_helper.c:718
#: src/treeview_helper.c:719
msgid "Games"
msgstr ""
#: src/treeview_helper.c:738
#: src/treeview_helper.c:739
#, c-format
msgid ""
"\n"
"Goals/Game %.1f Save %% %.1f"
msgstr ""
#: src/treeview_helper.c:745
#: src/treeview_helper.c:746
#, c-format
msgid ""
"\n"
"Goals/Game %.1f Shot %% %.1f"
msgstr ""
#: src/treeview_helper.c:768
#: src/treeview_helper.c:769
#, c-format
msgid "%s: %d weeks\n"
msgstr ""
#: src/treeview_helper.c:803
#: src/treeview_helper.c:804
#, c-format
msgid "%s: %d (no limit)\n"
msgstr ""
#: src/treeview_helper.c:885
#: src/treeview_helper.c:953
msgid " (P)"
msgstr ""
#: src/treeview_helper.c:1019
#: src/treeview_helper.c:1049
#, c-format
msgid "INJ(%d)"
msgstr ""
#: src/treeview_helper.c:1028
#: src/treeview_helper.c:1058
#, c-format
msgid "BAN(%d)"
msgstr ""
#: src/treeview_helper.c:1100
#: src/treeview_helper.c:1130
msgid "G"
msgstr ""
#: src/treeview_helper.c:1107
#: src/treeview_helper.c:1137
msgid "D"
msgstr ""
#: src/treeview_helper.c:1114
#: src/treeview_helper.c:1144
msgid "M"
msgstr ""
#: src/treeview_helper.c:1121
#: src/treeview_helper.c:1151
msgid "F"
msgstr ""
@ -2517,19 +2548,19 @@ msgid ""
"There are rumours they're looking for a new manager."
msgstr ""
#: src/user.c:418
#: src/user.c:417
#, c-format
msgid "%s has left your team because his contract expired."
msgstr ""
#: src/user.c:442
#: src/user.c:441
#, c-format
msgid ""
"You have overdrawn your bank account. The team owners give you %d weeks to "
"get above your drawing credit limit."
msgstr ""
#: src/user.c:444
#: src/user.c:443
#, c-format
msgid ""
"You have overdrawn your bank account once again. Bear in mind that after the "
@ -2537,132 +2568,124 @@ msgid ""
"The team owners give you %d weeks to get above your drawing credit limit."
msgstr ""
#: src/user.c:450
#: src/user.c:447
#, c-format
msgid "Have a look at the transfer list, there's an offer for %s."
msgstr ""
#: src/user.c:452
#, c-format
msgid ""
"Your offer for %s has been accepted. If you still want to buy him, go to the "
"transfer list and left click on the player."
msgstr ""
#: src/user.c:459
#, c-format
msgid ""
"The owners of %s have rejected your offer (%s / %s) for %s. There was a "
"better offer for the player than yours."
msgstr ""
#: src/user.c:456
#: src/user.c:465
#, c-format
msgid ""
"The owners of %s have rejected your offer (%s / %s) for %s. Neither the fee "
"nor the wage you offered were acceptable, they say."
msgstr ""
#: src/user.c:462
#: src/user.c:471
#, c-format
msgid ""
"The owners of %s have rejected your offer (%s / %s) for %s. The team owners "
"weren't satisfied with the fee you offered."
msgstr ""
#: src/user.c:468
#: src/user.c:477
#, c-format
msgid ""
"%s of %s has rejected your offer (%s / %s). He wasn't satisfied with the "
"wage you offered."
msgstr ""
#: src/user.c:474
#: src/user.c:483
#, c-format
msgid "You didn't have enough money to buy %s from %s."
msgstr ""
#: src/user.c:479
#: src/user.c:488
#, c-format
msgid "Your roster is full. You couldn't buy %s from %s."
msgstr ""
#: src/user.c:484
#, c-format
msgid "Congratulations! The owners of %s have accepted your offer for %s!"
msgstr ""
#: src/user.c:495
msgid " more"
msgstr ""
#: src/user.c:497
msgid " less"
msgstr ""
#: src/user.c:499
#, c-format
msgid ""
"%s would like to buy %s. They offer %s for him, which is %s than the "
"player's value. Do you accept?"
msgstr ""
#: src/user.c:507
#: src/user.c:511
#, c-format
msgid ""
"%s's injury was so severe that he can't play football on a professional "
"level anymore. He leaves your team."
msgstr ""
#: src/user.c:510
#: src/user.c:514
msgid " Fortunately he's got a cousin who can help your team out."
msgstr ""
#: src/user.c:707
#: src/user.c:711
#, c-format
msgid "You start the game with %s in the %s."
msgstr ""
#: src/user.c:712
#: src/user.c:716
#, c-format
msgid ""
"%s fires you because of financial mismanagement.\n"
"You find a new job with %s in the %s."
msgstr ""
#: src/user.c:718
#: src/user.c:722
#, c-format
msgid ""
"%s fires you because of unsuccessfulness.\n"
"You find a new job with %s in the %s."
msgstr ""
#: src/user.c:724
#: src/user.c:728
#, c-format
msgid ""
"%s offer you a job in the %s.\n"
"You accept the challenge and leave %s."
msgstr ""
#: src/user.c:730
#: src/user.c:734
#, c-format
msgid "You finish the season in the %s on rank %d."
msgstr ""
#: src/user.c:735
#: src/user.c:739
#, c-format
msgid "You get promoted to the %s."
msgstr ""
#: src/user.c:739
#: src/user.c:743
#, c-format
msgid "You get relegated to the %s."
msgstr ""
#: src/user.c:743
#: src/user.c:747
#, c-format
msgid "You win the %s final against %s."
msgstr ""
#: src/user.c:748
#: src/user.c:752
#, c-format
msgid "You lose in the %s final against %s."
msgstr ""
#: src/user.c:754
#: src/user.c:758
#, c-format
msgid "You reach the %s (round %d) of the %s."
msgstr ""
#: src/user.c:759
#: src/user.c:763
#, c-format
msgid "You are champion of the %s!"
msgstr ""

174
po/de.po
View File

@ -10,8 +10,8 @@ msgid ""
msgstr ""
"Project-Id-Version: bygfoot 0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-05-26 18:52+0200\n"
"PO-Revision-Date: 2005-05-26 18:52+0200\n"
"POT-Creation-Date: 2005-05-27 20:41+0200\n"
"PO-Revision-Date: 2005-05-27 20:45+0200\n"
"Last-Translator: Gyz Both <gyboth@bygfoot.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -19,7 +19,7 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: src/treeview_helper.c:738
#: src/treeview_helper.c:739
#, c-format
msgid ""
"\n"
@ -28,7 +28,7 @@ msgstr ""
"\n"
"Tore/Spiel %.1f Abgewehrt %% %.1f"
#: src/treeview_helper.c:745
#: src/treeview_helper.c:746
#, c-format
msgid ""
"\n"
@ -67,7 +67,7 @@ msgstr " (N) "
msgid " (NOTE: If you don't, the game is over for you.)"
msgstr "(BEMERKUNG: Wenn Du ablehnst, ist das Spiel vorbei für Dich.)"
#: src/treeview_helper.c:885
#: src/treeview_helper.c:953
msgid " (P)"
msgstr " (E)"
@ -75,7 +75,7 @@ msgstr " (E)"
msgid " Autosave files "
msgstr "Dateien für Auto-Speichern"
#: src/user.c:510
#: src/user.c:514
msgid " Fortunately he's got a cousin who can help your team out."
msgstr "Glücklicherweise hat er einen Cousin, der einspringen kann."
@ -91,7 +91,7 @@ msgstr " Saison "
msgid " Week "
msgstr " Woche "
#: src/user.c:497
#: src/callback_func.c:307
msgid " less"
msgstr " weniger"
@ -99,7 +99,7 @@ msgstr " weniger"
msgid " months"
msgstr " Monaten"
#: src/user.c:495
#: src/callback_func.c:305
msgid " more"
msgstr " mehr"
@ -112,7 +112,7 @@ msgstr " Plätze"
msgid "%s Group %d"
msgstr "%s Gruppe %d"
#: src/misc2_callback_func.c:116
#: src/misc2_callback_func.c:137
#, c-format
msgid "%s accepts your offer."
msgstr "%s akzeptiert Dein Angebot."
@ -124,7 +124,7 @@ msgstr ""
"%s konnte sich %s nicht leisten, oder er hatte keinen Platz mehr in der "
"Mannschaft."
#: src/user.c:712
#: src/user.c:716
#, c-format
msgid ""
"%s fires you because of financial mismanagement.\n"
@ -133,7 +133,7 @@ msgstr ""
"%s feuert Dich wegen wirtschaftlicher Unfähigkeit.\n"
"Du bekommst eine neue Arbeit mit %s in der %s."
#: src/user.c:718
#: src/user.c:722
#, c-format
msgid ""
"%s fires you because of unsuccessfulness.\n"
@ -142,17 +142,17 @@ msgstr ""
"%s feuert Dich wegen Erfolglosigkeit.\n"
"Du bekommst eine neue Arbeit mit %s in der %s."
#: src/transfer.c:428
#: src/transfer.c:416
#, c-format
msgid "%s has been added to the transfer list for %d weeks."
msgstr "%s wurde für %d Wochen auf die Transferliste gesetzt."
#: src/user.c:418
#: src/user.c:417
#, c-format
msgid "%s has left your team because his contract expired."
msgstr "%s hat Deine Mannschaft verlassen, da sein Vertrag auslief."
#: src/user.c:468
#: src/user.c:477
#, c-format
msgid ""
"%s of %s has rejected your offer (%s / %s). He wasn't satisfied with the "
@ -161,7 +161,7 @@ msgstr ""
"%s von %s hat dein Angebot (%s / %s) abgelehnt. Er war mit dem angebotenen "
"Gehalt unzufrieden."
#: src/user.c:724
#: src/user.c:728
#, c-format
msgid ""
"%s offer you a job in the %s.\n"
@ -170,7 +170,7 @@ msgstr ""
"%s bieten dir einen neuen Job in der %s.\n"
"Du nimmst die Herausforderung an und verlässt %s."
#: src/misc2_callback_func.c:132
#: src/misc2_callback_func.c:153
#, c-format
msgid ""
"%s rejects your offer and won't negotiate with you anymore. You should sell "
@ -180,7 +180,7 @@ msgstr ""
"ihn verkaufen, bevor sein Vertrag ausläuft (andernfalls wird er Deine "
"Mannschaft einfach verlassen)."
#: src/misc2_callback_func.c:125
#: src/misc2_callback_func.c:146
#, c-format
msgid "%s rejects your offer. You may still make %d offers."
msgstr "%s lehnt Dein Angebot ab. Du kannst noch %d Angebote abgeben."
@ -190,7 +190,7 @@ msgstr "%s lehnt Dein Angebot ab. Du kannst noch %d Angebote abgeben."
msgid "%s will shoot penalties and free kicks when he plays."
msgstr "%s wird Elfmeter und Freistöße schießen wenn er spielt."
#: src/user.c:499
#: src/callback_func.c:309
#, c-format
msgid ""
"%s would like to buy %s. They offer %s for him, which is %s than the "
@ -204,7 +204,7 @@ msgstr ""
msgid "%s's contract expires in %.1f years."
msgstr "%ss Vertrag läuft in %.1f Jahren aus."
#: src/user.c:507
#: src/user.c:511
#, c-format
msgid ""
"%s's injury was so severe that he can't play football on a professional "
@ -213,12 +213,12 @@ msgstr ""
"%ss Verletzung war so schwerwiegend, dass er nicht mehr Profi-Fußball "
"spielen kann. Er verlässt Deine Mannschaft."
#: src/treeview_helper.c:803
#: src/treeview_helper.c:804
#, c-format
msgid "%s: %d (no limit)\n"
msgstr "%s: %d (keine Obergrenze)\n"
#: src/treeview_helper.c:768
#: src/treeview_helper.c:769
#, c-format
msgid "%s: %d weeks\n"
msgstr "%s: %d Wochen\n"
@ -479,7 +479,7 @@ msgstr "Die Auswärtsfans haben Sitze entzündet"
msgid "BALANCED"
msgstr "AUSGEGLICHEN"
#: src/treeview_helper.c:1028
#: src/treeview_helper.c:1058
#, c-format
msgid "BAN(%d)"
msgstr "SP(%d)"
@ -675,11 +675,6 @@ msgstr "Schließen bestätigen wenn nicht gespeichert"
msgid "Confirm when unfit"
msgstr "Bestätigen wenn nicht fit"
#: src/user.c:484
#, c-format
msgid "Congratulations! The owners of %s have accepted your offer for %s!"
msgstr "Glückwunsch! Die Besitzer von %s haben Dein Angebot für %s angenommen!"
#: src/options_interface.c:310
msgid "Constants file "
msgstr "Konstanten-Datei"
@ -737,7 +732,7 @@ msgstr "Aktuelle Sicherheit"
msgid "Current skill"
msgstr "Aktuelle Fähigkeit"
#: src/treeview_helper.c:1107
#: src/treeview_helper.c:1137
msgid "D"
msgstr "V"
@ -795,7 +790,7 @@ msgstr "GTal"
msgid "Easy save for the goalkeeper"
msgstr "Ein dankbarer Ball für den Torhüter"
#: src/callbacks.c:577
#: src/callbacks.c:579
msgid "Enter a structure. The digits must sum up to 10."
msgstr "Spielsystem eingeben. Die Ziffern müssen sich zu 10 aufsummieren."
@ -833,7 +828,7 @@ msgstr "Ausgaben"
msgid "Extremely high boot from P2 sends P1 to the ground"
msgstr "Hohes Bein von P2 schickt P1 zu Boden"
#: src/treeview_helper.c:1121
#: src/treeview_helper.c:1151
msgid "F"
msgstr "A"
@ -841,7 +836,7 @@ msgstr "A"
msgid "F_igures"
msgstr "Z_ahlen"
#: src/callback_func.c:304
#: src/callback_func.c:387
msgid "Fee"
msgstr "Ablösesumme"
@ -929,7 +924,7 @@ msgstr "Freistoß: P1 schießt aus großer Entfernung"
msgid "Free kick: P1 plays the ball out wide"
msgstr "Freistoß: P1 schlenzt den Ball über die Mauer"
#: src/treeview_helper.c:1100
#: src/treeview_helper.c:1130
msgid "G"
msgstr "T"
@ -949,7 +944,7 @@ msgstr "KT"
msgid "Ga"
msgstr "Sp"
#: src/treeview_helper.c:718
#: src/treeview_helper.c:719
msgid "Games"
msgstr "Spiele"
@ -977,7 +972,7 @@ msgstr "To/Sp"
msgid "Goal!!!"
msgstr "Tor!!!"
#: src/treeview.c:1602 src/treeview.c:2083 src/treeview_helper.c:719
#: src/treeview.c:1602 src/treeview.c:2083 src/treeview_helper.c:720
msgid "Goals"
msgstr "Tore"
@ -1015,6 +1010,11 @@ msgstr "Leistenverletzung"
msgid "Hamstring"
msgstr "Sehnenverletzung"
#: src/user.c:447
#, c-format
msgid "Have a look at the transfer list, there's an offer for %s."
msgstr "Schau mal auf die Transferliste, es gibt ein Angebot für %s."
#: src/lg_commentary.c:197
msgid "He just floated in midair for ages then thunder heads it towards home"
msgstr ""
@ -1057,7 +1057,7 @@ msgstr ""
msgid "I'm suprised the post has managed to withstand that cracking shot"
msgstr "Ich bin überrascht, dass der Pfosten diesem Schuss standhielt"
#: src/treeview_helper.c:1019
#: src/treeview_helper.c:1049
#, c-format
msgid "INJ(%d)"
msgstr "VERL(%d)"
@ -1251,7 +1251,7 @@ msgstr "Schöner Pass von P2 eröffnet den Raum vor P1"
msgid "Low shot taken well to his left by P2"
msgstr "Ein Flachschuss, gut abgewehrt von P2"
#: src/treeview_helper.c:1114
#: src/treeview_helper.c:1144
msgid "M"
msgstr "M"
@ -1332,7 +1332,7 @@ msgstr "Nächste Woche feuerst Du ihn und stellst einen neuen ein."
msgid "No improvements currently in progress."
msgstr "Zur Zeit keine Verbesserungen im Gange."
#: src/callbacks.c:611 src/callbacks.c:627
#: src/callbacks.c:613 src/callbacks.c:629
msgid "No match stored."
msgstr "Kein Spiel gespeichert."
@ -1344,7 +1344,7 @@ msgstr "Zahlen..."
msgid "OFF"
msgstr "AUS"
#: src/misc2_interface.c:221 src/player.c:1068 src/treeview_helper.c:1033
#: src/misc2_interface.c:221 src/player.c:1068 src/treeview_helper.c:1063
msgid "OK"
msgstr "OK"
@ -1718,7 +1718,7 @@ msgstr "Elfmeter/Freistoßschütze abgewählt."
msgid "Physio"
msgstr "Physio"
#: src/treeview_helper.c:706
#: src/treeview_helper.c:707
msgid "Player accepts new offers"
msgstr "Spieler akzeptiert neue Vertragsangebote"
@ -1730,7 +1730,7 @@ msgstr "Spielereigenschaftspräzision"
msgid "Player attributes shown"
msgstr "Sichtbare Spielereigenschaften"
#: src/treeview_helper.c:704
#: src/treeview_helper.c:705
msgid "Player doesn't negotiate anymore"
msgstr "Spieler verhandelt nicht mehr"
@ -1834,7 +1834,7 @@ msgstr "Rang "
msgid "Rearrange team"
msgstr "Sortiere Mannschaft"
#: src/treeview.c:657 src/treeview_helper.c:722
#: src/treeview.c:657 src/treeview_helper.c:723
msgid "Reds"
msgstr "Rote K."
@ -1850,7 +1850,7 @@ msgstr "Lade die Konstanten-Datei neu"
msgid "Remove from transfer list"
msgstr "Entferne von Transferliste"
#: src/misc2_callbacks.c:269
#: src/misc2_callbacks.c:272
#, c-format
msgid "Remove user %s from the game?"
msgstr "Entferne Benutzer %s aus dem Spiel?"
@ -1894,7 +1894,8 @@ msgstr "Sicherheit (%)"
#: src/misc_callback_func.c:204
msgid "Safety improvement too high, reset to highest possible value."
msgstr "Sicherheitsverbesserung ist zu hoch, setze zurück auf größtmöglichen Wert."
msgstr ""
"Sicherheitsverbesserung ist zu hoch, setze zurück auf größtmöglichen Wert."
#: src/treeview.c:2063
msgid "Save %"
@ -1961,7 +1962,7 @@ msgstr "Gelupfter Freistoß von P1"
msgid "Shot %"
msgstr "Schuss %"
#: src/treeview.c:651 src/treeview_helper.c:720
#: src/treeview.c:651 src/treeview_helper.c:721
msgid "Shots"
msgstr "Schüsse"
@ -2097,7 +2098,7 @@ msgstr "Status "
msgid "Status:"
msgstr "Status:"
#: src/callbacks.c:578
#: src/callbacks.c:580
msgid "Structure"
msgstr "Spielsystem"
@ -2239,7 +2240,7 @@ msgstr ""
"Das Management von %s ist unzufrieden mit den letzten Leistungen der "
"Mannschaft. Es gibt Gerüchte, wonach ein neuer Trainer gesucht wird."
#: src/user.c:456
#: src/user.c:465
#, c-format
msgid ""
"The owners of %s have rejected your offer (%s / %s) for %s. Neither the fee "
@ -2248,7 +2249,7 @@ msgstr ""
"Die Verantwortlichen von %s haben Dein Angebot (%s / %s) für %s abgelehnt. "
"Weder die Ablösesumme, noch das Gehalt war akzeptabel, sagen sie."
#: src/user.c:462
#: src/user.c:471
#, c-format
msgid ""
"The owners of %s have rejected your offer (%s / %s) for %s. The team owners "
@ -2257,7 +2258,7 @@ msgstr ""
"Die Verantwortlichen von %s haben Dein Angebot (%s / %s) für %s abgelehnt. "
"Sie waren mit der Ablösesumme unzufrieden."
#: src/user.c:450
#: src/user.c:459
#, c-format
msgid ""
"The owners of %s have rejected your offer (%s / %s) for %s. There was a "
@ -2274,11 +2275,16 @@ msgstr "Die Hooligans toben"
msgid "The player is already on the list."
msgstr "Der Spieler ist bereits auf der Liste."
#: src/callback_func.c:377
msgid ""
"The player is locked (the team owners are considering an offer currently)."
msgstr "Keine Angebote möglich (die Besitzer verhandeln gerade ein anderes Angebot)."
#: src/callbacks.c:412
msgid "The player is not on the list."
msgstr "Der Spieler ist nicht auf der Liste."
#: src/callback_func.c:327
#: src/callback_func.c:410
msgid "The player won't negotiate with you anymore."
msgstr "Der Spieler verhandelt nicht mehr."
@ -2301,11 +2307,15 @@ msgid ""
msgstr ""
"Die Ordner müssen eine Schlägerei zwischen den Fans unter Kontrolle bekommen"
#: src/misc2_callback_func.c:76
#: src/misc2_callback_func.c:97
#, c-format
msgid "The structure value %d is invalid."
msgstr "Der Wert %d ist ungültig."
#: src/callback_func.c:372
msgid "The team owners are considering your offer currently."
msgstr "Die Besitzer verhandeln gerade dein Angebot."
#: src/game_gui.c:497
#, c-format
msgid ""
@ -2412,7 +2422,7 @@ msgstr "G "
msgid "W %d : %d"
msgstr "G %d : %d"
#: src/callback_func.c:305 src/treeview.c:257 src/treeview.c:1851
#: src/callback_func.c:388 src/treeview.c:257 src/treeview.c:1851
msgid "Wage"
msgstr "Gehalt"
@ -2559,11 +2569,11 @@ msgstr "GK"
msgid "Yellow cards (limit)\n"
msgstr "Gelbe Karten (Obergrenze)\n"
#: src/treeview.c:656 src/treeview_helper.c:721
#: src/treeview.c:656 src/treeview_helper.c:722
msgid "Yellows"
msgstr "Gelbe K."
#: src/user.c:759
#: src/user.c:763
#, c-format
msgid "You are champion of the %s!"
msgstr "Du bist Meister der %s!"
@ -2572,7 +2582,7 @@ msgstr "Du bist Meister der %s!"
msgid "You are free from debt."
msgstr "Du bist schuldenfrei."
#: src/callback_func.c:299
#: src/callback_func.c:382
#, c-format
msgid ""
"You are making an offer for %s. Your scout's recommendations for value and "
@ -2581,7 +2591,7 @@ msgstr ""
"Du bietest für %s. Die Empfehlungen Deines Spielerbeobachters sind "
"voreingestellt."
#: src/callback_func.c:341
#: src/callback_func.c:424
#, c-format
msgid ""
"You are negotiating with %s about a new contract. Pay attention to what "
@ -2610,17 +2620,17 @@ msgstr "Du kannst höchstens %s zurückzahlen."
msgid "You can take out at most %s."
msgstr "Du kannst höchstens %s leihen."
#: src/callback_func.c:322
#: src/callback_func.c:405
msgid "You can't offer a new contract if the old one is still above 2 years."
msgstr ""
"Du kannst keinen neuen Vertrag aushandeln wenn die Laufzeit des alten "
"Vertrages über 2 Jahre beträgt."
#: src/misc2_callbacks.c:264
#: src/misc2_callbacks.c:267
msgid "You can't play Bygfoot without users!"
msgstr "Du kannst Bygfoot nicht ohne Benutzer spielen!"
#: src/user.c:474
#: src/user.c:483
#, c-format
msgid "You didn't have enough money to buy %s from %s."
msgstr "Du hattest nicht genügend Geld, um %s von %s zu kaufen."
@ -2640,17 +2650,17 @@ msgstr "Du hast nicht genügend Geld um zurückzuzahlen."
msgid "You don't have the money."
msgstr "Du hast nicht genügend Geld."
#: src/user.c:730
#: src/user.c:734
#, c-format
msgid "You finish the season in the %s on rank %d."
msgstr "Du beendest die Saison in der %s auf Rang %d."
#: src/user.c:735
#: src/user.c:739
#, c-format
msgid "You get promoted to the %s."
msgstr "Du steigst in die %s auf."
#: src/user.c:739
#: src/user.c:743
#, c-format
msgid "You get relegated to the %s."
msgstr "Du steigst in die %s ab."
@ -2665,7 +2675,7 @@ msgstr "Du hast %d Wochen, um den restlichen Kredit zurückzuzahlen."
msgid "You have %d weeks to pay back your loan."
msgstr "Du hast noch %d Wochen, um Deinen Kredit zurückzuzahlen."
#: src/user.c:444
#: src/user.c:443
#, c-format
msgid ""
"You have overdrawn your bank account once again. Bear in mind that after the "
@ -2677,7 +2687,7 @@ msgstr ""
"Die Verantwortlichen geben Dir %d Wochen, um wieder Deine Dispokreditgrenze "
"zu erreichen."
#: src/user.c:442
#: src/user.c:441
#, c-format
msgid ""
"You have overdrawn your bank account. The team owners give you %d weeks to "
@ -2698,31 +2708,38 @@ msgstr ""
msgid "You have to pay back your loan this week."
msgstr "Du musst Deinen Kredit diese Woche zurückzahlen."
#: src/callbacks.c:528
#: src/callbacks.c:530
msgid "You haven't made an offer for the player."
msgstr "Du hast kein Angebot für den Spieler abgegeben."
#: src/callbacks.c:394 src/callbacks.c:410 src/callbacks.c:426
#: src/callbacks.c:444 src/callbacks.c:740 src/callbacks.c:756
#: src/callbacks.c:444 src/callbacks.c:742 src/callbacks.c:758
msgid "You haven't selected a player."
msgstr "Du hast keinen Spieler ausgewählt."
#: src/user.c:748
#: src/user.c:752
#, c-format
msgid "You lose in the %s final against %s."
msgstr "Du verlierst das %s-Finale gegen %.s"
#: src/user.c:754
#: src/callback_func.c:346
#, c-format
msgid ""
"You offered a transfer fee of %s and a wage of %s for %s. The owners and the "
"player are satisfied with your offer. Do you still want to buy the player?"
msgstr "Du hast eine Ablösesumme von %s und ein Gehalt von %s für %s geboten. Die Besitzer und der Spieler sind zufrieden mit Deinem Angebot. Willst Du den Spieler nun kaufen?"
#: src/user.c:758
#, c-format
msgid "You reach the %s (round %d) of the %s."
msgstr "Du erreichst das %s (Runde %d) des %s."
#: src/user.c:707
#: src/user.c:711
#, c-format
msgid "You start the game with %s in the %s."
msgstr "Du beginnst das Spiel mit %s in der %s."
#: src/callback_func.c:461
#: src/callback_func.c:544
#, c-format
msgid ""
"You want to fire %s. Since his contract expires in %.1f years, he demands a "
@ -2731,7 +2748,7 @@ msgstr ""
"Du willst %s feuern. Da sein Vertrag in %.1f Jahren ausläuft, verlangt er %s "
"Abfindung. Einverstanden?"
#: src/user.c:743
#: src/user.c:747
#, c-format
msgid "You win the %s final against %s."
msgstr "Du gewinnst das %s Finale gegen %s."
@ -2744,7 +2761,14 @@ msgstr "Dein Konto muss nächste Woche Deinen Dispokredit übersteigen."
msgid "Your next opponent"
msgstr "Dein nächster Gegner"
#: src/callbacks.c:526
#: src/user.c:452
#, c-format
msgid ""
"Your offer for %s has been accepted. If you still want to buy him, go to the "
"transfer list and left click on the player."
msgstr "Dein Angebot für %s wurde akzeptiert. Wenn Du ihn immer noch kaufen willst, gehe zur Transferliste und rechts-klicke auf den Spieler."
#: src/callback_func.c:333 src/callbacks.c:528
msgid "Your offer has been removed."
msgstr "Dein Angebot wurde annulliert."
@ -2760,11 +2784,11 @@ msgstr "Dein Angebot wird nächste Woche verhandelt."
msgid "Your results"
msgstr "Deine Ergebnisse"
#: src/callback_func.c:295
#: src/callback_func.c:339
msgid "Your roster is already full. You can't buy more players."
msgstr "Es ist kein Platz mehr in Deiner Mannschaft für neue Spieler."
#: src/user.c:479
#: src/user.c:488
#, c-format
msgid "Your roster is full. You couldn't buy %s from %s."
msgstr "Deine Mannschaft ist voll. Du konntest %s nicht von %s kaufen."
@ -2812,3 +2836,7 @@ msgstr "_Mannschaft"
#: src/interface.c:566
msgid "_User"
msgstr "_Benutzer"
#~ msgid "Congratulations! The owners of %s have accepted your offer for %s!"
#~ msgstr ""
#~ "Glückwunsch! Die Besitzer von %s haben Dein Angebot für %s angenommen!"

View File

@ -46,7 +46,7 @@ bygfoot_SOURCES = \
team.c cup.h fixture.h game.h game_gui.h league.h maths.h misc.h option.h player.h team.h transfer.h user.h \
transfer.c cup.h finance.h free.h game_gui.h maths.h option.h player.h support.h team.h transfer.h treeview.h user.h \
treeview.c cup.h finance.h fixture.h free.h game.h league.h live_game.h maths.h misc.h player.h option.h support.h team.h transfer.h treeview.h treeview_helper.h user.h \
treeview_helper.c cup.h file.h fixture.h free.h league.h misc.h option.h player.h support.h team.h treeview.h treeview_helper.h user.h variables.h \
treeview_helper.c cup.h file.h fixture.h free.h league.h misc.h option.h player.h support.h team.h transfer.h treeview.h treeview_helper.h user.h variables.h \
user.c cup.h fixture.h free.h game_gui.h league.h live_game.h maths.h misc.h option.h player.h team.h transfer.h treeview.h user.h window.h \
window.c file.h finance.h free.h game_gui.h gui.h interface.h main.h misc_interface.h misc2_interface.h option.h support.h treeview.h treeview_helper.h user.h window.h \
xml.c cup.h file.h free.h gui.h league.h misc.h option.h support.h table.h transfer_struct.h user.h variables.h xml.h xml_loadsave_cup.h xml_loadsave_league.h xml_loadsave_teams.h xml_loadsave_fixtures.h xml_loadsave_table.h xml_loadsave_transfers.h xml_loadsave_users.h \

View File

@ -274,19 +274,63 @@ callback_pay_loan(void)
window_show_digits(buf, _("Payback"), max_payback, NULL, 0);
}
/** Handle a click on the transfer list.
/** Manage a click on a player of the current team on the
transfer list.
@param button The mouse button number.
@param idx The index of the selected player in the transfer list. */
void
callback_transfer_list_clicked(gint idx)
callback_transfer_list_user(gint button, gint idx)
{
gchar buf[SMALL];
Transfer *tr = &trans(idx);
gchar buf[SMALL],
buf2[SMALL], buf3[SMALL];
if(tr->tm == current_user.tm)
if(button == 3)
{
transfer_remove_player(idx);
on_button_transfers_clicked(NULL, NULL);
setsav0;
}
else if(button == 1)
{
if(trans(idx).offers->len == 0)
game_gui_print_message("There are no offers for the player.");
else
{
misc_print_grouped_int(transoff(idx, 0).fee, buf2, FALSE);
misc_print_grouped_int(ABS(transoff(idx, 0).fee -
player_of_id_team(current_user.tm,
trans(idx).id)->value), buf3, FALSE);
if(transoff(idx, 0).fee -
player_of_id_team(current_user.tm, trans(idx).id)->value > 0)
strcat(buf3, _(" more"));
else
strcat(buf3, _(" less"));
sprintf(buf, _("%s would like to buy %s. They offer %s for him, which is %s than the player's value. Do you accept?"), transoff(idx, 0).tm->name->str,
player_of_id_team(current_user.tm, trans(idx).id)->name->str,
buf2, buf3);
stat1 = STATUS_TRANSFER_OFFER_USER;
stat2 = idx;
window_show_yesno(buf);
}
}
}
/** Handle a click on a cpu player for which the offer
got accepted. */
void
callback_transfer_list_cpu(gint button, gint idx)
{
gchar buf[SMALL], buf2[SMALL], buf3[SMALL];
if(button == 2)
return;
if(button == 3)
{
g_array_remove_index(trans(idx).offers, 0);
trans(idx).locked = FALSE;
game_gui_print_message(_("Your offer has been removed."));
return;
}
@ -296,6 +340,45 @@ callback_transfer_list_clicked(gint idx)
return;
}
misc_print_grouped_int(transoff(idx, 0).fee, buf2, FALSE);
misc_print_grouped_int(transoff(idx, 0).wage, buf3, FALSE);
sprintf(buf, _("You offered a transfer fee of %s and a wage of %s for %s. The owners and the player are satisfied with your offer. Do you still want to buy the player?"),
buf2, buf3, player_of_id_team(trans(idx).tm, trans(idx).id)->name->str);
stat1 = STATUS_TRANSFER_OFFER_CPU;
stat2 = idx;
window_show_yesno(buf);
}
/** Handle a click on the transfer list.
@param button The mouse button number.
@param idx The index of the selected player in the transfer list. */
void
callback_transfer_list_clicked(gint button, gint idx)
{
gchar buf[SMALL];
Transfer *tr = &trans(idx);
if(tr->tm == current_user.tm)
{
callback_transfer_list_user(button, idx);
return;
}
else if(tr->locked)
{
if(transoff(idx, 0).tm == current_user.tm)
{
if(team_is_user(tr->tm) != -1)
game_gui_print_message(_("The team owners are considering your offer currently."));
else
callback_transfer_list_cpu(button, idx);
}
else
game_gui_print_message(_("The player is locked (the team owners are considering an offer currently)."));
return;
}
sprintf(buf, _("You are making an offer for %s. Your scout's recommendations for value and wage are preset."),
player_of_id_team(tr->tm, tr->id)->name->str);
stat1 = STATUS_SHOW_TRANSFER_LIST;

View File

@ -25,7 +25,7 @@ void
callback_get_loan(void);
void
callback_transfer_list_clicked(gint idx);
callback_transfer_list_clicked(gint button, gint idx);
void
callback_offer_new_contract(gint idx);

View File

@ -518,8 +518,10 @@ on_treeview_right_button_press_event (GtkWidget *widget,
switch(stat0)
{
case STATUS_SHOW_TRANSFER_LIST:
if(event->button == 1 || trans(idx - 1).tm == current_user.tm)
callback_transfer_list_clicked(idx - 1);
if(trans(idx - 1).tm == current_user.tm ||
trans(idx - 1).locked ||
event->button == 1)
callback_transfer_list_clicked(event->button, idx - 1);
else if(event->button == 3)
{
if(transfer_remove_offer(idx - 1, current_user.tm))

View File

@ -82,7 +82,8 @@ enum Status0Value
STATUS_JOB_OFFER_SUCCESS,
STATUS_JOB_OFFER_FIRE_FINANCE,
STATUS_JOB_OFFER_FIRE_FAILURE,
STATUS_TRANSFER_OFFER,
STATUS_TRANSFER_OFFER_USER,
STATUS_TRANSFER_OFFER_CPU,
STATUS_CUSTOM_STRUCTURE,
STATUS_SHOW_LEAGUE_RESULTS,
STATUS_SHOW_LEAGUE_STATS,

View File

@ -64,6 +64,27 @@ misc2_callback_transfer_user_player(void)
game_gui_set_main_window_header();
}
/** Transfer a cpu player to a user team. */
void
misc2_callback_transfer_cpu_player(void)
{
player_copy(player_of_id_team(trans(stat2).tm, trans(stat2).id),
current_user.tm, current_user.tm->players->len);
player_of_idx_team(current_user.tm, current_user.tm->players->len - 1)->contract =
(gfloat)math_rndi(const_int("int_transfer_contract_lower"),
const_int("int_transfer_contract_upper"));
player_of_idx_team(current_user.tm, current_user.tm->players->len - 1)->wage =
transoff(stat2, 0).wage;
user_from_team(current_user.tm)->money -= transoff(stat2, 0).fee;
user_from_team(current_user.tm)->money_out[1][MON_OUT_TRANSFERS] -=
transoff(stat2, 0).fee;
player_replace_by_new(player_of_id_team(trans(stat2).tm, trans(stat2).id), FALSE);
transfer_remove_player(stat2);
treeview_show_user_player_list();
game_gui_set_main_window_header();
}
/** Change the user team's structure to a value he's specified. */
gboolean
misc2_callback_change_structure(gint structure)

View File

@ -3,6 +3,9 @@
#include "bygfoot.h"
void
misc2_callback_transfer_cpu_player(void);
void
misc2_callback_transfer_user_player(void);

View File

@ -160,9 +160,12 @@ on_button_yesno_yes_clicked (GtkButton *button,
default:
g_warning("on_button_yesno_yes_clicked: unknown status %d\n", stat1);
break;
case STATUS_TRANSFER_OFFER:
case STATUS_TRANSFER_OFFER_USER:
misc2_callback_transfer_user_player();
break;
case STATUS_TRANSFER_OFFER_CPU:
misc2_callback_transfer_cpu_player();
break;
case STATUS_FIRE_PLAYER:
player_remove_from_team(current_user.tm, stat2);
current_user.money -= stat3;

View File

@ -15,7 +15,7 @@
void
transfer_update(void)
{
gint i;
gint i, j;
if(week > transfer_get_deadline())
return;
@ -27,6 +27,15 @@ transfer_update(void)
return;
}
for(i=transfer_list->len - 1;i>=0;i--)
{
trans(i).locked = FALSE;
for(j=trans(i).offers->len - 1;j>=0;j--)
g_array_remove_index(trans(i).offers, j);
}
transfer_add_new_players();
transfer_add_cpu_offers();
transfer_evaluate_offers();
for(i=transfer_list->len - 1;i>=0;i--)
@ -39,17 +48,14 @@ transfer_update(void)
transfer_remove_player(i);
}
}
transfer_add_new_players();
transfer_add_offers();
}
/** Add offers for the users' players on the list.
We also sort the offers from other users. */
void
transfer_add_offers(void)
transfer_add_cpu_offers(void)
{
gint i, j;
gint i;
gfloat scout_factor_bounds[4][2] =
{{const_float("float_transfer_offer_fee_best_lower"),
const_float("float_transfer_offer_fee_best_upper")},
@ -71,36 +77,6 @@ transfer_add_offers(void)
scout_factor_bounds[user_from_team(trans(i).tm)->scout % 10][0],
scout_factor_bounds[user_from_team(trans(i).tm)->scout % 10][1]))),
-1);
else if(team_is_user(trans(i).tm) != -1 &&
trans(i).offers->len > 1)
{
g_array_sort(trans(i).offers, transfer_offer_compare_func);
for(j=trans(i).offers->len - 1; j >= 0; j--)
if(transoff(i, j).fee > BUDGET(user_get_index(user_from_team(transoff(i, j).tm))))
{
user_event_add(user_from_team(transoff(i, j).tm),
EVENT_TYPE_TRANSFER_OFFER_MONEY, -1, -1,
trans(i).tm, player_of_id_team(trans(i).tm, trans(i).id)->name->str);
user_event_remove(user_from_team(trans(i).tm),
user_event_get_index(user_from_team(trans(i).tm),
EVENT_TYPE_TRANSFER_OFFER, trans(i).id,
-1, NULL, NULL));
g_array_remove_index(trans(i).offers, j);
}
for(j=trans(i).offers->len - 1; j >= 1; j--)
{
user_event_add(user_from_team(transoff(i, j).tm),
EVENT_TYPE_TRANSFER_OFFER_REJECTED_BETTER_OFFER,
transoff(i, j).fee, transoff(i, j).wage,
trans(i).tm, player_of_id_team(trans(i).tm, trans(i).id)->name->str);
user_event_remove(user_from_team(trans(i).tm),
user_event_get_index(user_from_team(trans(i).tm),
EVENT_TYPE_TRANSFER_OFFER, trans(i).id,
-1, NULL, NULL));
g_array_remove_index(trans(i).offers, j);
}
}
}
/** Return a random team as a potential buyer for a user player. */
@ -129,9 +105,9 @@ gint
transfer_offer_compare_func(gconstpointer a, gconstpointer b)
{
const TransferOffer *tr1 = (const TransferOffer*)a,
*tr2 = (const TransferOffer*)b;
*tr2 = (const TransferOffer*)b;
gint return_value;
if(tr1->fee > tr2->fee)
return_value = -1;
else if(tr2->fee > tr1->fee)
@ -146,94 +122,93 @@ transfer_offer_compare_func(gconstpointer a, gconstpointer b)
return return_value;
}
/** Send notification events about rejected transfer offers for
user players. */
void
transfer_offers_notify(Transfer *tr)
{
gint i;
gboolean valid_offer = FALSE;
TransferOffer *off = NULL;
g_array_sort(tr->offers, transfer_offer_compare_func);
off = &g_array_index(tr->offers, TransferOffer, 0);
for(i=tr->offers->len - 1; i >= 1; i--)
{
if(team_is_user(g_array_index(tr->offers, TransferOffer, i).tm) != -1)
user_event_add(user_from_team(g_array_index(tr->offers, TransferOffer, i).tm),
EVENT_TYPE_TRANSFER_OFFER_REJECTED_BETTER_OFFER,
g_array_index(tr->offers, TransferOffer, i).fee,
g_array_index(tr->offers, TransferOffer, i).wage,
tr->tm, player_of_id_team(tr->tm, tr->id)->name->str);
g_array_remove_index(tr->offers, i);
}
if(team_is_user(tr->tm) != -1)
{
user_event_add(user_from_team(tr->tm), EVENT_TYPE_TRANSFER_OFFER_USER,
-1, -1, NULL, player_of_id_team(tr->tm, tr->id)->name->str);
valid_offer = TRUE;
tr->locked = TRUE;
}
else if(player_of_id_team(tr->tm, tr->id)->value > off->fee &&
player_of_id_team(tr->tm, tr->id)->wage > off->wage)
user_event_add(user_from_team(off->tm),
EVENT_TYPE_TRANSFER_OFFER_REJECTED_FEE_WAGE,
off->fee, off->wage,
tr->tm, player_of_id_team(tr->tm, tr->id)->name->str);
else if(player_of_id_team(tr->tm, tr->id)->value > off->fee)
user_event_add(user_from_team(off->tm),
EVENT_TYPE_TRANSFER_OFFER_REJECTED_FEE,
off->fee, off->wage,
tr->tm, player_of_id_team(tr->tm, tr->id)->name->str);
else if(player_of_id_team(tr->tm, tr->id)->wage > off->wage)
user_event_add(user_from_team(off->tm),
EVENT_TYPE_TRANSFER_OFFER_REJECTED_WAGE,
off->fee, off->wage,
tr->tm, player_of_id_team(tr->tm, tr->id)->name->str);
else if(off->tm->players->len >= const_int("int_team_max_players"))
user_event_add(user_from_team(off->tm),
EVENT_TYPE_TRANSFER_OFFER_ROSTER, -1, -1,
tr->tm, player_of_id_team(tr->tm, tr->id)->name->str);
else
{
user_event_add(user_from_team(off->tm),
EVENT_TYPE_TRANSFER_OFFER_CPU, -1, -1,
NULL, player_of_id_team(tr->tm, tr->id)->name->str);
valid_offer = TRUE;
tr->locked = TRUE;
}
if(!valid_offer)
g_array_remove_index(tr->offers, 0);
}
/** Move players to the users' teams if their offer
was accepted or remove the players from the list if not. */
void
transfer_evaluate_offers(void)
{
gint i, j;
gint idx;
gboolean accept;
for(i=transfer_list->len - 1;i>=0;i--)
{
if(team_is_user(trans(i).tm) == -1)
if(trans(i).offers->len > 0)
{
idx = -1;
accept = FALSE;
if(trans(i).offers->len > 1)
g_array_sort(trans(i).offers, transfer_offer_compare_func);
for(j=0;j<trans(i).offers->len;j++)
for(j=trans(i).offers->len - 1;j >= 0; j--)
if(team_is_user(transoff(i, j).tm) != -1 &&
transoff(i, j).fee > BUDGET(user_get_index(user_from_team(transoff(i, j).tm))))
transoff(i, j).fee > BUDGET(team_is_user(transoff(i, j).tm)))
{
user_event_add(user_from_team(transoff(i, j).tm),
EVENT_TYPE_TRANSFER_OFFER_MONEY, -1, -1,
trans(i).tm, player_of_id_team(trans(i).tm, trans(i).id)->name->str);
else
{
idx = j;
break;
}
if(idx != -1)
{
for(j=idx + 1;j<trans(i).offers->len;j++)
user_event_add(user_from_team(transoff(i, j).tm),
EVENT_TYPE_TRANSFER_OFFER_REJECTED_BETTER_OFFER,
transoff(i, j).fee, transoff(i, j).wage,
trans(i).tm, player_of_id_team(trans(i).tm, trans(i).id)->name->str);
if(player_of_id_team(trans(i).tm, trans(i).id)->value > transoff(i, idx).fee &&
player_of_id_team(trans(i).tm, trans(i).id)->wage > transoff(i, idx).wage)
user_event_add(user_from_team(transoff(i, idx).tm),
EVENT_TYPE_TRANSFER_OFFER_REJECTED_FEE_WAGE,
transoff(i, idx).fee, transoff(i, idx).wage,
trans(i).tm, player_of_id_team(trans(i).tm, trans(i).id)->name->str);
else if(player_of_id_team(trans(i).tm, trans(i).id)->value > transoff(i, idx).fee)
user_event_add(user_from_team(transoff(i, idx).tm),
EVENT_TYPE_TRANSFER_OFFER_REJECTED_FEE,
transoff(i, idx).fee, transoff(i, idx).wage,
trans(i).tm, player_of_id_team(trans(i).tm, trans(i).id)->name->str);
else if(player_of_id_team(trans(i).tm, trans(i).id)->wage > transoff(i, idx).wage)
user_event_add(user_from_team(transoff(i, idx).tm),
EVENT_TYPE_TRANSFER_OFFER_REJECTED_WAGE,
transoff(i, idx).fee, transoff(i, idx).wage,
trans(i).tm, player_of_id_team(trans(i).tm, trans(i).id)->name->str);
else if(transoff(i, idx).fee > BUDGET(user_get_index(user_from_team(transoff(i, idx).tm))))
user_event_add(user_from_team(transoff(i, idx).tm),
EVENT_TYPE_TRANSFER_OFFER_MONEY, -1, -1,
trans(i).tm, player_of_id_team(trans(i).tm, trans(i).id)->name->str);
else if(transoff(i, idx).tm->players->len >= const_int("int_team_max_players"))
user_event_add(user_from_team(transoff(i, idx).tm),
EVENT_TYPE_TRANSFER_OFFER_ROSTER, -1, -1,
trans(i).tm, player_of_id_team(trans(i).tm, trans(i).id)->name->str);
else
{
user_event_add(user_from_team(transoff(i, idx).tm),
EVENT_TYPE_TRANSFER_OFFER_ACCEPTED, -1, -1,
trans(i).tm, player_of_id_team(trans(i).tm, trans(i).id)->name->str);
player_copy(player_of_id_team(trans(i).tm, trans(i).id),
transoff(i, idx).tm, transoff(i, idx).tm->players->len);
player_of_idx_team(transoff(i, idx).tm, transoff(i, idx).tm->players->len - 1)->contract =
(gfloat)math_rndi(const_int("int_transfer_contract_lower"),
const_int("int_transfer_contract_upper"));
player_of_idx_team(transoff(i, idx).tm, transoff(i, idx).tm->players->len - 1)->wage =
transoff(i, idx).wage;
user_from_team(transoff(i, idx).tm)->money -= transoff(i, idx).fee;
user_from_team(transoff(i, idx).tm)->money_out[1][MON_OUT_TRANSFERS] -=
transoff(i, idx).fee;
player_replace_by_new(player_of_id_team(trans(i).tm, trans(i).id), FALSE);
transfer_remove_player(i);
accept = TRUE;
}
}
if(!accept)
for(j=trans(i).offers->len - 1;j>=0;j--)
g_array_remove_index(trans(i).offers, j);
}
if(trans(i).offers->len > 0)
transfer_offers_notify(&trans(i));
}
}
}
/** Add new players to the transfer list. */
@ -290,6 +265,7 @@ transfer_add_player(Player *pl, gint time)
new.id = pl->id;
new.time = time;
new.offers = g_array_new(FALSE, FALSE, sizeof(TransferOffer));
new.locked = FALSE;
for(i=0;i<4;i++)
{
@ -353,6 +329,22 @@ query_transfer_player_is_on_list(const Player *pl)
return FALSE;
}
/** Find out whether a player is on the list
and there are offers to buy him. */
const TransferOffer*
transfer_player_has_offer(const Player *pl)
{
gint i;
for(i=0;i<transfer_list->len;i++)
if(trans(i).tm == pl->team &&
trans(i).id == pl->id &&
trans(i).locked)
return &transoff(i, 0);
return NULL;
}
/** Add an offer to the player with specified index on the transfer list.
@param return TRUE if the offer updated an earlier offer, FALSE, otherwise. */
gboolean
@ -375,10 +367,6 @@ transfer_add_offer(gint idx, Team *tm, gint fee, gint wage)
g_array_append_val(trans(idx).offers, new);
if(team_is_user(trans(idx).tm) != -1)
user_event_add(user_from_team(trans(idx).tm), EVENT_TYPE_TRANSFER_OFFER,
trans(idx).id, -1, NULL, NULL);
return FALSE;
}

View File

@ -15,7 +15,7 @@ void
transfer_update(void);
void
transfer_add_offers(void);
transfer_add_cpu_offers(void);
void
transfer_evaluate_offers(void);
@ -59,4 +59,10 @@ transfer_get_index(const Team *tm, gint id);
void
transfer_add_remove_user_player(Player *pl);
void
transfer_offers_notify(Transfer *trans);
const TransferOffer*
transfer_player_has_offer(const Player *pl);
#endif

View File

@ -18,7 +18,8 @@ typedef struct
gint fee[QUALITY_END], wage[QUALITY_END];
/** Offers for the player. */
GArray *offers;
/** This is true if an accepted offer is pending. */
gboolean locked;
} Transfer;
typedef struct

View File

@ -8,6 +8,7 @@
#include "player.h"
#include "support.h"
#include "team.h"
#include "transfer.h"
#include "treeview.h"
#include "treeview_helper.h"
#include "user.h"
@ -879,10 +880,7 @@ treeview_helper_player_to_cell(GtkTreeViewColumn *col,
g_warning("treeview_helper_player_to_cell: unknown attribute %d.\n", attribute);
break;
case PLAYER_LIST_ATTRIBUTE_NAME:
strcpy(buf, pl->name->str);
if(pl->team == current_user.tm &&
opt_user_int("int_opt_user_penalty_shooter") == pl->id)
strcat(buf, _(" (P)"));
treeview_helper_player_name_to_cell(renderer, buf, pl);
break;
case PLAYER_LIST_ATTRIBUTE_CPOS:
treeview_helper_player_pos_to_cell(renderer, buf, pl->cpos);
@ -941,6 +939,38 @@ treeview_helper_player_to_cell(GtkTreeViewColumn *col,
g_object_set(renderer, "text", buf, NULL);
}
/** Render a cell of a player name. */
void
treeview_helper_player_name_to_cell(GtkCellRenderer *renderer, gchar *buf, const Player *pl)
{
const TransferOffer *off = transfer_player_has_offer(pl);
const gchar *colour_fg = const_app("string_treeview_helper_color_default_foreground"),
*colour_bg = const_app("string_treeview_helper_color_default_background");
strcpy(buf, pl->name->str);
if(pl->team == current_user.tm &&
opt_user_int("int_opt_user_penalty_shooter") == pl->id)
strcat(buf, _(" (P)"));
if(off != NULL)
{
if(pl->team == current_user.tm)
{
colour_bg = const_app("string_treeview_helper_color_transfer_offer_user_bg");
colour_fg = const_app("string_treeview_helper_color_transfer_offer_user_fg");
}
else if(off->tm == current_user.tm)
{
colour_bg = const_app("string_treeview_helper_color_transfer_offer_cpu_bg");
colour_fg = const_app("string_treeview_helper_color_transfer_offer_cpu_fg");
}
}
g_object_set(renderer, "background", colour_bg, NULL);
g_object_set(renderer, "foreground", colour_fg, NULL);
}
/** Render a cell of a player contract.
@param renderer The cell renderer.
@param buf The string the cell will contain.

View File

@ -92,6 +92,9 @@ treeview_helper_player_ext_info_to_cell(GtkTreeViewColumn *col,
GtkTreeIter *iter,
gpointer user_data);
void
treeview_helper_player_name_to_cell(GtkCellRenderer *renderer, gchar *buf, const Player *pl);
void
treeview_helper_player_contract_to_cell(GtkCellRenderer *renderer, gchar *buf, gfloat contract_time);

View File

@ -400,7 +400,6 @@ user_event_show_next(void)
Event *event = NULL;
gchar buf[SMALL],
buf2[SMALL], buf3[SMALL];
gint temp_int = -1;
if(current_user.events->len == 0)
return;
@ -444,6 +443,16 @@ user_event_show_next(void)
sprintf(buf, _("You have overdrawn your bank account once again. Bear in mind that after the fourth time you get fired.\nThe team owners give you %d weeks to get above your drawing credit limit."), const_int("int_finance_overdraw_positive"));
game_gui_show_warning(buf);
break;
case EVENT_TYPE_TRANSFER_OFFER_USER:
sprintf(buf, _("Have a look at the transfer list, there's an offer for %s."),
event->value_string->str);
game_gui_show_warning(buf);
break;
case EVENT_TYPE_TRANSFER_OFFER_CPU:
sprintf(buf, _("Your offer for %s has been accepted. If you still want to buy him, go to the transfer list and left click on the player."),
event->value_string->str);
game_gui_show_warning(buf);
break;
case EVENT_TYPE_TRANSFER_OFFER_REJECTED_BETTER_OFFER:
misc_print_grouped_int(event->value1, buf2, FALSE);
misc_print_grouped_int(event->value2, buf3, FALSE);
@ -480,29 +489,24 @@ user_event_show_next(void)
event->value_string->str, ((Team*)event->value_pointer)->name->str);
game_gui_show_warning(buf);
break;
case EVENT_TYPE_TRANSFER_OFFER_ACCEPTED:
sprintf(buf, _("Congratulations! The owners of %s have accepted your offer for %s!"),
((Team*)event->value_pointer)->name->str, event->value_string->str);
game_gui_show_warning(buf);
break;
case EVENT_TYPE_TRANSFER_OFFER:
temp_int = transfer_get_index(event->user->tm, event->value1);
misc_print_grouped_int(transoff(temp_int, 0).fee, buf2, FALSE);
misc_print_grouped_int(ABS(transoff(temp_int, 0).fee -
player_of_id_team(event->user->tm, trans(temp_int).id)->value), buf3, FALSE);
if(transoff(temp_int, 0).fee -
player_of_id_team(event->user->tm, trans(temp_int).id)->value > 0)
strcat(buf3, _(" more"));
else
strcat(buf3, _(" less"));
/* case EVENT_TYPE_TRANSFER_OFFER: */
/* temp_int = transfer_get_index(event->user->tm, event->value1); */
/* misc_print_grouped_int(transoff(temp_int, 0).fee, buf2, FALSE); */
/* misc_print_grouped_int(ABS(transoff(temp_int, 0).fee - */
/* player_of_id_team(event->user->tm, trans(temp_int).id)->value), buf3, FALSE); */
/* if(transoff(temp_int, 0).fee - */
/* player_of_id_team(event->user->tm, trans(temp_int).id)->value > 0) */
/* strcat(buf3, _(" more")); */
/* else */
/* strcat(buf3, _(" less")); */
sprintf(buf, _("%s would like to buy %s. They offer %s for him, which is %s than the player's value. Do you accept?"), transoff(temp_int, 0).tm->name->str,
player_of_id_team(event->user->tm, trans(temp_int).id)->name->str,
buf2, buf3);
stat1 = STATUS_TRANSFER_OFFER;
stat2 = temp_int;
window_show_yesno(buf);
break;
/* sprintf(buf, _("%s would like to buy %s. They offer %s for him, which is %s than the player's value. Do you accept?"), transoff(temp_int, 0).tm->name->str, */
/* player_of_id_team(event->user->tm, trans(temp_int).id)->name->str, */
/* buf2, buf3); */
/* stat1 = STATUS_TRANSFER_OFFER; */
/* stat2 = temp_int; */
/* window_show_yesno(buf); */
/* break; */
case EVENT_TYPE_PLAYER_CAREER_STOP:
sprintf(buf, _("%s's injury was so severe that he can't play football on a professional level anymore. He leaves your team."), player_of_id_team(event->user->tm, event->value1)->name->str);
if(event->user->tm->players->len < 12)

View File

@ -87,15 +87,14 @@ enum EventType
EVENT_TYPE_JOB_OFFER,
EVENT_TYPE_FIRE_FINANCE,
EVENT_TYPE_FIRE_FAILURE,
EVENT_TYPE_TRANSFER_OFFER,
EVENT_TYPE_TRANSFER_OFFER_USER,
EVENT_TYPE_TRANSFER_OFFER_CPU,
EVENT_TYPE_TRANSFER_OFFER_REJECTED_BETTER_OFFER,
EVENT_TYPE_TRANSFER_OFFER_REJECTED_FEE_WAGE,
EVENT_TYPE_TRANSFER_OFFER_REJECTED_FEE,
EVENT_TYPE_TRANSFER_OFFER_REJECTED_WAGE,
EVENT_TYPE_TRANSFER_OFFER_MONEY,
EVENT_TYPE_TRANSFER_OFFER_ROSTER,
EVENT_TYPE_TRANSFER_OFFER_ACCEPTED,
EVENT_TYPE_TRANSFER_OFFER_OUTBID,
EVENT_TYPE_PLAYER_CAREER_STOP,
EVENT_TYPE_END
};

View File

@ -10,6 +10,7 @@ enum
TAG_TRANSFERS = TAG_START_TRANSFERS,
TAG_TRANSFER,
TAG_TRANSFER_PLAYER_ID,
TAG_TRANSFER_LOCKED,
TAG_TRANSFER_TIME,
TAG_TRANSFER_FEE,
TAG_TRANSFER_WAGE,
@ -76,6 +77,7 @@ xml_loadsave_transfers_end_element (GMarkupParseContext *context,
}
else if(tag == TAG_TEAM_ID ||
tag == TAG_TRANSFER_PLAYER_ID ||
tag == TAG_TRANSFER_LOCKED ||
tag == TAG_TRANSFER_TIME ||
tag == TAG_TRANSFER_FEE ||
tag == TAG_TRANSFER_OFFER ||
@ -117,6 +119,8 @@ xml_loadsave_transfers_text (GMarkupParseContext *context,
new_transfer.tm = team_of_id(int_value);
else if(state == TAG_TRANSFER_PLAYER_ID)
new_transfer.id = int_value;
else if(state == TAG_TRANSFER_LOCKED)
new_transfer.locked = int_value;
else if(state == TAG_TRANSFER_TIME)
new_transfer.time = int_value;
else if(state == TAG_TRANSFER_FEE)
@ -183,6 +187,7 @@ xml_loadsave_transfers_write(const gchar *prefix)
xml_write_int(fil, trans(i).tm->id, TAG_TEAM_ID, I1);
xml_write_int(fil, trans(i).id, TAG_TRANSFER_PLAYER_ID, I1);
xml_write_int(fil, trans(i).locked, TAG_TRANSFER_LOCKED, I1);
xml_write_int(fil, trans(i).time, TAG_TRANSFER_TIME, I1);
for(j=0;j<QUALITY_END;j++)

View File

@ -22,6 +22,16 @@ string_treeview_helper_color_default_background white
string_treeview_helper_color_default_foreground black
# player list colours
# colours for user players on the transfer list for
# which there is an offer
string_treeview_helper_color_transfer_offer_user_fg white
string_treeview_helper_color_transfer_offer_user_bg darkgreen
# colours for cpu players on the list that have a valid offer
string_treeview_helper_color_transfer_offer_cpu_fg white
string_treeview_helper_color_transfer_offer_cpu_bg darkorange
string_treeview_helper_color_player_pos_goalie_bg black
string_treeview_helper_color_player_pos_goalie_fg white
string_treeview_helper_color_player_pos_defender_bg darkgreen