[Freeciv-Dev] Re: (PR#12706) [PATCH] Events framework
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12706 >
On Tue, 26 Apr 2005, Jason Short wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=12706 >
>
> 1. The vast proliferation of api_* functions in server/ is really bad.
> Everything has an API, not just script functions. If you need so many
> functions make a new directory (server/script).
Ok. You could have removed them all with "rm api* script*" though. :-)
> 2. Why do the unit and player function (like print_unit) in events.lua
> have a return value?
Because I copy/pasted them from an older script I had, and I didn't bother
removing it, it does no harm. They are not callbacks, but helper
functions.
> 3. What's the difference between script_signal_emit and script_signal_new?
One "emits" a signal i.e. executes all callbacks associated at that moment
with that signal. The other creates a new signal type. I guess I will
rename script_signal_new to script_signal_create.
> 4. Most of the .c functions do not have a single line of comment in
> them. The code and design are completely unintelligible to me.
It is not that hard to understand, but yes, there will be comments. I just
have not made them yet because:
a) I get terribly bored writing comments.
b) I have not finished writing the rest of the code yet.
c) Because of a) I try to only do comments once, ergo, only when the code
is in final form or just prior to commit.
I think I will punch the signals API a bit more, it is good, but could be
better. The comms module also needs some kicking. I18N I suppose is
fine.
---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa
- [Freeciv-Dev] Re: (PR#12706) Events framework: lua+tolua, Per I. Mathisen, 2005/04/26
- [Freeciv-Dev] Re: (PR#12706) Events framework: lua+tolua, Benoit Hudson, 2005/04/26
- [Freeciv-Dev] (PR#12706) [PATCH] Events framework, Vasco Alexandre da Silva Costa, 2005/04/26
- [Freeciv-Dev] Re: (PR#12706) [PATCH] Events framework, Jason Short, 2005/04/26
- [Freeciv-Dev] Re: (PR#12706) [PATCH] Events framework,
Vasco Alexandre da Silva Costa <=
- [Freeciv-Dev] (PR#12706) [PATCH] Events framework: version 2, Vasco Alexandre da Silva Costa, 2005/04/27
- [Freeciv-Dev] (PR#12706) Events framework, Jason Short, 2005/04/28
- [Freeciv-Dev] (PR#12706) Events framework, Jason Short, 2005/04/28
- [Freeciv-Dev] (PR#12706) [PATCH] Events framework: version 3, Vasco Alexandre da Silva Costa, 2005/04/29
- [Freeciv-Dev] (PR#12706) Events framework, Jason Short, 2005/04/29
- [Freeciv-Dev] (PR#12706) [PATCH] Events framework: version 4, Vasco Alexandre da Silva Costa, 2005/04/30
|
|