URL:
  <http://gna.org/bugs/?15876>

                 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
                 Release: 
         Discussion Lock: Any
        Operating System: None
         Planned Release: 

    _______________________________________________________

Details:


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:

  <http://gna.org/bugs/?15876>

_______________________________________________
  Meddelandet skickades via/av Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to