Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2000:
[Freeciv-Dev] Re: patch: allow duplicate tags in tilespec files (PR#227)
Home

[Freeciv-Dev] Re: patch: allow duplicate tags in tilespec files (PR#227)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: patch: allow duplicate tags in tilespec files (PR#227)
From: Falk Hueffner <falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: 09 Jan 2000 13:13:44 +0100

David Pfitzner <dwp@xxxxxxxxxxxxxx> writes:

> The "tilespec" system has a problem that it isn't easy to replace
> just selected graphics.  Eg, to replace hitpoint bars, can supply a
> new xpm with just hitpoint bars, and corresponding spec file, but
> because image tag strings must be unique, have to edit the
> distribution tiles.spec file to remove hitpoint bar tags there.
> 
> Thats not very nice because would like to not have to mess with the
> distribution spec files, and track changes there, etc.  (This issue
> was raised by Falk Hueffner - see
> http://arch.freeciv.org/freeciv-dev-199908/msg00386.html)
> 
> I considered using some sort of prefix system as suggested in Falk's
> post, but realised at least this problem could be overcome with a
> very simple change: allow duplicate tags, and for each tag, if there
> are duplicates just use the first entry which appears.  Then to
> override selected graphics, just put the new spec file earlier in
> the 'files' list in the toplevel .tilespec file.  (Regardless, you
> do need to provide a replacement .tilespec file.)

Interestingly, I came to the same conclusion and nearly started coding
it :) I even started to understand the registry code :) Thanks a lot
for this patch.

> This patch implements this simple solution.  (Although perhaps
> arguably in a bit of a hackish way, relying on (abusing?)  registry
> internals etc...)  I like the relative simplicity of the approach
> (and short patch), but are there other related issues which cannot
> be solved via this simple fix?

Well, it makes things easier if you want to replace all tiles from
image A with those from file B, but not if you want to replace only
some. For example, my girlfriend prefers the units ripped from Civ2,
but insists on keeping the Engels engineer. For this, you still have
to edit the .spec files...

        Falk




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