From a149d0af2b07e512a887e2ccbe409d0065e91b2e Mon Sep 17 00:00:00 2001 From: Fierelier Date: Sun, 14 May 2023 22:13:21 +0200 Subject: [PATCH] Use pretty variable names for translation --- lua_translate | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua_translate b/lua_translate index 0f0bf59..a0334f0 100755 --- a/lua_translate +++ b/lua_translate @@ -36,13 +36,13 @@ for func in functions: checkfunc = typesIn["__unknown"] else: checkfunc = typesIn[arg] - ofile.write("\t" +arg+ ' invar' +str(invarCount)+ ' = ' +checkfunc+ '(L,' +str(invarCount)+ ');\n') + ofile.write("\t" +arg+ ' ' +functions[func]["argNames"][invarCount - 1]+ ' = ' +checkfunc+ '(L,' +str(invarCount)+ ');\n') invarCount += 1 - invarCount = 1 + invarCount = 0 argstring = "" for arg in functions[func]["arguments"]: - argstring += ",invar" +str(invarCount) + argstring += "," +functions[func]["argNames"][invarCount] invarCount += 1 argstring = "(" +argstring.strip(",")+ ")"