[Freeciv-Dev] Re: (PR#4620) Game end message
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
[I have continued problems to receive mail from FreecivDev list.
Eg I got the RT copy of this mail, but not the one from dev list.
Please CC: me if you answer]
On Sat, Jul 19, 2003 at 04:35:20PM -0700, Jason Short wrote:
> Jason Short wrote:
> > [ChrisK@xxxxxxxx - Sat Jul 19 10:15:31 2003]:
> >
> >
> >>CVS 18 JUL 2003 w/ various patches GTK 1
> >>
> >>The game end message
> >>
> >>Spiel endete mit einem Sieg von Wilhelm I.
> >>Spiel: Das Spiel ist vorbei...
> >>
> >>is not shown in the F10 message window, even if the resp. option is
> >
> > marked.
> >
> > "Game ended in victory for %s"
> > "Game: The game is over..."
>
> notify_conn and notify_player are used instead of notify_conn_ex and
> notify_player_ex. The attached patch fixes this for these two messages.
Actually I have had made a similar patch, which fixes all end game messages.
But my patch, as well as yours, has one problem. It shows the F10 messages,
but not the popup requests, in all cases.
The popup request for
"Game ended in victory for %s"
is *not* shown, but the popup for
"Game: The game is over..."
*is* shown.
I don't know why.
> But there are dozens of other places where the _ex form is not used.
> The basic notify_conn() form gives the event type as E_NO_EVENT.
> Problem is it's often hard to choose an event for the messages. IMO we
> should do so for most/all of them, but I don't want to to the design
> work (choosing new events and assigning messages to events)...
I think we should sort all messeges into a dozen or so events (message
groups). If this is done cleverly, I hope it will be easier to select the
wanted and deselect the unwanted messages.
Or do people think it is good to handle each message seperately? You are
tending to overlook some of the options.
Christian
--
Christian Knoke * * * http://www.enter.de/~c.knoke/
* * * * * * * * * Ceterum censeo Microsoft esse dividendum.
diff -Nur -Xdiff_ignore ../../cvs/freeciv/server/srv_main.c ./server/srv_main.c
--- ../../cvs/freeciv/server/srv_main.c Sat Jul 19 11:21:29 2003
+++ ./server/srv_main.c Sat Jul 19 19:38:55 2003
@@ -195,7 +195,7 @@
/* quit if we are past the year limit */
if (game.year > game.end_year) {
- notify_conn(&game.est_connections,
+ notify_conn_ex(&game.est_connections, -1, -1, E_GAME_END,
_("Game ended in a draw as end year exceeded"));
gamelog(GAMELOG_NORMAL, _("Game ended in a draw as end year exceeded"));
return TRUE;
@@ -224,7 +224,7 @@
/* quit if we have team victory */
team_iterate(pteam) {
if (team_count_members_alive(pteam->id) == alive) {
- notify_conn(&game.est_connections,
+ notify_conn_ex(&game.est_connections, -1, -1, E_GAME_END,
_("Team victory to %s"), pteam->name);
gamelog(GAMELOG_NORMAL, _("Team victory to %s"), pteam->name);
gamelog(GAMELOG_TEAM, "TEAMVICTORY %s", pteam->name);
@@ -234,14 +234,15 @@
/* quit if only one player is left alive */
if (alive == 1) {
- notify_conn(&game.est_connections,
+ notify_conn_ex(&game.est_connections, -1, -1, E_GAME_END,
_("Game ended in victory for %s"), victor->name);
gamelog(GAMELOG_NORMAL, _("Game ended in victory for %s"),
victor->name);
gamelog(GAMELOG_TEAM, "SINGLEWINNER %s", victor->name);
return TRUE;
} else if (alive == 0) {
- notify_conn(&game.est_connections, _("Game ended in a draw"));
+ notify_conn_ex(&game.est_connections, -1, -1, E_GAME_END,
+ _("Game ended in a draw"));
gamelog(GAMELOG_NORMAL, _("Game ended in a draw"));
gamelog(GAMELOG_TEAM, "NOWINNER");
return TRUE;
@@ -264,7 +265,8 @@
}
} players_iterate_end;
if (all_allied) {
- notify_conn(&game.est_connections, _("Game ended in allied victory"));
+ notify_conn_ex(&game.est_connections, -1, -1, E_GAME_END,
+ _("Game ended in allied victory"));
gamelog(GAMELOG_NORMAL, _("Game ended in allied victory"));
gamelog(GAMELOG_TEAM, "ALLIEDVICTORY");
return TRUE;
|
|