* update doc/*/scripting/builtins/libinventory.md * add doc/*/scripting/builtins/libgfx-weather.md * update doc/*/scripting/builtins/libfile.md * update doc/*/item-properties & update doc/*/scripting/builtins/libinventory.md * add inventory.decrement docs * update doc/*/scripting/builtins/libinventory.md
2.3 KiB
2.3 KiB
Scripting
Project uses LuaJIT as a scripting language.
Subsections:
- Engine events
- User input
- Filesystem and serialization
- UI properties and methods
- Entities and components
- Libraries
- Module core:bit_converter
- Module core:data_buffer
- Module core:vector2, core:vector3
Type annotations
The documentation for Lua libraries uses type annotations, not part of Lua syntax.
- vector - an array of three or four numbers
- vec2 - array of two numbers
- vec3 - array of three numbers
- vec4 - array of four numbers
- quat - array of four numbers - quaternion
- matrix - array of 16 numbers - matrix
Core functions
require "packid:module_name" -- load Lua module from pack-folder/modules/
-- no extension included, just name