Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2000:
[Freeciv-Dev] Multiple patches
Home

[Freeciv-Dev] Multiple patches

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Freeciv dev list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Multiple patches
From: Robert Rendell <rob@xxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 26 May 2000 11:30:36 +1000 (EST)

Well, I've been hacking freeciv for a while now, and should probably post
my changes in case people want to use them.  Since I've been doing this for
a while, I've created more work for myself - I've had to go through and
make lots of little diff files, by topic, of the various changes I've made.
These diffs are relative to the May-25 CVS snapshot.

The patches are tarred up and gzipped, and unpack into a directory
"patches" with 16 diff files in it.  The comments here are duplicated at
the start of each diff file, for individual perusal.

autosettler.diff

    As well as cleaning up auto_setter_findwork, this patch also causes
    autosettlers to favour improving land that's currently in use by a
    city, since that will return the most immediate benefit to the civ.

bugs.diff

    This patch fixes four bugs...
        * the memory allocated for worklist names in the xaw and gtk
                clients could potentially be overrun (this patch actually
                only fixes the xaw client, because the gtk client is fixed
                in the "worklist.diff" patch)
        * isnt_terrain_near_tile tested whether *any* tile nearby wasn't of
                the nominated type, rather than whether *every* tile
                wasn't.  That is, if you called
                isnt_terrain_near_tile(x,y,T_OCEAN), and there was
                grassland (say) to the north-west of (x,y), it would return
                true, even if there was ocean everywhere else.
                (isnt_terrain_near_tile isn't actually called anywhere in
                the code, but it still should be correct.)
        * an exploitable bug: changing a city's production to something of
                the same type would set turn_changed_target, which meant
                that further changes could be made in the same turn to
                productions of different types without incurring any
                resource loss at all.
        * not strictly a bug, but incorrect behaviour: when a unit changed
                home cities, the previous home and the new home didn't get
                recalced.

chatline.diff

    This patch adds a picklist next to the chatline for the gtk client,
    which can be used to set a recipient for private messages.  This is
    simply a convenience thing, since you can send private messages anyway,
    but I like it.  I haven't done the xaw or mui clients, beyond putting
    in stubs so they still compile.

comments.diff

    These were sundry random changes to comments or whitespace in the
    source that I thought I'd leave in, and collect here.

cosmetic.diff

    This patch makes mainly cosmetic changes, which means it's probably more
    subject to people's personal preferences.  Specifically:
        * In the city summary (F1)
            * The food column now shows number of turns until grow/shrink
            * The production column uses a different format, consistant
                    with the food column (and the change to the science
                    display in the "research_display.diff" patch):
                    Stock/Target [Turns] (Buy)
            * Turns comes up as "inf" if something will take forever,
                    rather than 999
            * the minimum vertical size for the city summary in the gtk
                    client is smaller (I bring up the city summary when
                    I've only got 1 city, so having the minimum large
                    enough for a dozen was a pain)
        * If a city building something has enough resources in stock to get
                it, the turns until complete come up as "1", even if the
                city is in disorder or otherwise has zero resources coming
                in
        * Two-stage terrain improvements (road -> railroad, irrigation ->
                farmland) no longer come up with the first if the second is
                present, in textual descriptions of the terrain (such as
                middle clicking it or walking a unit over it).
        * The global warmth display was useless once you'd had a bout of
                global warming, because although game.warminglevel
                increased, game.heating was still counted from 0.  The
                patch makes heating depend on warminglevel.
        * Put in some of the historians other than Herodotus (Herodot?),
                and made the historical report gives civs the same rank if
                they're tied in what's surveyed.

embassy.diff

    This patch simply expands a bit on the player display's embassy column,
    indicating if another civ has an embassy with ours, as well as the
    other way around.

    Requires that the patch "mixed.diff" also be applied.

meltdown.diff

    Implements nuclear meltdowns, a la Civ and Civ2: cities in disorder
    that contain a nuclear plant are in danger of suffering a meltdown
    (lose half the city's population and the nuclear plant, and pollute the
    surrounding countryside).  Discovering another tech (Fusion Power, in
    the patched ruleset files) makes nuclear plants safe.

    Requires that the patch "mixed.diff" also be applied.

mixed.diff

    This patch contains pieces from other patches that aren't easily
    separated, because they modify consecutive pieces of code.  If you're
    not going to apply all of the patches mentioned below, you'll want to
    remove some of the stuff added by this patch.

        * in client/climisc.c and client/climisc.h:
            * cat_research_progress() is used in patch "research_display.diff"
            * format_duration() is used in patch "timeout.diff"
            * get_embassy_status() is used in patch "embassy.diff"
        * in client/options.c and common/events.h:
            * E_WONDER_OBSOLETE is used in patch "wonders.diff"
            * E_DISASTER is used in patch "meltdown.diff"
        * in common/capstr.c:
            * capability "SendSecondsToTurnDone" is used in patch "timeout.diff"
            * capability "EventWonderObsolete" is used in patch "wonders.diff"
            * capability "EventDisaster" is used in patch "meltdown.diff"
            * capability "Meltdown" is used in patch "meltdown.diff"

password.diff

    This patch introduces a password field in the connect dialog for
    clients, which can be used to somewhat protect a player's civ from
    tampering.  It also adds a password command on the console, which can
    be used to set or blank a civ's password, or to set a password on all
    the AI players.

research_display.diff

    This patch displays some more information in the science display (F6),
    showing how many research points are being generated by your civ and
    how many turns until you compete the current tech being researched.

    Requires that the patch "mixed.diff" also be applied.

rulechanges.diff

    This patch actually changes rules in freeciv which I thought were wrong
    compared to the originals.  As such, it's probably the most likely to
    not be used :)
        * Pollution only occurs in squares that are being used by the city
        * Spaceships are only destroyed if a capital is taken while the
                ship is in orbit, not after it is launched.
        * Gold looted from a city is the proportion of your treasury equal
                to the proportion of population in the captured city to
                your entire civ (thus, when someone conquers all of your
                cities, they get all your gold).  Also, a conquerer still
                gets loot and technology when they capture a size 1 city,
                destroying it.

science_fair.diff

    Patch to prevent a player suffering the techpenalty more than once in
    the same turn, and allowing them to change back to the tech they
    originally changed from and get all research back again.  This is
    kinder to civ-newbies who don't realise that they'll lose all their
    research when they change topics, and want to undo the change.

terrain_click.diff

    Shows the base food/res/trade of a terrain square when you middle-click
    it, to save having to resort to the help so much when first starting to
    play civ.

timeout.diff

    This patch does a number of things WRT timeouts
        * Fixes a bug which made the turn end immediately when a timeout
                was first set
        * When you set the timeout, it applies to the current turn, and the
                updated timeout info is sent to the clients.
        * timeouts can be much longer, and will come up in the clients in
                minutes or hours rather than seconds if appropriate.
        * A new option, "fixedlength", is available at the server.  If set
                to 1, turns always run for the full length of the timeout,
                irresepective of players hitting "Turn Done" (if no timeout
                is set, fixedlength has no effect).

    Requires that the patch "mixed.diff" also be applied.

wonders.diff

    This patch does two things with wonders:
        * Wonders that are currently under construction come up in the
                wonders display (F7)
        * A player is notified if their wonder is made obsolete by a tech
                advance

    Requires that the patch "mixed.diff" also be applied.

worklist.diff

    This patch makes city improvements and wonders dissappear from the
    available list of things to build in the worklist if they appear in the
    worklist already.  Note that this has only been done for the gtk
    client.

Actually, I was just reading the mailing list archive while testing all
these, and it looks like Richard Atkins has done a patch with similar
effects to worklist.diff, but which also does useful stuff at the server
end, so mine is probably redundant.  I'll leave it in, anyway, since I do
it a different way, which might be of interest.

                                                        Have fun,
                                                         Rob R.
                                                          \((/
                                                          ~oo~
                                                          /))\

Attachment: patches.tar.gz
Description: patches.tar.gz


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