[Freeciv-Dev] (PR#2912) Remove last traces of year usage
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
[rfalke - Sat Feb 1 13:48:47 2003]:
> On Mon, Jan 27, 2003 at 12:13:25PM -0800, Per I. Mathisen via RT wrote:
> >
> > Inconsistency between "endyear" and "onsetbarbs". One wants years, the
> > other was changed to turns.
>
> I'm for changing everything to turns. Even in the user interface. So
> if both are given in turns it may first confuse players but it is the
> right thing to do. In another calendar which may not have the same
> mapping from turn to year the knowledge of "-2000 is a good value for
> onsetbarbs" is useless. However the knowledge of "total turns/10 is a
> good value for onsetbarbs" or "20 is a good value for onsetbarbs"
> holds its value.
OK, I'm all in favor of doing everything in turns now.
But several parts of this patch seem error-prone. For instance the
turn_to_year function seems no good. The array it uses won't work past
the year 2000. Also this could be calculated arithmetically in many
fewer lines than it takes to use a static array. Turn_to_year() is
similarly over-complicated.
As a side question, in the comment:
+/***************************************************************
+ turn_to_year and year_to_turn assume a standard (from -2000 to
+ 4000) game where the spaceshipparts doesn't change the anything.
+
+ ONLY USE THESE FUNCTIONS FOR BACKWARDS COMPATIBILITY.
+
+ Move the functions to server/savegame.c if the "year2turn"
+ capability is removed.
+***************************************************************/
+int turn_to_year(int turn)
What does the bit about moving to server/savegame.c mean? The year2turn
capability was just added; it seems unlikely that it would be dropped in
the future. Do you mean it will become a manditory capability and
eventually be supplanted by a +1.15.0 (or similar) capability? And how
could this function every leave the client; doesn't the client need to
know about the calendar?
jason
- [Freeciv-Dev] (PR#2912) Remove last traces of year usage,
Jason Short via RT <=
[Freeciv-Dev] Re: (PR#2912) Remove last traces of year usage, Anthony J. Stuckey, 2003/02/17
|
|