[Freeciv-Dev] Re: (PR#12706) 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 Mon, 4 Apr 2005, Per I. Mathisen wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=12706 >
>
> On Sun, 3 Apr 2005, Vasco Alexandre da Silva Costa wrote:
> > Here is a small Lua toy that you may find interesting. Basically it
> > allows running Lua commands via the civserver console. I also made a
> > couple of custom Freeciv functions that will be acessible from Lua.
>
> The design is amazingly simple. And no new dependencies. I am all for
> this :)
>
> Nitpicks:
> - eventshand.c|h should be eventhand.c|h
> - forgot an #include to eventshand.h in stdinhand.c
>
> We should include lua in cvs in utility/lua/, IMHO, and make it use our
> build system.
>
> What should be our battle plan for this?
I propose we do ASAP:
* Commit lua to utility/lua/, plus the configure bits to build and link it
to freeciv.
* Commit the patch I proposed, with the fixes for your nitpicks but with
the custom lib functions from eventshand.c removed.
Later on:
* Design and implement custom Freeciv lib for Lua, loosely based on the
Civilization ToT event system info we got from that mod community, plus
considering suggestions and comments from them for which actions they
want to be able to do (there should be a dozen possible actions, tops).
* Commit that.
* Add event support. At first it could be as lame as this:
The places where the events are triggered get to call this little C function:
emit_event(E_HUT);
This function executes all the Lua callbacks for that event type on the
spot.
On the Lua side, your code would be something like this:
function hutCallback()
-- do some stuff.
end
signalConnect(EHut, hutCallback)
TODO:
How the heck are we going to markup Lua strings and handle I18N?
Suggestions appreciated.
---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa
- [Freeciv-Dev] Re: (PR#12706) Events framework, Vasco Alexandre da Silva Costa, 2005/04/02
- [Freeciv-Dev] Re: (PR#12706) Events framework, Benoit Hudson, 2005/04/02
- [Freeciv-Dev] Re: (PR#12706) Events framework, Mike Kaufman, 2005/04/02
- [Freeciv-Dev] Re: (PR#12706) Events framework, Peter Schaefer, 2005/04/02
- [Freeciv-Dev] Re: (PR#12706) Events framework, Benedict Adamson, 2005/04/03
- [Freeciv-Dev] (PR#12706) Events framework, Vasco Alexandre da Silva Costa, 2005/04/03
- [Freeciv-Dev] (PR#12706) Events framework, Vasco Alexandre da Silva Costa, 2005/04/03
- [Freeciv-Dev] (PR#12706) Events framework, Jason Short, 2005/04/04
- [Freeciv-Dev] Re: (PR#12706) Events framework, Per I. Mathisen, 2005/04/04
- [Freeciv-Dev] Re: (PR#12706) Events framework,
Vasco Alexandre da Silva Costa <=
- [Freeciv-Dev] Re: (PR#12706) Events framework, Per I. Mathisen, 2005/04/05
- [Freeciv-Dev] (PR#12706) Events framework, Jason Short, 2005/04/07
- [Freeciv-Dev] (PR#12706) Events framework, Jason Short, 2005/04/07
- [Freeciv-Dev] (PR#12706) Events framework, Vasco Alexandre da Silva Costa, 2005/04/07
- [Freeciv-Dev] (PR#12706) Events framework, Vasco Alexandre da Silva Costa, 2005/04/07
- [Freeciv-Dev] Re: (PR#12706) Events framework, Benoit Hudson, 2005/04/07
- [Freeciv-Dev] (PR#12706) Events framework, Vasco Alexandre da Silva Costa, 2005/04/07
- [Freeciv-Dev] (PR#12706) Events framework, Vasco Alexandre da Silva Costa, 2005/04/07
- [Freeciv-Dev] Re: (PR#12706) Events framework, Raimar Falke, 2005/04/07
- [Freeciv-Dev] Re: (PR#12706) Events framework, Raimar Falke, 2005/04/07
|
|