Summary: API: Lua part of runtime to be shipped in Freeciv
data directory
                 Project: Freeciv
            Submitted by: englabenny
            Submitted on: onsdag 2010-04-14 den 13:23
                Category: general
                Severity: 1 - Wish
                Priority: 1 - Later
                  Status: In Progress
             Assigned to: englabenny
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: None
         Planned Release: 



The Lua API (for ruleset and scenarios) has a structure as follows:

* Tolua-generated bindings to C functions
* Lua implementation layer of higher-level methods and some functions

The lua implementation part will probably only grow. It is much easier if we
only export a minimum from C, upon which we can build higher-level
functionality (See current Tile:circle_iterate(..))

Tolua is very optimistic: if there is any Lua parse error, or error when our
embedded lua files are executed, the errors are silently ignored.

Because of this, it might be better in the long run to execute the lua files
ourself after loading the tolua-generated bindings. (And then we can properly
do error checking and reporting ourselves).

That means we ship the .lua files in the data directory, and in turn that
users and developers can modify or add to the lua layer without recompiling
Freeciv. In fact, the changes would probably take effect with the next
started/loaded game.


Reply to this item at:


  Meddelandet skickades via/av Gna!

Freeciv-dev mailing list

Reply via email to