[Freeciv-Dev] Re: (PR#2521) general effects framework
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=2521 >
On Tue, Apr 20, 2004 at 08:08:51PM -0700, Jason Short wrote:
>
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=2521 >
>
> On the topic of effects-pre:
>
> - I don't understand why there is a game.can_xxx and also a
> pplayer->can_nuke.
the reason this is done is as an extension. With pplayer->can_nuke, you can
treat this effect as a Player-range effect as well as a World-range effect.
The code to treat this case is not too hairy in the regular code, maybe it
is in the savegame code?
> - I don't understand why can_xxx is needed when we could just check
> game.global_wonders[id] (where id is determined by some flag). Is it
> because the effect need not always come from a wonder?
Absolutely. Could easily come via a tech or government, or a plain old
building.
> But anyway...
>
> This patch is an "update" of effects-pre8 that hopefully makes these
> values work. I haven't tested it.
>
> - game.can_xxx is kept and is actually sent to the client.
This does not need to happen. If there is a global effect in operation it
will be sent by the global effect route to the client.
> - pplayer->can_xxx is removed.
Could be done, but why? Unless the savegame problems are too nasty...
> - game.can_xxx is set when the appropriate wonders are built (eventually
> this should be a flag or effect; for now it's just hard-coded to the
> enumerated value).
>
> - game.can_xxx is checked instead of checking for the existance of those
> wonders.
Both of these are done in the effects-immed8.diff. See
gamehand.c:handle_enable_{nuke|space}()
> - Savegame backwards compatability is added. If the appropriate
> capability isn't set the game checks game.global_wonders to find out if
> the appropriate wonders have been built.
I'll wait on the patch review.
-mike
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Mike Kaufman, 2004/04/19
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Per I. Mathisen, 2004/04/20
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Mike Kaufman, 2004/04/20
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Jason Short, 2004/04/20
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Jason Short, 2004/04/20
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Vasco Alexandre da Silva Costa, 2004/04/20
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Jason Short, 2004/04/20
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Mike Kaufman, 2004/04/20
- [Freeciv-Dev] Re: (PR#2521) general effects framework,
Mike Kaufman <=
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Mike Kaufman, 2004/04/21
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Mike Kaufman, 2004/04/21
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Jason Short, 2004/04/21
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Jason Short, 2004/04/21
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Mike Kaufman, 2004/04/21
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Per I. Mathisen, 2004/04/21
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Mike Kaufman, 2004/04/21
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Per I. Mathisen, 2004/04/21
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Mike Kaufman, 2004/04/21
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Jason Short, 2004/04/21
|
|