Lua get and set now possibly async

This commit is contained in:
Zef Hemel
2024-10-26 16:02:37 +02:00
parent 77f0c8669c
commit 123309d791
6 changed files with 103 additions and 73 deletions
-12
View File
@@ -32,18 +32,6 @@ export const stringApi = new LuaTable({
]);
},
),
format: new LuaBuiltinFunction((_sf, format: string, ...args: any[]) => {
return format.replace(/%./g, (match) => {
switch (match) {
case "%s":
return luaToString(args.shift());
case "%d":
return String(args.shift());
default:
return match;
}
});
}),
gmatch: new LuaBuiltinFunction((_sf, s: string, pattern: string) => {
const regex = new RegExp(pattern, "g");
return () => {