Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2004:
[Freeciv-Dev] Re: (PR#7345) auto_arrange_workers callers need to be red
Home

[Freeciv-Dev] Re: (PR#7345) auto_arrange_workers callers need to be red

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7345) auto_arrange_workers callers need to be redesigned
From: "Jason Short" <jshort@xxxxxxxxxxxxxx>
Date: Mon, 2 Feb 2004 05:01:49 -0800
Reply-to: rt@xxxxxxxxxxx

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


> Suggestion 1:
>
> Change update_city_tile_status so that it accepts a list of
> tiles. Change all the callers to use it if
> required. update_city_tile_status would carry out the changes and call
> aaw if anything has changed which require aaw.

I don't like it.  I think we're looking at only two cases: either one tile
is updated or all tiles are updated.  But sometimes when all tiles are
updated they're not done in any particular order (e.g., border change).

> Suggestion 2:
>
> Create a new update_city_tile_status0 which gets the code of the
> current update_city_tile_status except the calling of aaw. Change
> update_city_tile_status so that it calls update_city_tile_status0 and
> then aaw if required. Change the problematic caller of
> update_city_tile_status to use update_city_tile_status0 and call aaw
> by themselfs.

One of my thoughts was to provide an enum code bigger than just the
current boolean.  So we have AAW_NONE, AAW_GOT_TILE, AAW_NEW_CITIZEN,
AAW_REMOVED_TILE.  But these are generally not that useful I suspect.

Another thought was to put the data into the pcity value.  So if a call to
aaw is needed you set pcity->aaw_needed.  The caller is responsible for
checking this after calling.

jason




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