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: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 30 Apr 2005 23:18:57 -0700
Reply-to: bugs@xxxxxxxxxxx

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

1.  events.lua needs to be added to EXTRA_DIST.

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

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

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

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

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.

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.

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.

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

-jason




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