[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]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=7345 >
>
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=7345 >
>
> We could always change update_city_tile_status() to also return true if
> a worker has been displaced, and remove the call to
> auto_arrange_workers() within.
>
> This would involve adding an if to almost every call to
> update_city_tile_status() and update_city_tile_status_map(), executing
> an auto_arrange_workers() if true. Perhaps a wrapper function for
> automatically calling auto_arrange_workers() would decrease the
> redundant ifs.
>
> One good point is that depending on the context of the call, the
> auto_arrange_workers() call can be deferred to later, if we're simply
> updating all the tiles in a city for example.
>
> One problem with this is it adds a lot of calls to
> auto_arrange_workers(), since update_city_tile_status() also returns a
> true if a tile becomes available. I have no idea if this is good
> behavior or not. :)
I tried this before, and I remember it didn't work but I don't remember why.
Please try it out and report if you have a chance.
jason
|
|