Fix Lua client.createinstance calling the wrong ApiHawk method

fixes e6cb74d31
This commit is contained in:
YoshiRulz 2020-12-22 18:46:42 +10:00
parent 03b4ae18e0
commit 5a098055d7
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 1 additions and 1 deletions

View File

@ -279,7 +279,7 @@ namespace BizHawk.Client.Common
[LuaMethod("createinstance", "returns a default instance of the given type of object if it exists (not case sensitive). Note: This will only work on objects which have a parameterless constructor. If no suitable type is found, or the type does not have a parameterless constructor, then nil is returned")]
public LuaTable CreateInstance(string name)
{
var instance = APIs.Tool.GetTool(name);
var instance = APIs.Tool.CreateInstance(name);
return instance == null ? null : _th.ObjectToTable(instance);
}