Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2004:
[Freeciv-Dev] Re: (PR#7239) buildbox server variable, for accelerated pr
Home

[Freeciv-Dev] Re: (PR#7239) buildbox server variable, for accelerated pr

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: use_less@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7239) buildbox server variable, for accelerated production
From: "Per Inge Mathisen" <pim@xxxxxxxxxxxx>
Date: Fri, 11 Jun 2004 04:51:00 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7239 >

On Tue, 8 Jun 2004, James Canete wrote:
> I tried applying the last version of this patch to current CVS and I
> found it didn't apply, so I fixed it up a bit.
>
> I also fixed a few bugs I hadn't noticed before, so savegames with
> default shieldfactor and goldfactor match with CVS, aside from the
> shieldfactor and goldfactor variables appearing in the saves.
>
> I also added a capability string, accelprod.

This patch is desperately missing helpful code comments and descriptive
help text for the server variables.

Also,

+    if (game.version >= 11499) {
+      game.shieldfactor= secfile_lookup_int(file, "game.shieldfactor");
+      game.goldfactor  = secfile_lookup_int(file, "game.goldfactor");
+    }

this is the wrong way to do it. Instead, use secfile_lookup_int_default()
to read sane values into these variables whenever they are not found in
the savegame.

  - Per




[Prev in Thread] Current Thread [Next in Thread]