[Freeciv-Dev] Re: (PR#11760) revolution in anarchy
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=11760 >
Christian Knoke wrote:
> 1. When I give a menu command I want some feedback. There is none. There
> should be a message like: "Your nation already undergoes a period of
> revolution and is now targeted for Republic", either as a message or as a
> popup.
Index: server/plrhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/plrhand.c,v
retrieving revision 1.349
diff -u -r1.349 plrhand.c
--- server/plrhand.c 1 Jan 2005 21:48:10 -0000 1.349
+++ server/plrhand.c 8 Jan 2005 17:49:27 -0000
@@ -944,11 +944,14 @@
**************************************************************************/
void handle_player_change_government(struct player *pplayer, int government)
{
+ int old_target;
+
if (government < 0 || government >= game.government_count
|| !can_change_to_government(pplayer, government)) {
return;
}
+ old_target = pplayer->target_government;
pplayer->target_government = government;
freelog(LOG_DEBUG,
@@ -962,6 +965,11 @@
if (pplayer->government == game.government_when_anarchy) {
/* Already having a revolution. */
assert(pplayer->revolution_finishes >= 0);
+ if (old_target != government) {
+ notify_player_ex(pplayer, NULL, E_REVOLT_START,
+ _("Target government changed to %s."),
+ get_government_name(government));
+ }
if (pplayer->revolution_finishes <= game.turn
&& government != game.government_when_anarchy) {
/* The revolution was already over. Now we should enter the new
|
|