[Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=14443 >
On 11/19/05, Jason Short <jdorje@xxxxxxxxxxxxxxxxxxxxx> wrote:
>
> >>3.Change city_got_citywalls to check building presence not effect
> >>presence.This is almost certainly a good idea anyway. However it
> >>still doesn't solve the underlying problem.
> >
> > How would this not be a regression to B_WALL and B_CITY that we have
> > worked so hard to leave behind?
>
> Ideally city_got_citywalls is removed entirely. Individual callers then
> do direct checks on what it is they are actually checking for. In the
> client, this will amount to building checks: the tileset code will be
> able to draw any building if graphics are added for it, and the text.c
> code will probably need some additional building flag. In the AI code,
> it amounts to checking for effect presence directly.
>
> As I said this is almost certainly a good idea anyway; in a generalized
> effects design "citywalls" has no particularly clear meaning. But...it
> won't solve the problem for other effect types.
I added building flags to address a problem related to this.
If you read buildings.ruleset, you will see City Walls have the
VisibleByOthers flag.
All wonders (Great and Small, ergo Palace too) have the VisibleByOthers flag
enabled by default.
Buildings with this flag get updated and are known by all players who
know that city, even
without spying the city. Previously there was a hack in the short city
update packet which
updated only the City Walls and Palace building info.
=== Getting down to brass tacks
Here is a listing of the places city_got_citywalls is used:
ai/advmilitary.c: do_wall = (!igwall && city_got_citywalls(pcity));
ai/advmilitary.c: bool walls = city_got_citywalls(pcity);
client/text.c: if (city_got_citywalls(pcity)) {
client/tilespec.c: if (city_got_citywalls(pcity)) {
client/tilespec.c: if (!t->is_isometric && city_got_citywalls(pcity)) {
common/city.c:bool city_got_citywalls(const struct city *pcity)
advmilitary.c should IMO do effects checks. If effects API cannot cut
it as is, then it
can be improved to enable it.
client/text.c could do a check for all VisibleByOthers buildings which
are in the city.
client/tilespec.c could be done by having an optional graphic for each
VisibleByOthers building.
- [Freeciv-Dev] Re: (PR#14628) City walls gone, Jason Short, 2005/11/17
- [Freeciv-Dev] (PR#14443) city walls not visible (effects problem), Jason Short, 2005/11/18
- [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem), Per I. Mathisen, 2005/11/19
- [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem), Jason Short, 2005/11/19
- [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem),
Vasco Alexandre da Silva Costa <=
- [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem), Vasco Alexandre da Silva Costa, 2005/11/20
- [Freeciv-Dev] (PR#14443) city walls not visible (effects problem), Vasco Alexandre da Silva Costa, 2005/11/20
- [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem), Vasco Alexandre da Silva Costa, 2005/11/20
- [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem), Vasco Alexandre da Silva Costa, 2005/11/20
- [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem), Jason Short, 2005/11/20
- [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem), Jason Short, 2005/11/20
- [Freeciv-Dev] (PR#14443) effects queries give useless results when not passed appropriate parameters, Jason Short, 2005/11/21
|
|