Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2005:
[Freeciv-Dev] (PR#13198) Changin Tech when goal is changed
Home

[Freeciv-Dev] (PR#13198) Changin Tech when goal is changed

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#13198) Changin Tech when goal is changed
From: "Thomas Müller" <lists@xxxxxxxxxxx>
Date: Mon, 30 May 2005 13:22:44 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13198 >

When you set Goal to X and research  is X, ther finish research on X and 10 
bulbs are left over, yo get:
>Researching: None
>Goal: None
>Bulbs 10
If you switch to Research B now, you get 10 Bulbs for B, thats good.
If you set Goal to C, you get:
>Researching: None
>Goal: C
>Bulbs 10
And next turn, you get 
>Researching: D
>Goal: C
>Bulbs 50
Where D is a needed for C, and you research 50 Bulbs a turn. The 10 Bulbs are 
lost. Its a bug, i could fix it, but i think it would be better, to change 
the Research immideatly when you change the goal, and have "None" has current 
researcht. This way, you would know, what you research next. If there is 
already something you're researching, and goal changes, the current research 
should be unchanged of course.

I wrote a patch to achieve it, its my first patch, i hope i dont break 
anything, it works with current cvs for me.

Greets, 
elfstone

(Pls use elfstone/freeciv@xxxxxxxxxxx in changelog, if the patch makes it into 
cvs)

--- orig.plrhand.c      2005-05-30 22:03:41.000000000 +0200
+++ plrhand.c   2005-05-30 22:06:26.000000000 +0200
@@ -641,6 +641,9 @@
   notify_player(plr, _("Technology goal is %s."),
                get_tech_name(plr, tech));
   plr->research->tech_goal = tech;
+  if (plr->research->researching == A_UNSET) {
+       choose_goal_tech(plr);
+  }
 }
 
 /**************************************************************************

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#13198) Changin Tech when goal is changed, Thomas Müller <=