Releases: WeaselGames/godot_luaAPI
v2.1-beta11
4.2.x
What's Changed
- BREAKING:
LuaAPI.do_file
andLuaAPI.do_string
both had their return types changed fromLuaError
toVariant
. This is to allow for return values. LuaAPI.do_file
andLuaAPI.do_string
both now take an optimal second argument. Which would be an Array of arguments to pass to the script.- Some minor documentation changes
Example usage:
func _ready():
var lua: LuaAPI = LuaAPI.new()
lua.bind_libraries(["base", "table", "string"])
var ret = lua.do_string("""
local a, b = ...
print(a, b)
return a + b
""", [4, 6])
if ret is LuaError:
print("ERROR %d: %s" % [ret.type, ret.message])
return
print(ret)
Module MacOS actions started failing randomly so are sadly not included in this release.
v2.1-beta10
4.2.x
What's Changed
- Minor in-engine documentation corrections by @sepTN
- Module builds updated to 4.2.1
v2.1-beta9
4.2.x
What's Changed
- Memory leak described in #155 has been resolved now that GDExtension supports CallableCustoms. (Thanks to the amazing work done by @dsnopek and other contributors in the Godot Engine and godot-cpp.)
- BREAKING: Lua methods pulled as a Callable no longer take an array of arguments, arguments are passed 1 by 1 now. So instead of
myLuaFunc.call([arg1, arg2])
it ismyLuaFun.call(arg1, arg2)
.
A special thanks to @Tekuzo as well, who helped upload the releases due to my internet being too slow currently.
v2.1-beta8
4.1.x
What's Changed
- Small bug fix for crashes related to when Lua loses reference of a RefCounted before godot.
v2.1-beta7
4.1.x
What's Changed
- New LuaAPI field
LuaAPI.use_callables
when true, it will use theLuaCallable
type which is aCallableCustom
for lua methods like before. When false it will instead use theLuaFunctionRef
type which is aRefCounted
. It behaves the same but will use ainvoke
method rather thencall
. This resolves the issue of C# not supportingCallableCustom
types. More details in #172 - Module releases are now using Godot v4.1.2-stable
- Memory leak described in #155 has been fixed for all module builds. And a work around now exists for GDExtension using
LuaFunctionRefs
v2.1-beta6
4.1.x
What's Changed
- Added support for UTF8 strings
- Added support for the FFI library while using the luaJIT builds.
v1.2-beta1
3.x
What's Changed
- Added support for UTF8 strings
v2.1-beta5
4.1.x
What's Changed
- New methods to access and modify registry values from @RadiantUwU
- Some demo bug fixes from @SilicDev
v2.1-beta4
4.1.x
What's Changed
- Fixed some return types to allow for mono glue generation.
- The LuaAPI class memory usage, and limit are now uint64's rather then just a signed int32.
__index
and__newindex
now do not force the String type as the index, as this could in theory be any type.
v2.1-beta3
4.1.x
This is the first large feature update for LuaAPI v2.1
What's Changed
- Added
memory_limit
property to the LuaAPI class. This allows to set the max allowed memory usage for the Lua state in bytes. - Added
object_metatable
property to the LuaAPI class. This sets the default metatable for Objects which do not define alua_metatable
property. - Removed
permissive
property from the LuaAPI class. This has been replaced with thepermissive
property on LuaDefaultObjectMetatable which occupies the LuaAPIobject_metatable
property by default. - Added
get_memory_usage()
method to the LuaAPI class. This returns the current memory usage of the Lua state in bytes. - Removed
expose_object_constructor()
from the LuaAPI class. This is no longer needed, you can push the obj.new method as a global usingLuaAPI.push_global()
for the same effect but with constructor argument support. - New LuaObjectMetatable class. This is a interface class meant to be used to define metatables.
- New LuaDefaultObjectMetatable class. This is the type that
object_metatable
defaults to, it provides the same functionality with metatables and metamethods we had before this update. The LuaAPI permissive property has been moved to this class now. It will yield metamethod calls to the object if it defines them like before. Otherwise looks for thelua_fields
method which is either a blacklist or a whitelist depending onpermissive
.
There are a lot of changes with this update so I suspect there may be some regression, if you notice any please open an issue.