Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2005:
[Freeciv-Dev] (PR#12706) Events framework
Home

[Freeciv-Dev] (PR#12706) Events framework

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#12706) Events framework
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Sun, 1 May 2005 04:35:45 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12706 >

> [jdorje - Sun May 01 06:18:53 2005]:
> 
> 1.  events.lua needs to be added to EXTRA_DIST.

Done.

> 2.  Other rulesets need an events.lua, right?  Or maybe not, I guess
> there's only one cities.ruleset.

If there isn't one, it is no problem. Just means there are no callbacks
associated to any signal whatsoever.

> 3.  events.lua needs documentation inside it, much like the .ruleset
> files have (default ruleset only).

When it starts being actually useful, it will have documentation.

> 4.  It just occurred to me that all ruleset files should have a GPL
> disclaimer, right?

Probably. But I think that should be a separate patch.

> 5.  api_find_tile takes native coordinates, not natural ones (comment is
> wrong).

Done.

> 6.  The notify API is useless because it doesn't give an event type. 
> This just prints a message on the chatline, which isn't useful for
> scenarios.  There is a single exception but this only notifies a single
> player.  Instead ALL notifications should take an event type.  It
> shouldn't be possible to specify an eventless message.

No it isn't useless. See server/plrhand.h.

notify_player and notify_embassies. Those do not take event types either.

> 7.  Most of the notify API is unsafe since it takes a fixed string and
> passes this in as a printf-style string.  So %'s won't be handled
> properly.  So you need to change
> 
> -  notify_player_ex(pplayer, ptile, event, message);
> +  notify_player_ex(pplayer, ptile, event, "%s", message);
> 
> for most or all notify functions.

Done.

> 8.  There is still no documentation of the API.  You've gone to a lot of
> work to keep the userland API code nicely separated but this doesn't
> help the user at all since he has no idea what this mean.  So I have no
> idea what functions are possible to call within the lua script.  As a
> user I have no idea whatsoever how to begin, and I don't think this is
> something that should ONLY be documented on the web site.

Once the API is more finalized the Wiki page will be improved and an
ASCII version of it will go into doc/.

> #1, #3, #7, and #8 are critical I'd say.




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