[Freeciv-Dev] Re: (PR#13474) a city_production struct
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13474 >
On Thu, 14 Jul 2005, Jason Short wrote:
>
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=13474 >
>
> This patch changes pcity->is_building_unit and pcity->currently_building
> into a separate struct. The new values are pcity->production.is_unit
> and pcity->production.value.
>
> Reasons: the main reason is that this struct will be rather useful
> elsewhere. The cid and wid values the client uses should be replaced
> with it. Existing functions that take a
> currently_building+is_building_unit values should instead take a
> city_production struct.
>
> Caveats: I considered using a union for the typedef, or using an enum
> for is_unit (both like req_source does). I decided against it for now
> since there are only units and imprs and both are represented by
> integers. However at some point in the future this may change.
Why not do it the other way around? i.e. Replace pcity->is_building_unit
and pcity->currently_building with pcity->production which is a cid or
wid, whatever?
A unique identifier for things which can be produced at a city is useful
in lots of places and I am uncertain turning this into a struct is a very
good idea.
---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa
- [Freeciv-Dev] Re: (PR#13474) a city_production struct, Benoit Hudson, 2005/07/14
- [Freeciv-Dev] Re: (PR#13474) a city_production struct, Jason Short, 2005/07/14
- [Freeciv-Dev] Re: (PR#13474) a city_production struct,
Vasco Alexandre da Silva Costa <=
- [Freeciv-Dev] Re: (PR#13474) a city_production struct, Vasco Alexandre da Silva Costa, 2005/07/15
- [Freeciv-Dev] Re: (PR#13474) a city_production struct, Benoit Hudson, 2005/07/15
- [Freeciv-Dev] Re: (PR#13474) a city_production struct, Jason Short, 2005/07/15
- [Freeciv-Dev] Re: (PR#13474) a city_production struct, Jason Short, 2005/07/15
- [Freeciv-Dev] Re: (PR#13474) a city_production struct, Vasco Alexandre da Silva Costa, 2005/07/16
- [Freeciv-Dev] Re: (PR#13474) a city_production struct, Jason Short, 2005/07/17
- [Freeciv-Dev] Re: (PR#13474) a city_production struct, Vasco Alexandre da Silva Costa, 2005/07/18
- [Freeciv-Dev] Re: (PR#13474) a city_production struct, Jason Short, 2005/07/18
- [Freeciv-Dev] (PR#13474) a city_production struct, Jason Short, 2005/07/23
|
|