Toribash
Prev Previous Post   Next Post Next
Original Post
Upcoming Lua Changes
The upcoming beta release should be implementing these changes/additions/fixes to the lua implementation:
#########################
 L U A  C H A N G E L O G
#########################

    * Added "command" hook
        - Called when a /command is entered
        - Only picks up non recognised commands (so /set won't trigger it but /jalis will)
        - Example: /sdk/commandhooktest.lua
    
    * Added "unload" hook
        - Called before the script is unloaded.
        
    * New drawing functions:
        - draw_line | sdk/draw_line.lua
        - draw_triangle | sdk/draw_triangle.lua
        - draw_text_3d | sdk/draw_text_3d.lua
        - get_string_length | sdk/get_string_length.lua
    
    * Camera functions:
        - set_camera_mode | sdk/set_camera_mode.lua
        - fixed set_camera_pos for freecam mode
    
    * General functions:
        - get_files | sdk/get_files.lua
    
    * Modules:
        - Enabled use of lua modules
            ~ Examples in script/modules
            ~ Usage example sdk/ModuleUsageExample.lua
            ~ http://lua-users.org/wiki/ModulesTutorial
            ~ No c modules allowed.
        
    * OS Library: 
        - Enabled: 
            - os.time
            - os.date
            - os.difftime
            - os.tempname
            
    * IO Library:
        - Disabled:
            - io.popen
        - Changed:
            - If the third parameter is not nil, the directory will start in ./ as opposed to ./data/scripts
                ~ This keeps backwards compatibility, while enabling new features.
                
    * Documentation:
        - Added various functions to the sdk.
        - Changed some sdk documentation to be more clear.
Plus some fixes and probably a few more things I forgot.

The only backwards compatibility issues will be with any scripts that use io.popen and those that edited startup.lua

Documentation on how to use the functions will be provided in the SDK, or where it states in this changelog.

Any questions, ask them here.
Last edited by War_Hero; Mar 4, 2011 at 11:09 PM.
:D