forked from VoxeLibre/VoxeLibre
Fixup the create_luacheck file and use it
This commit is contained in:
parent
5b43044368
commit
d39e08c080
|
@ -45,11 +45,8 @@ read_globals = {
|
||||||
------
|
------
|
||||||
|
|
||||||
--GENERAL
|
--GENERAL
|
||||||
"default",
|
"mcljepc_core",
|
||||||
|
|
||||||
--ENTITIES
|
--MAPGEN
|
||||||
"cmi",
|
"mcljepc_mapgen",
|
||||||
|
|
||||||
--HUD
|
|
||||||
"sfinv", "sfinv_buttons", "unified_inventory", "cmsg", "inventory_plus",
|
|
||||||
}
|
}
|
|
@ -19,7 +19,7 @@ pathlist = Path(path).rglob('*.lua')
|
||||||
for path in pathlist:
|
for path in pathlist:
|
||||||
path_in_str = str(path)
|
path_in_str = str(path)
|
||||||
# print(path_in_str)
|
# print(path_in_str)
|
||||||
trouve = False
|
found = False
|
||||||
with open(path_in_str) as f:
|
with open(path_in_str) as f:
|
||||||
local_vars = []
|
local_vars = []
|
||||||
for i, line in enumerate(f.readlines()):
|
for i, line in enumerate(f.readlines()):
|
||||||
|
@ -38,7 +38,7 @@ for path in pathlist:
|
||||||
local_vars.append(n.group('local_var'))
|
local_vars.append(n.group('local_var'))
|
||||||
|
|
||||||
if not found:
|
if not found:
|
||||||
nb_varloc = len(variables_locales)
|
nb_varloc = len(local_vars)
|
||||||
#print(path_in_str, ": -", "({} variables locales)".format(nb_varloc) if nb_varloc > 0 else '')
|
#print(path_in_str, ": -", "({} variables locales)".format(nb_varloc) if nb_varloc > 0 else '')
|
||||||
|
|
||||||
print(', '.join(['"{}"'.format(v) for v in global_vars]))
|
print(', '.join(['"{}"'.format(v) for v in global_vars]))
|
||||||
|
|
Loading…
Reference in New Issue